summaryrefslogtreecommitdiff
path: root/mysql-test/main
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2021-03-24 15:05:24 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2021-04-21 10:21:44 +0400
commit707d8653c46d4f457aecfee4eacf678a2ccc87c7 (patch)
tree25b1b226ae1cd98f031c64e1d7cbf2cf3bf20280 /mysql-test/main
parent7075955f4ed655fb1c78031b9f42d16cd5b59389 (diff)
downloadmariadb-git-707d8653c46d4f457aecfee4eacf678a2ccc87c7.tar.gz
MDEV-25228 JSON_TABLE: Server crashes in Query_cache::unlink_table.
JSON_TABLE shojldn't be counted in the query_cache.
Diffstat (limited to 'mysql-test/main')
-rw-r--r--mysql-test/main/query_cache.result7
-rw-r--r--mysql-test/main/query_cache.test7
2 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/main/query_cache.result b/mysql-test/main/query_cache.result
index c835e25e396..020c7472694 100644
--- a/mysql-test/main/query_cache.result
+++ b/mysql-test/main/query_cache.result
@@ -2227,6 +2227,13 @@ SHOW STATUS LIKE 'Qcache_inserts';
Variable_name Value
Qcache_inserts 0
drop table t1;
+#
+# MDEV-25228 JSON_TABLE: Server crashes in Query_cache::unlink_table.
+#
+CREATE TABLE t (a INT);
+SELECT * FROM t JOIN JSON_TABLE('{}' , '$' COLUMNS(b FOR ORDINALITY)) AS jt;
+a b
+DROP TABLE t;
restore defaults
SET GLOBAL query_cache_type= default;
SET GLOBAL query_cache_size=@save_query_cache_size;
diff --git a/mysql-test/main/query_cache.test b/mysql-test/main/query_cache.test
index 0d747b97acc..66785b42c36 100644
--- a/mysql-test/main/query_cache.test
+++ b/mysql-test/main/query_cache.test
@@ -1818,6 +1818,13 @@ select * from t1, json_table(t1.a, '$' columns (f varchar(20) path '$.a')) as jt
SHOW STATUS LIKE 'Qcache_inserts';
drop table t1;
+--echo #
+--echo # MDEV-25228 JSON_TABLE: Server crashes in Query_cache::unlink_table.
+--echo #
+CREATE TABLE t (a INT);
+SELECT * FROM t JOIN JSON_TABLE('{}' , '$' COLUMNS(b FOR ORDINALITY)) AS jt;
+DROP TABLE t;
+
--echo restore defaults
SET GLOBAL query_cache_type= default;
SET GLOBAL query_cache_size=@save_query_cache_size;