summaryrefslogtreecommitdiff
path: root/mysql-test/main/ps_qc_innodb.test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-05-09 17:06:21 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-05-09 17:06:27 +0300
commit85ccdd9ff0a7cae9554ed6da67b42480b5264e1d (patch)
tree87accbf4a24129ada77b8771ec7981469fa27510 /mysql-test/main/ps_qc_innodb.test
parentd94a9553db0afee3a29f3fff0511e9a1cb5b83d2 (diff)
downloadmariadb-git-85ccdd9ff0a7cae9554ed6da67b42480b5264e1d.tar.gz
Rename a test (fix merge error)
Diffstat (limited to 'mysql-test/main/ps_qc_innodb.test')
-rw-r--r--mysql-test/main/ps_qc_innodb.test35
1 files changed, 35 insertions, 0 deletions
diff --git a/mysql-test/main/ps_qc_innodb.test b/mysql-test/main/ps_qc_innodb.test
new file mode 100644
index 00000000000..e09a2bf4070
--- /dev/null
+++ b/mysql-test/main/ps_qc_innodb.test
@@ -0,0 +1,35 @@
+--source include/have_query_cache.inc
+--source include/have_innodb.inc
+
+--echo #
+--echo # MDEV-15492: Subquery crash similar to MDEV-10050
+--echo #
+
+SET @qcs.save= @@global.query_cache_size, @qct.save= @@global.query_cache_type;
+SET GLOBAL query_cache_size= 512*1024*1024, query_cache_type= ON;
+
+--connect (con1,localhost,root,,test)
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+CREATE TABLE t2 (b INT) ENGINE=InnoDB;
+CREATE VIEW v AS select a from t1 join t2;
+
+PREPARE stmt1 FROM "SELECT * FROM t1 WHERE a in (SELECT a FROM v)";
+
+--connect (con2,localhost,root,,test)
+PREPARE stmt2 FROM "SELECT * FROM t1 WHERE a in (SELECT a FROM v)";
+EXECUTE stmt2;
+
+--connection con1
+EXECUTE stmt1;
+INSERT INTO t2 VALUES (0);
+EXECUTE stmt1;
+START TRANSACTION;
+EXECUTE stmt1;
+
+# Cleanup
+--disconnect con1
+--disconnect con2
+--connection default
+DROP VIEW v;
+DROP TABLE t1, t2;
+SET GLOBAL query_cache_size= @qcs.save, query_cache_type= @qct.save;