diff options
author | Igor Babaev <igor@askmonty.org> | 2019-03-05 23:42:04 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2019-03-06 09:12:21 -0800 |
commit | 7b9981fbdf3c3dba2e67d8877e97b7312c44f540 (patch) | |
tree | cd46daedcc2dfc4f4615b13d5783726160b782e1 /mysql-test/main/rowid_filter_innodb.result | |
parent | a36ac52f93a5d809a3773a9b9c5ce2e581683a25 (diff) | |
download | mariadb-git-7b9981fbdf3c3dba2e67d8877e97b7312c44f540.tar.gz |
MDEV-18816 Assertion `sel->quick' failed in JOIN::make_range_rowid_filters
Do not build range filters with detected impossible WHERE.
Anyway conditions cannot be used anymore to extract ranges for filters.
Diffstat (limited to 'mysql-test/main/rowid_filter_innodb.result')
-rw-r--r-- | mysql-test/main/rowid_filter_innodb.result | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/main/rowid_filter_innodb.result b/mysql-test/main/rowid_filter_innodb.result index cd09f1d25a6..ac7ca119512 100644 --- a/mysql-test/main/rowid_filter_innodb.result +++ b/mysql-test/main/rowid_filter_innodb.result @@ -1870,6 +1870,39 @@ ALTER TABLE orders DROP COLUMN o_totaldiscount; DROP VIEW v1; DROP DATABASE dbt3_s001; use test; +# +# MDEV-18816: potential range filter for one join table with +# impossible WHERE for another +# +create table t1 ( +pk int not null primary key, c2 varchar(10) , i1 int,key (c2) +) engine=myisam; +insert into t1 values (1,'a',-5),(2,'a',null); +create table t2 ( +pk int, i1 int, c1 varchar(30) , key c1 (c1(30)), key i1 (i1) +) engine=myisam; +insert into t2 values +(1,-5,'a'),(2,null,'a'),(3,null,'a'),(4,null,'a'),(5,5,'a'),(6,null,'a'), +(7,4,'a'),(8,55,'a'),(9,null,'a'),(10,null,'a'),(11,null,'a'),(12,-5,'a'), +(13,-5,'a'),(14,null,'a'),(15,null,'a'),(16,-5,'a'),(17,-5,'a'); +select 1 +from t1 +left join +t2 join t1 as t1_a on t2.i1 = t1_a.pk +on t1.c2 = t2.c1 +where t1_a.pk is null and t1_a.i1 != 3; +1 +explain extended select 1 +from t1 +left join +t2 join t1 as t1_a on t2.i1 = t1_a.pk +on t1.c2 = t2.c1 +where t1_a.pk is null and t1_a.i1 != 3; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select 1 AS `1` from `test`.`t1` join `test`.`t2` join `test`.`t1` `t1_a` where 0 +drop table t1,t2; set @@use_stat_tables=@save_use_stat_tables; # # MDEV-18755: possible RORI-plan and possible plan with range filter |