diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2013-05-04 01:08:20 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2013-05-04 01:08:20 +0400 |
commit | c0ca15ab9c4c1838dfe89568391cdf40ed5fb1b6 (patch) | |
tree | 89f092d75a9d1af4fcb78b3ee3aab9465cc9ce41 | |
parent | b3720ff7553ced6208737482d3410183cab4a545 (diff) | |
download | mariadb-git-c0ca15ab9c4c1838dfe89568391cdf40ed5fb1b6.tar.gz |
MDEV-4270: crash in fix_semijoin_strategies_for_picked_join_order
- Added testcase
-rw-r--r-- | mysql-test/r/join_outer_innodb.result | 22 | ||||
-rw-r--r-- | mysql-test/t/join_outer_innodb.test | 23 |
2 files changed, 45 insertions, 0 deletions
diff --git a/mysql-test/r/join_outer_innodb.result b/mysql-test/r/join_outer_innodb.result index 0184e236d14..1081fc0eed3 100644 --- a/mysql-test/r/join_outer_innodb.result +++ b/mysql-test/r/join_outer_innodb.result @@ -476,3 +476,25 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t10 ALL PRIMARY NULL NULL NULL 3 Using where; Using join buffer (flat, BNL join) drop view v1; drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16; +# +# MDEV-4270: crash in fix_semijoin_strategies_for_picked_join_order +# +drop table if exists t1,t2,t3; +Warnings: +Note 1051 Unknown table 't1' +Note 1051 Unknown table 't2' +Note 1051 Unknown table 't3' +create table t2(a int,unique key (a)) engine=innodb; +create table t3(b int) engine=innodb; +create table t1(a int,b int)engine=innodb; +set @mdev4270_opl= @@optimizer_prune_level; +set @mdev4270_osd= @@optimizer_search_depth; +set optimizer_prune_level=0; +set optimizer_search_depth=2; +select 1 from t1 join t2 a +natural left join t2 b +natural right outer join t3; +1 +drop table t1,t2,t3; +set optimizer_prune_level=@mdev4270_opl; +set optimizer_search_depth=@mdev4270_osd; diff --git a/mysql-test/t/join_outer_innodb.test b/mysql-test/t/join_outer_innodb.test index adb555d5f85..539d85a8b11 100644 --- a/mysql-test/t/join_outer_innodb.test +++ b/mysql-test/t/join_outer_innodb.test @@ -350,3 +350,26 @@ explain select * from v1; drop view v1; drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16; + + +--echo # +--echo # MDEV-4270: crash in fix_semijoin_strategies_for_picked_join_order +--echo # +drop table if exists t1,t2,t3; +create table t2(a int,unique key (a)) engine=innodb; +create table t3(b int) engine=innodb; +create table t1(a int,b int)engine=innodb; + +set @mdev4270_opl= @@optimizer_prune_level; +set @mdev4270_osd= @@optimizer_search_depth; +set optimizer_prune_level=0; +set optimizer_search_depth=2; + +select 1 from t1 join t2 a +natural left join t2 b +natural right outer join t3; + +drop table t1,t2,t3; +set optimizer_prune_level=@mdev4270_opl; +set optimizer_search_depth=@mdev4270_osd; + |