summaryrefslogtreecommitdiff
path: root/mysql-test/main/join_cache.test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-03-27 17:12:28 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2021-03-27 17:12:28 +0200
commit7ae37ff74fc18c391bd0d3fd1fbf6afafe966435 (patch)
tree792d8852dd9aaa06b5ddfb374f02774b18ed150c /mysql-test/main/join_cache.test
parentd1ff2c583f452d8e1899f800609c329c998f0a33 (diff)
parent3157fa182accab86a4dea45edbcbca4eb5157723 (diff)
downloadmariadb-git-7ae37ff74fc18c391bd0d3fd1fbf6afafe966435.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/main/join_cache.test')
-rw-r--r--mysql-test/main/join_cache.test27
1 files changed, 26 insertions, 1 deletions
diff --git a/mysql-test/main/join_cache.test b/mysql-test/main/join_cache.test
index 506e613887b..b4271f648e3 100644
--- a/mysql-test/main/join_cache.test
+++ b/mysql-test/main/join_cache.test
@@ -4106,6 +4106,30 @@ DROP TABLE t1,t2,t3,t4;
set join_cache_level=@save_join_cache_level;
--echo #
+--echo # MDEV-24767: forced BNLH used for equi-join supported by compound index
+--echo #
+
+create table t1 (a int, b int, c int ) engine=myisam ;
+create table t2 (a int, b int, c int, primary key (c,a,b)) engine=myisam ;
+insert into t1 values (3,4,2), (5,6,4);
+insert into t2 values (3,4,2), (5,6,4);
+
+let $q=
+select t1.a, t1.b, t1.c from t1,t2
+ where t2.a = t1.a and t2.b = t1.b and t2.c=t1.c;
+
+eval $q;
+eval explain $q;
+
+set join_cache_level=3;
+eval $q;
+eval explain $q;
+
+drop table t1,t2;
+
+set join_cache_level=@save_join_cache_level;
+
+--echo #
--echo # MDEV-21243: Join buffer: condition is checked in wrong place for range access
--echo #
create table t1(a int primary key);
@@ -4145,7 +4169,8 @@ where
drop table t1,t2,t3;
--echo # End of 10.3 tests
-# The following command must be the last one in the file
+
+# The following command must be the last one in the file
set @@optimizer_switch=@save_optimizer_switch;
set global innodb_stats_persistent= @innodb_stats_persistent_save;