diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2021-01-06 10:53:00 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2021-01-06 10:53:00 +0100 |
commit | 02e7bff882c5169ba3e1ce7e9a93d4c28fe3afd1 (patch) | |
tree | 4a6a8d578fedb4c2b1f437ab39c2d7430ad95163 /mysql-test/main/func_like.test | |
parent | 5f10870c8a8c2448bfc26d990110390d48000b84 (diff) | |
parent | 478b83032b170b2ae030fa77fe4bed60a7910472 (diff) | |
download | mariadb-git-02e7bff882c5169ba3e1ce7e9a93d4c28fe3afd1.tar.gz |
Merge commit '10.4' into 10.5
Diffstat (limited to 'mysql-test/main/func_like.test')
-rw-r--r-- | mysql-test/main/func_like.test | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/mysql-test/main/func_like.test b/mysql-test/main/func_like.test index cb50fb91879..ef13d46c268 100644 --- a/mysql-test/main/func_like.test +++ b/mysql-test/main/func_like.test @@ -187,7 +187,7 @@ DROP TABLE t1; --echo # # -# Item_func_line::print() +# Item_func_like::print() # create view v1 as select 'foo!' like 'foo!!', 'foo!' like 'foo!!' escape '!'; show create view v1; @@ -208,6 +208,33 @@ set sql_mode=default; select * from t1; drop table t1; +# +# Item_func_like::fix_fields() +# +create table t1 (f int); +insert t1 values (1),(2); +select 1 from (select distinct * from t1) as x where f < (select 1 like 2 escape (3=1)); +drop table t1; + +# +# Item_func_like::fix_fields, ESCAPE, const_item() +# +create table t1(f1 int); +insert into t1 values(1); +--error ER_WRONG_ARGUMENTS +update (select 1 like 2 escape (1 in (select 1 from t1))) x, t1 as d set d.f1 = 1; +select * from (select 1 like 2 escape (1 in (select 1 from t1))) x; +drop table t1; + +# +# Item_func_like::walk +# +create table t1 (f int); +insert t1 values (1),(2); +create view v1 as select * from t1 where (1 like 2 escape (3 in (('h', 'b') in (select 'k', 'k' union select 'g', 'j'))) and f >= 0); +drop view v1; +drop table t1; + --echo # --echo # MDEV-17359 - Extend expression supported by like (| & << >> || + - * / DIV MOD ^ ) --echo # |