Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
13 changed files
with
146 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # | ||
| # MDEV-15492: Subquery crash similar to MDEV-10050 | ||
| # | ||
| 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; | ||
| 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)"; | ||
| PREPARE stmt2 FROM "SELECT * FROM t1 WHERE a in (SELECT a FROM v)"; | ||
| EXECUTE stmt2; | ||
| a | ||
| EXECUTE stmt1; | ||
| a | ||
| INSERT INTO t2 VALUES (0); | ||
| EXECUTE stmt1; | ||
| a | ||
| START TRANSACTION; | ||
| EXECUTE stmt1; | ||
| a | ||
| DROP VIEW v; | ||
| DROP TABLE t1, t2; | ||
| SET GLOBAL query_cache_size= @qcs.save, query_cache_type= @qct.save; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters