diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2014-04-25 19:12:06 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2014-04-25 19:12:06 +0400 |
commit | 54265c5f5055bc153edd8b55efd441640d941f7d (patch) | |
tree | cc7dd41fbac2ec4b18a1c12752ce698f5c505ddb /mysql-test/t/selectivity_no_engine.test | |
parent | 2acd81af73ac337658eb646ba2434f46a6dc8dc5 (diff) | |
download | mariadb-git-54265c5f5055bc153edd8b55efd441640d941f7d.tar.gz |
MDEV-5980: EITS: if condition is used for REF access, its selectivity is still in filtered%
- Testcase. The bug is fixed by commit for MDEV-6003
Diffstat (limited to 'mysql-test/t/selectivity_no_engine.test')
-rw-r--r-- | mysql-test/t/selectivity_no_engine.test | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/selectivity_no_engine.test b/mysql-test/t/selectivity_no_engine.test index 8f91f5d9261..bf549d7e7b0 100644 --- a/mysql-test/t/selectivity_no_engine.test +++ b/mysql-test/t/selectivity_no_engine.test @@ -103,6 +103,23 @@ explain extended select * from t2 where a in (1,2,3) and b in (1,2,3); drop table t2, t1; --echo # +--echo # MDEV-5980: EITS: if condition is used for REF access, its selectivity is still in filtered% +--echo # +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1(key1 int, col1 int, key(key1)); +insert into t1 select A.a, A.a from t0 A, t0 B, t0 C; + +set histogram_size=100; +set use_stat_tables='preferably'; +set optimizer_use_condition_selectivity=4; +analyze table t1 persistent for all; +--echo # 10% is ok +explain extended select * from t1 where col1=2; +--echo # Must show 100%, not 10% +explain extended select * from t1 where key1=2; +drop table t0, t1; + --echo # MDEV-6003: EITS: ref access, keypart2=const vs keypart2=expr - inconsistent filtered% value --echo # create table t0(a int); |