summaryrefslogtreecommitdiff
path: root/mysql-test/include/common-tests.inc
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/include/common-tests.inc')
-rw-r--r--mysql-test/include/common-tests.inc10
1 files changed, 7 insertions, 3 deletions
diff --git a/mysql-test/include/common-tests.inc b/mysql-test/include/common-tests.inc
index 204b6d4dd6b..347760bf3c0 100644
--- a/mysql-test/include/common-tests.inc
+++ b/mysql-test/include/common-tests.inc
@@ -1537,8 +1537,10 @@ select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 25
# Test of left join.
#
-SET @save_optimizer_switch=@@optimizer_switch;
-SET optimizer_switch='outer_join_with_cache=off';
+SET @local_optimizer_switch=@@optimizer_switch;
+set @local_join_cache_level=@@join_cache_level;
+set @@join_cache_level=2;
+set optimizer_switch='outer_join_with_cache=off,join_cache_hashed=off';
insert into t2 (fld1, companynr) values (999999,99);
@@ -1572,7 +1574,7 @@ explain select companynr,companyname from t4 left join t2 using (companynr) wher
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0;
explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0;
-SET optimizer_switch=@save_optimizer_switch;
+SET @@optimizer_switch=@local_optimizer_switch;
#
# Joins with forms.
@@ -1581,6 +1583,8 @@ SET optimizer_switch=@save_optimizer_switch;
select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
+SET @@join_cache_level=@local_join_cache_level;
+
#
# Search using 'or' with the same referens group.
# An interval search will be done first with the first table and after that