diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2023-05-05 11:09:46 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2023-05-05 11:09:46 +0200 |
commit | 1c394795980df537e0ff1083b330a6d900cf7717 (patch) | |
tree | 0d08597549bfd2c8cb87ff76e821295ee62ded95 /mysql-test | |
parent | db3342b325f81c7f928d722a469f9ceceb6dc30d (diff) | |
parent | b735ca47738a1d2e995a429f40afd620eb7d8843 (diff) | |
download | mariadb-git-1c394795980df537e0ff1083b330a6d900cf7717.tar.gz |
Merge branch '10.5' into 10.6
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/main/derived_split_innodb.result | 16 | ||||
-rw-r--r-- | mysql-test/main/derived_split_innodb.test | 23 |
2 files changed, 39 insertions, 0 deletions
diff --git a/mysql-test/main/derived_split_innodb.result b/mysql-test/main/derived_split_innodb.result index fc86e60bb1f..188a7f334b1 100644 --- a/mysql-test/main/derived_split_innodb.result +++ b/mysql-test/main/derived_split_innodb.result @@ -807,5 +807,21 @@ a b a b a b grp_id count(*) 5 5 5 2 5 3 5 100 drop table t1,t2,t3; drop table t10, t11; +# +# MDEV-31194: Server crash or assertion failure with join_cache_level=4 +# (a followup to the above bug, MDEV-26301) +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (3),(4); +CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=Aria; +INSERT INTO t2 VALUES (1),(2); +set @tmp1= @@optimizer_switch, @tmp2= @@join_cache_level; +set +optimizer_switch= 'derived_with_keys=off', +join_cache_level= 4; +SELECT t1.* FROM t1 JOIN (SELECT id, COUNT(*) FROM t2 GROUP BY id) sq ON sq.id= t1.a; +a +set optimizer_switch= @tmp1, join_cache_level= @tmp2; +DROP TABLE t1, t2; # End of 10.4 tests SET GLOBAL innodb_stats_persistent=@save_innodb_stats_persistent; diff --git a/mysql-test/main/derived_split_innodb.test b/mysql-test/main/derived_split_innodb.test index 2dd7988f223..6ccbc31d886 100644 --- a/mysql-test/main/derived_split_innodb.test +++ b/mysql-test/main/derived_split_innodb.test @@ -443,6 +443,29 @@ eval $q; drop table t1,t2,t3; drop table t10, t11; + +--echo # +--echo # MDEV-31194: Server crash or assertion failure with join_cache_level=4 +--echo # (a followup to the above bug, MDEV-26301) +--echo # +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (3),(4); + +CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=Aria; +INSERT INTO t2 VALUES (1),(2); + +set @tmp1= @@optimizer_switch, @tmp2= @@join_cache_level; +set + optimizer_switch= 'derived_with_keys=off', + join_cache_level= 4; + +SELECT t1.* FROM t1 JOIN (SELECT id, COUNT(*) FROM t2 GROUP BY id) sq ON sq.id= t1.a; + +set optimizer_switch= @tmp1, join_cache_level= @tmp2; + +# Cleanup +DROP TABLE t1, t2; + --echo # End of 10.4 tests SET GLOBAL innodb_stats_persistent=@save_innodb_stats_persistent; |