summaryrefslogtreecommitdiff
path: root/mysql-test/t/query_cache_debug.test
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-02-01 21:55:30 +0100
committerSergei Golubchik <serg@mariadb.org>2018-02-02 10:09:44 +0100
commitd4df7bc9b1fbdfb5c98134091a9ff998af60954f (patch)
treedfd2f5128ccf94b6e86d2475aee23acf53fa868c /mysql-test/t/query_cache_debug.test
parent80d3eee072025f34984e474ea160651eac9e11e5 (diff)
parent96cb428b350ba48ee17ad9968d08f5318e48258c (diff)
downloadmariadb-git-d4df7bc9b1fbdfb5c98134091a9ff998af60954f.tar.gz
Merge branch 'github/10.0' into 10.1
Diffstat (limited to 'mysql-test/t/query_cache_debug.test')
-rw-r--r--mysql-test/t/query_cache_debug.test52
1 files changed, 52 insertions, 0 deletions
diff --git a/mysql-test/t/query_cache_debug.test b/mysql-test/t/query_cache_debug.test
index 5eba778cf9e..cebe5b1c88f 100644
--- a/mysql-test/t/query_cache_debug.test
+++ b/mysql-test/t/query_cache_debug.test
@@ -320,3 +320,55 @@ RESET QUERY CACHE;
DROP TABLE t1;
SET GLOBAL query_cache_size= DEFAULT;
SET GLOBAL query_cache_type= DEFAULT;
+
+--echo #
+--echo # MDEV-14526: MariaDB keeps crashing under load when
+--echo # query_cache_type is changed
+--echo #
+
+CREATE TABLE t1 (
+ `id` int(10) NOT NULL AUTO_INCREMENT,
+ `k` int(10) default '0',
+ PRIMARY KEY (`id`))
+ENGINE=MyISAM;
+
+INSERT IGNORE INTO t1 VALUES
+ (NULL,1),(NULL,8),(NULL,NULL),(NULL,NULL),(NULL,4),(NULL,9),(NULL,7),
+ (NULL,3),(NULL,NULL),(NULL,2),(NULL,3),(NULL,NULL),(NULL,2),(NULL,7),
+ (NULL,1),(NULL,2),(NULL,4),(NULL,NULL),(NULL,1),(NULL,1),(NULL,4);
+
+SET GLOBAL query_cache_size= 1024*1024;
+SET GLOBAL query_cache_type= 1;
+
+--connect (con2,localhost,root,,test)
+--connect (con1,localhost,root,,test)
+set debug_sync="wait_in_query_cache_store_query SIGNAL parked WAIT_FOR go";
+--send
+
+ SELECT DISTINCT id FROM t1 WHERE id BETWEEN 5603 AND 16218 ORDER BY k;
+
+--connection default
+
+set debug_sync="now WAIT_FOR parked";
+--connection con2
+--send
+ SET GLOBAL query_cache_type= 0;
+
+--connection default
+set debug_sync="now SIGNAL go";
+
+--connection con1
+--reap
+--connection con2
+--reap
+
+# Cleanup
+--disconnect con1
+--disconnect con2
+--connection default
+set debug_sync= 'RESET';
+DROP TABLE t1;
+SEt GLOBAL query_cache_size= DEFAULT;
+SEt GLOBAL query_cache_type= DEFAULT;
+
+--echo # End of 5.5 tests