diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2020-12-23 19:28:02 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2020-12-23 19:28:02 +0100 |
commit | 25561435e0b1fe42ec29d5ab06dc15875cdd1cfa (patch) | |
tree | d2e67d4509577d84da7ade2820154c904180e151 /mysql-test/main/range.test | |
parent | fa1aef39ebc7d84d24d4e3d2124f982526632ee9 (diff) | |
parent | 8d8370e31d48e0bc6139c18770746f9959c21598 (diff) | |
download | mariadb-git-25561435e0b1fe42ec29d5ab06dc15875cdd1cfa.tar.gz |
Merge branch '10.2' into 10.3
Diffstat (limited to 'mysql-test/main/range.test')
-rw-r--r-- | mysql-test/main/range.test | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/main/range.test b/mysql-test/main/range.test index c850498d7f2..0cb36a6e823 100644 --- a/mysql-test/main/range.test +++ b/mysql-test/main/range.test @@ -2155,6 +2155,40 @@ eval $q4; drop table t1; +# +# MDEV-21958: Query having many NOT-IN clauses running forever (testcase 2) +# +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +create table t2 ( + pk int primary key, + key1 int, + col1 varchar(255), + key (key1, pk) +); + +insert into t2 (pk, key1) +select A.a+10 *B.a + 100*C.a, A.a+10 *B.a +100*C.a from t1 A, t1 B, t1 C; + +--echo # This must use ALL, not range: +explain select * from t2 force index (primary) where pk not in (1,2,3); + +drop table t1,t2; + +--echo # +--echo # MDEV-24444: ASAN use-after-poison in Item_func_in::get_func_mm_tree with NOT IN +--echo # +CREATE TABLE t1 (id INT, a CHAR(3), b INT, PRIMARY KEY(id), KEY(b), KEY(a)); +INSERT INTO t1 VALUES (1,'foo',10),(2,'bar',20); + +CREATE TABLE t2 (code CHAR(8), num INT, PRIMARY KEY (code)); +INSERT INTO t2 VALUES ('100',1),('111',2); + +SELECT * FROM t1 JOIN t2 ON (t2.code = t1.b) WHERE t1.a NOT IN ('baz', 'qux') OR t2.num != 3; + +DROP TABLE t1, t2; + --echo # --echo # End of 10.2 tests --echo # |