diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
commit | a175314c3e5827eb193872241446f2f8f5c9d33c (patch) | |
tree | cd3d60ca99ae00829c52a6ca79150a5b6e62528b /mysql-test/main/subselect_debug.test | |
parent | Initial commit. (diff) | |
download | mariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.tar.xz mariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.zip |
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/subselect_debug.test')
-rw-r--r-- | mysql-test/main/subselect_debug.test | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/main/subselect_debug.test b/mysql-test/main/subselect_debug.test new file mode 100644 index 00000000..f27867dc --- /dev/null +++ b/mysql-test/main/subselect_debug.test @@ -0,0 +1,27 @@ +--source include/have_debug.inc + +# +# Bug #37627: Killing query with sum(exists()) or avg(exists()) reproducibly +# crashes server +# + +CREATE TABLE t1(id INT); +INSERT INTO t1 VALUES (1),(2),(3),(4); +INSERT INTO t1 SELECT a.id FROM t1 a,t1 b,t1 c,t1 d; +# Setup the mysqld to crash at certain point +SET @orig_debug=@@debug; +SET GLOBAL debug_dbug="d,subselect_exec_fail"; +SELECT SUM(EXISTS(SELECT RAND() FROM t1)) FROM t1; +SELECT REVERSE(EXISTS(SELECT RAND() FROM t1)); +SET GLOBAL debug_dbug=@orig_debug; +DROP TABLE t1; + +# +# MDEV-5284 Assertion `!(*expr)->fixed' fails in replace_where_subcondition with IN suquery +# + +create table t1 (i int); +insert into t1 values (1),(2); +select * from t1 where (i < 200 or i = 300) and i in (select i from t1); +drop table t1; + |