diff options
Diffstat (limited to 'mysql-test/main/selectivity_no_engine.test')
| -rw-r--r-- | mysql-test/main/selectivity_no_engine.test | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/main/selectivity_no_engine.test b/mysql-test/main/selectivity_no_engine.test index 5bc78e03781..8596fce9bf2 100644 --- a/mysql-test/main/selectivity_no_engine.test +++ b/mysql-test/main/selectivity_no_engine.test @@ -250,6 +250,27 @@ SELECT * FROM t1 AS a NATURAL JOIN t1 AS b; DROP TABLE t1,t2,t3; +--echo # +--echo # MDEV-30529: Assertion `rnd_records <= s->found_records' failed in best_access_path +--echo # +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); + +CREATE TABLE t2 (b VARCHAR(1), c INT, d VARCHAR(1), e VARCHAR(1), KEY(b), KEY(d), KEY(e)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('x',0,'-','-'), +('x',0,'-','-'),('x',5,'-','-'),('x',0,'-','-'),('x',0,'-','-'), +('x',0,'-','-'),('x',0,'w','-'),('x',0,'-','-'),('x',0,'-','-'), +('x',0,'-','-'),('x',0,'-','-'),('x',0,'-','u'),('x',0,'-','-'), +('x',0,'-','-'),('x',0,'-','t'),('x',0,'-','-'),('x',0,'-','-'), +('x',0,'-','-'),('x',0,'-','-'),('x',0,'-','-'),('x',0,'-','p'), +('x',0,'z','-'),('x',0,'-','-'),('x',0,'-','-'),('x',0,'-','v'); + +set @tmp_jcl=@@join_cache_level; +SET JOIN_CACHE_LEVEL= 3; +SELECT * FROM t1 JOIN t2 ON t1.a = t2.c WHERE t2.b IN ('o') OR t2.e >= 'f' OR t2.d > 'p'; +set join_cache_level=@tmp_jcl; + +drop table t1,t2; --echo # --echo # End of the test file --echo # |
