summaryrefslogtreecommitdiff
path: root/mysql-test/main/analyze_format_json.test
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2023-05-17 14:58:11 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2023-05-17 14:58:11 +0200
commit2543673dd22782f59299fd2e72179601892bd967 (patch)
treeb73641bd88c9d1572203c75da618fce1937518e8 /mysql-test/main/analyze_format_json.test
parent4e5b771e980edfdad5c5414aa62c81d409d585a4 (diff)
parentef911553f442cbb1baaac2af44c38b54fd058c41 (diff)
downloadmariadb-git-bb-11.1-release.tar.gz
Merge branch '11.0' into 11.1bb-11.1-release
Diffstat (limited to 'mysql-test/main/analyze_format_json.test')
-rw-r--r--mysql-test/main/analyze_format_json.test42
1 files changed, 42 insertions, 0 deletions
diff --git a/mysql-test/main/analyze_format_json.test b/mysql-test/main/analyze_format_json.test
index 84625f125fb..001616304cf 100644
--- a/mysql-test/main/analyze_format_json.test
+++ b/mysql-test/main/analyze_format_json.test
@@ -228,3 +228,45 @@ create table t2 as select * from t1;
--source include/analyze-format.inc
analyze format=json select a, (select t2.b from t2 where t2.a<t1.a order by t2.c limit 1) from t1 where t1.a<0;
drop table t0,t1,t2;
+
+
+--echo #
+--echo # MDEV-30806: ANALYZE FORMAT=JSON: better support for BNL and BNL-H joins
+--echo #
+--source include/have_sequence.inc
+create table t10 (
+ a int,
+ b int
+);
+insert into t10 select seq, seq/3 from seq_0_to_999;
+
+create table t11 (
+ a int,
+ b int
+);
+insert into t11 select seq, seq/5 from seq_0_to_999;
+
+analyze table t10,t11 persistent for all;
+
+--source include/analyze-format.inc
+analyze format=json
+select * from t10, t11
+where
+ t10.a < 700 and
+ t11.a < 100
+ and t10.b=t11.b;
+
+set @tmp=@@join_cache_level, join_cache_level=6;
+
+--source include/analyze-format.inc
+analyze format=json
+select * from t10, t11
+where
+ t10.a < 700 and
+ t11.a < 100
+ and t10.b=t11.b;
+
+set join_cache_level=@tmp;
+drop table t10, t11;
+
+