![](https://secure.gravatar.com/avatar/39b623a1559cf9c69ac3d9d4fb44e7fe.jpg?s=120&d=mm&r=g)
Hi, Aleksey, On Apr 13, Aleksey Midenkov wrote:
No, quite the opposite. I think (see above) that CONTEXT_ANALYSIS_ONLY_VCOL_EXPR (it's set inside init_lex_with_single_table()) is wrong, what you're doing is not "context analysys only", you're preparing items for evaluation.
That works identically in branch and vanilla 10.3:
--source include/have_ucs2.inc create table t1 (c1 char(1) character set ucs2 collate ucs2_test_ci, v1 char(1) character set ucs2 collate ucs2_test_ci as (c1), v2 int as (c1 = 'b'), v3 int as (v1 = 'b')); insert into t1 (c1) values ('a'); select * from t1 where v1 = 'b'; drop table t1;
Result: select * from t1 where v1 = 'b'; c1 v1 v2 v3 a a 0 0
.opt file: --character-sets-dir=$MYSQL_TEST_DIR/std_data/ldml/
Wow, this is a very good test. I wonder how you found it. Yes, it shows, exactly, that it's incorrect to set CONTEXT_ANALYSIS_ONLY_VCOL_EXPR and then evaluate those items. Items fixed under CONTEXT_ANALYSIS_ONLY_VCOL_EXPR are *not fit* to be evaluated. Take a look at the bb-10.3-serg-MDEV-24176 branch. Three commits there: two cherry-picks from 10.2 (they shouldn't be pushed into 10.3, instead your commit will eventually be rebased on top of them after they're merged into 10.3) and the "work-in-progress" commit that removes init_lex_with_single_table and CONTEXT_ANALYSIS_ONLY_VCOL_EXPR. Regards, Sergei VP of MariaDB Server Engineering and security@mariadb.org