diff options
author | Monty <monty@mariadb.org> | 2020-03-18 12:00:38 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-03-18 12:00:38 +0200 |
commit | 305cffebaba7a81fcc12f0c7511ffe639cb9b0d2 (patch) | |
tree | bc3047413379f91841457b449f84a3ac6c40678e /mysql-test/main/index_merge_myisam.test | |
parent | 36b0b302f26f59770ae12ad528e6f56c78083f4c (diff) | |
parent | 517f659e6d5eeb7e01bf19ef8b782bc2619831d4 (diff) | |
download | mariadb-git-305cffebaba7a81fcc12f0c7511ffe639cb9b0d2.tar.gz |
merge 10.4 to 10.5
Diffstat (limited to 'mysql-test/main/index_merge_myisam.test')
-rw-r--r-- | mysql-test/main/index_merge_myisam.test | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/mysql-test/main/index_merge_myisam.test b/mysql-test/main/index_merge_myisam.test index 13d1842173c..d172b6b0f61 100644 --- a/mysql-test/main/index_merge_myisam.test +++ b/mysql-test/main/index_merge_myisam.test @@ -271,3 +271,44 @@ explain select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z. select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; set @@optimizer_switch= @optimizer_switch_save; drop table t0; + +# +# MDEV-21932: ROR union with index_merge_sort_union=off +# +create table t0 (a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +insert into t0 select a+10 from t0; +insert into t0 select a+20 from t0; +insert into t0 select a+40 from t0; +insert into t0 select a+80 from t0; +insert into t0 select a+160 from t0; +delete from t0 where a > 300; +create table t1 ( +f1 int, f2 int, f3 int, f4 int, +primary key (f1), key (f3), key(f4) +) engine=myisam; +insert into t1 select a+100, a+100, a+100, a+100 from t0; +insert into t1 VALUES (9,0,2,6), (9930,0,0,NULL); +analyze table t1; +set optimizer_switch='index_merge_sort_union=off'; +set optimizer_switch='index_merge_union=on'; +explain select * from t1 +where (( f3 = 1 or f1 = 7 ) and f1 < 10) or +(f3 between 2 and 2 and ( f3 = 1 or f4 < 7 )); +select * from t1 +where (( f3 = 1 or f1 = 7 ) and f1 < 10) or +(f3 between 2 and 2 and ( f3 = 1 or f4 < 7 )); +insert into t1 values (52,0,1,0),(53,0,1,0); +insert into t1 values (50,0,1,0),(51,0,1,0); +insert into t1 values (48,0,1,0),(49,0,1,0); +insert into t1 values (46,0,1,0),(47,0,1,0); +insert into t1 values (44,0,1,0),(45,0,1,0); +analyze table t1; +explain select * from t1 +where (( f3 = 1 or f1 = 7 ) and f1 < 10) or +(f3 between 2 and 2 and ( f3 = 1 or f4 < 7 )); +select * from t1 +where (( f3 = 1 or f1 = 7 ) and f1 < 10) or +(f3 between 2 and 2 and ( f3 = 1 or f4 < 7 )); +drop table t0,t1; +set optimizer_switch= @optimizer_switch_save; |