From c1de6f8b775eba12e09de856078d135e34aa816d Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Tue, 5 Jul 2011 01:44:15 +0400 Subject: Change the default @@optimizer_switch setting from semijoin=on,firstmatch=on,loosescan=on to semijoin=off,firstmatch=off,loosescan=off Adjust the testcases: - Modify subselect*.test and join_cache.test so that all tests use the same execution paths as before (i.e. optimizations that are being tested are enabled) - Let all other test files run with the new default settings (i.e. with new optimizations disabled) - Copy subquery testcases from these files into t/subselect_extra.test which will run them with new optimizations enabled. --- mysql-test/t/subselect2.test | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mysql-test/t/subselect2.test') diff --git a/mysql-test/t/subselect2.test b/mysql-test/t/subselect2.test index 162bdd0d90a..b6b1388be1c 100644 --- a/mysql-test/t/subselect2.test +++ b/mysql-test/t/subselect2.test @@ -8,6 +8,9 @@ drop table if exists t1, t2, t3, t4; --enable_warnings +set @subselect2_test_tmp=@@optimizer_switch; +set optimizer_switch='semijoin=on,firstmatch=on'; + CREATE TABLE t1 ( DOCID VARCHAR(32)BINARY NOT NULL @@ -168,3 +171,6 @@ SELECT t1.* FROM t1 WHERE (SELECT COUNT(*) FROM t3,t2 WHERE t3.c=t2.a and t2.a='1' AND t1.a=t3.b) > 0; DROP TABLE t1,t2,t3; + +set optimizer_switch=@subselect2_test_tmp; + -- cgit v1.2.1 From 1492de8563ac6032481fe69189f4f1f1e14fe73b Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Fri, 8 Jul 2011 18:46:47 +0400 Subject: Set the default to be mrr=off,mrr_sort_keys=off: - Set the default - Adjust the testcases so that 'new' tests are run with optimizations turned on. - Pull out relevant tests from "irrelevant" tests and run them with optimizations on. - Run range.test and innodb.test with both mrr=on and mrr=off --- mysql-test/t/subselect2.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/t/subselect2.test') diff --git a/mysql-test/t/subselect2.test b/mysql-test/t/subselect2.test index b6b1388be1c..5f819ed39ba 100644 --- a/mysql-test/t/subselect2.test +++ b/mysql-test/t/subselect2.test @@ -9,7 +9,7 @@ drop table if exists t1, t2, t3, t4; --enable_warnings set @subselect2_test_tmp=@@optimizer_switch; -set optimizer_switch='semijoin=on,firstmatch=on'; +set optimizer_switch='semijoin=on,firstmatch=on,mrr=on,mrr_sort_keys=on,index_condition_pushdown=on'; CREATE TABLE t1 ( -- cgit v1.2.1