summaryrefslogtreecommitdiff
path: root/mysql-test/t/subselect_mat.test
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2010-05-24 15:24:20 +0400
committerSergey Petrunya <psergey@askmonty.org>2010-05-24 15:24:20 +0400
commit5a53be655cd68878fbe8c8bc0a0c3c30aeb98c45 (patch)
tree8378325d1e36437b89c9c15e9f6b1efad5a645e3 /mysql-test/t/subselect_mat.test
parent64d505d42fc750167dcaf0fc305b4dc7e7df562b (diff)
parent61864021ca1aeb6e55569cddff57c0eae84ce4a8 (diff)
downloadmariadb-git-5a53be655cd68878fbe8c8bc0a0c3c30aeb98c45.tar.gz
MWL#90: Subqueries: Inside-out execution for non-semijoin materialized subqueries that are AND-parts of the WHERE
- Merge into 5.3-subqueries
Diffstat (limited to 'mysql-test/t/subselect_mat.test')
-rw-r--r--mysql-test/t/subselect_mat.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/subselect_mat.test b/mysql-test/t/subselect_mat.test
index dff9a7cf223..aae1772a1ea 100644
--- a/mysql-test/t/subselect_mat.test
+++ b/mysql-test/t/subselect_mat.test
@@ -75,6 +75,7 @@ explain extended
select * from t1i where a1 in (select b1 from t2i where b1 > '0');
select * from t1i where a1 in (select b1 from t2i where b1 > '0');
+--replace_column 6 # 8 # 11 #
explain extended
select * from t1i where a1 in (select b1 from t2i where b1 > '0' group by b1);
select * from t1i where a1 in (select b1 from t2i where b1 > '0' group by b1);
@@ -83,10 +84,12 @@ explain extended
select * from t1i where (a1, a2) in (select b1, b2 from t2i where b1 > '0');
select * from t1i where (a1, a2) in (select b1, b2 from t2i where b1 > '0');
+--replace_column 6 # 7 # 8 # 11 #
explain extended
select * from t1i where (a1, a2) in (select b1, b2 from t2i where b1 > '0' group by b1, b2);
select * from t1i where (a1, a2) in (select b1, b2 from t2i where b1 > '0' group by b1, b2);
+--replace_column 6 # 7 # 8 # 11 #
explain extended
select * from t1i where (a1, a2) in (select b1, min(b2) from t2i where b1 > '0' group by b1);
select * from t1i where (a1, a2) in (select b1, min(b2) from t2i where b1 > '0' group by b1);
@@ -174,6 +177,7 @@ where (a1, a2) in (select b1, b2 from t2 where b1 > '0') and
(a1, a2) in (select c1, c2 from t3
where (c1, c2) in (select b1, b2 from t2i where b2 > '0'));
+--replace_column 6 # 7 # 8 # 11 #
explain extended
select * from t1i
where (a1, a2) in (select b1, b2 from t2i where b1 > '0') and
@@ -215,6 +219,7 @@ where (a1, a2) in (select b1, b2 from t2
# multiple levels of nesting subqueries, unions
+--replace_column 6 # 7 # 8 # 11 #
explain extended
(select * from t1
where (a1, a2) in (select b1, b2 from t2
@@ -829,8 +834,12 @@ select min(a1) from t1 where 7 in (select b1 from t2);
# This is the only correct result of all four queries. This difference is
# filed as BUG#40037.
set @@optimizer_switch='default,materialization=off';
+-- echo # with MariaDB and MWL#90, this particular case is solved:
explain select min(a1) from t1 where 7 in (select b1 from t2);
select min(a1) from t1 where 7 in (select b1 from t2);
+-- echo # but when we go around MWL#90 code, the problem still shows up:
+explain select min(a1) from t1 where 7 in (select b1 from t2) or 2> 4;
+select min(a1) from t1 where 7 in (select b1 from t2) or 2> 4;
drop table t1,t2;
#