summaryrefslogtreecommitdiff
path: root/mysql-test/t/derived_view.test
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-12-15 00:21:15 -0800
committerIgor Babaev <igor@askmonty.org>2011-12-15 00:21:15 -0800
commitf5dac20f38fcf581b0616562cd2da21fb8c50218 (patch)
treebfa94f668924256290b553ee80b1380b1066344c /mysql-test/t/derived_view.test
parentefb57a8ebf798eee816981488c901539ec9fcdad (diff)
downloadmariadb-git-f5dac20f38fcf581b0616562cd2da21fb8c50218.tar.gz
Made the optimizer switch flags 'outer_join_with_cache', 'semijoin_with_cache'
set to 'on' by default.
Diffstat (limited to 'mysql-test/t/derived_view.test')
-rw-r--r--mysql-test/t/derived_view.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/derived_view.test b/mysql-test/t/derived_view.test
index e35aca9b718..953a4c8fcef 100644
--- a/mysql-test/t/derived_view.test
+++ b/mysql-test/t/derived_view.test
@@ -925,6 +925,8 @@ INSERT INTO t2 VALUES (4,3,'r');
CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1;
+SET @save_optimizer_switch=@@optimizer_switch;
+SET optimizer_switch='semijoin_with_cache=off';
SET SESSION optimizer_switch='derived_with_keys=off';
EXPLAIN
SELECT * FROM t3
@@ -942,6 +944,7 @@ SELECT * FROM t3
SELECT * FROM t3
WHERE t3.b IN (SELECT v1.b FROM v1, t2
WHERE t2.c = v1.c AND t2.c = v1.b AND v1.b = t3.c);
+SET optimizer_switch=@save_optimizer_switch;
DROP VIEW v1;
DROP TABLE t1,t2,t3;
@@ -1071,6 +1074,9 @@ INSERT INTO t2 VALUES (29,8,'c'), (39,7,'b');
CREATE TABLE t3 (b int);
+SET @save_optimizer_switch=@@optimizer_switch;
+SET optimizer_switch='outer_join_with_cache=off';
+
EXPLAIN EXTENDED
SELECT t.b, t.c, t1.a
FROM t1, (SELECT t2.b, t2.c FROM t3 RIGHT JOIN t2 ON t2.a = t3.b) AS t
@@ -1105,6 +1111,8 @@ SELECT t.b, t.c, t1.a
FROM t1, (SELECT t2.b, t2.c FROM t3 RIGHT JOIN t2 ON t2.a = t3.b) AS t
WHERE t.b <> 0 AND t.c = t1.a;
+SET optimizer_switch=@save_optimizer_switch;
+
DROP TABLE t1,t2,t3;
--echo #
@@ -1119,6 +1127,9 @@ INSERT INTO t2 VALUES (6);
CREATE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2;
+SET @save_optimizer_switch=@@optimizer_switch;
+SET optimizer_switch='outer_join_with_cache=off';
+
SET SESSION optimizer_switch = 'derived_with_keys=on';
SET SESSION join_cache_level = 4;
@@ -1137,6 +1148,8 @@ SELECT * FROM t3
SET SESSION join_cache_level = default;
+SET optimizer_switch=@save_optimizer_switch;
+
DROP VIEW v2;
DROP TABLE t1,t2,t3;