Commit 42aad65b authored by Sergei Petrunia's avatar Sergei Petrunia

MDEV-24898: Server crashes in st_select_lex::next_select

Add a testcase
parent 393cf51c
......@@ -2836,4 +2836,15 @@ GROUP BY 1
)
1
DROP TABLE t1;
#
# MDEV-24898: Server crashes in st_select_lex::next_select / Item_subselect::is_expensive
# (Testcase)
#
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (3),(4);
SELECT 1 IN (SELECT (SELECT a FROM t1) AS x FROM t2 GROUP BY x);
ERROR 21000: Subquery returns more than 1 row
drop table t1,t2;
# End of 10.3 tests
......@@ -2340,4 +2340,17 @@ SELECT
DROP TABLE t1;
--echo #
--echo # MDEV-24898: Server crashes in st_select_lex::next_select / Item_subselect::is_expensive
--echo # (Testcase)
--echo #
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2); # Optional, fails either way
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (3),(4); # Optional, fails either way
--error ER_SUBQUERY_NO_1_ROW
SELECT 1 IN (SELECT (SELECT a FROM t1) AS x FROM t2 GROUP BY x);
drop table t1,t2;
--echo # End of 10.3 tests
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment