diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2010-10-18 12:55:26 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2010-10-18 12:55:26 +0400 |
commit | 6765cc3017d99f3f767d59778c97401e06fd898d (patch) | |
tree | b3d59eeabe1e0a36c5e01231a9de1767d887a057 /mysql-test | |
parent | f75fd03ea9a8157de3128af1157a36dd2f604a0d (diff) | |
download | mariadb-git-6765cc3017d99f3f767d59778c97401e06fd898d.tar.gz |
# No BUG#, a case brought from 5.2's innodb_mysql_lock.test
- Fix a crash in nested semi-join subquery processing
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/subselect.result | 18 | ||||
-rw-r--r-- | mysql-test/r/subselect_no_mat.result | 18 | ||||
-rw-r--r-- | mysql-test/r/subselect_no_opts.result | 18 | ||||
-rw-r--r-- | mysql-test/r/subselect_no_semijoin.result | 18 | ||||
-rw-r--r-- | mysql-test/t/subselect.test | 21 |
5 files changed, 93 insertions, 0 deletions
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 3844b7615e6..1b39b255f71 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -1,4 +1,5 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t11,t12; +drop view if exists v2; set @save_optimizer_switch=@@optimizer_switch; set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=off"; select (select 2); @@ -4937,3 +4938,20 @@ SELECT * FROM t2 UNION SELECT * FROM t2 ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE)); DROP TABLE t1,t2; End of 5.1 tests +# +# No BUG#, a case brought from 5.2's innodb_mysql_lock.test +# +create table t1 (i int not null primary key); +insert into t1 values (1),(2),(3),(4),(5); +create table t2 (j int not null primary key); +insert into t2 values (1),(2),(3),(4),(5); +create table t3 (k int not null primary key); +insert into t3 values (1),(2),(3); +create view v2 as select t2.j as j from t2 where t2.j in (select t1.i from t1); +select * from t3 where k in (select j from v2); +k +1 +2 +3 +drop table t1,t2,t3; +drop view v2; diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result index 82870595b54..78e6467ae62 100644 --- a/mysql-test/r/subselect_no_mat.result +++ b/mysql-test/r/subselect_no_mat.result @@ -3,6 +3,7 @@ select @@optimizer_switch like '%materialization=on%'; 1 set optimizer_switch='materialization=off'; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t11,t12; +drop view if exists v2; set @save_optimizer_switch=@@optimizer_switch; set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=off"; select (select 2); @@ -4941,6 +4942,23 @@ SELECT * FROM t2 UNION SELECT * FROM t2 ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE)); DROP TABLE t1,t2; End of 5.1 tests +# +# No BUG#, a case brought from 5.2's innodb_mysql_lock.test +# +create table t1 (i int not null primary key); +insert into t1 values (1),(2),(3),(4),(5); +create table t2 (j int not null primary key); +insert into t2 values (1),(2),(3),(4),(5); +create table t3 (k int not null primary key); +insert into t3 values (1),(2),(3); +create view v2 as select t2.j as j from t2 where t2.j in (select t1.i from t1); +select * from t3 where k in (select j from v2); +k +1 +2 +3 +drop table t1,t2,t3; +drop view v2; set optimizer_switch=default; select @@optimizer_switch like '%materialization=on%'; @@optimizer_switch like '%materialization=on%' diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result index db83cc0eaa9..d4b0e33f653 100644 --- a/mysql-test/r/subselect_no_opts.result +++ b/mysql-test/r/subselect_no_opts.result @@ -1,5 +1,6 @@ set optimizer_switch='materialization=off,semijoin=off'; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t11,t12; +drop view if exists v2; set @save_optimizer_switch=@@optimizer_switch; set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=off"; select (select 2); @@ -4938,4 +4939,21 @@ SELECT * FROM t2 UNION SELECT * FROM t2 ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE)); DROP TABLE t1,t2; End of 5.1 tests +# +# No BUG#, a case brought from 5.2's innodb_mysql_lock.test +# +create table t1 (i int not null primary key); +insert into t1 values (1),(2),(3),(4),(5); +create table t2 (j int not null primary key); +insert into t2 values (1),(2),(3),(4),(5); +create table t3 (k int not null primary key); +insert into t3 values (1),(2),(3); +create view v2 as select t2.j as j from t2 where t2.j in (select t1.i from t1); +select * from t3 where k in (select j from v2); +k +1 +2 +3 +drop table t1,t2,t3; +drop view v2; set optimizer_switch=default; diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result index b2547be3d27..f9ec2abade1 100644 --- a/mysql-test/r/subselect_no_semijoin.result +++ b/mysql-test/r/subselect_no_semijoin.result @@ -1,5 +1,6 @@ set optimizer_switch='semijoin=off'; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t11,t12; +drop view if exists v2; set @save_optimizer_switch=@@optimizer_switch; set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=off"; select (select 2); @@ -4938,4 +4939,21 @@ SELECT * FROM t2 UNION SELECT * FROM t2 ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE)); DROP TABLE t1,t2; End of 5.1 tests +# +# No BUG#, a case brought from 5.2's innodb_mysql_lock.test +# +create table t1 (i int not null primary key); +insert into t1 values (1),(2),(3),(4),(5); +create table t2 (j int not null primary key); +insert into t2 values (1),(2),(3),(4),(5); +create table t3 (k int not null primary key); +insert into t3 values (1),(2),(3); +create view v2 as select t2.j as j from t2 where t2.j in (select t1.i from t1); +select * from t3 where k in (select j from v2); +k +1 +2 +3 +drop table t1,t2,t3; +drop view v2; set optimizer_switch=default; diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 22db7ae1eec..c0062188207 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -9,6 +9,7 @@ # Initialise --disable_warnings drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t11,t12; +drop view if exists v2; --enable_warnings set @save_optimizer_switch=@@optimizer_switch; @@ -4206,3 +4207,23 @@ DROP TABLE t1,t2; --enable_result_log --echo End of 5.1 tests + +--echo # +--echo # No BUG#, a case brought from 5.2's innodb_mysql_lock.test +--echo # + +create table t1 (i int not null primary key); +insert into t1 values (1),(2),(3),(4),(5); + +create table t2 (j int not null primary key); +insert into t2 values (1),(2),(3),(4),(5); + +create table t3 (k int not null primary key); +insert into t3 values (1),(2),(3); + +create view v2 as select t2.j as j from t2 where t2.j in (select t1.i from t1); + +select * from t3 where k in (select j from v2); + +drop table t1,t2,t3; +drop view v2; |