Commit 2f6912da authored by Sergei Petrunia's avatar Sergei Petrunia

MDEV-24898: Server crashes in st_select_lex::next_select

(trivial backport to 10.2)
Add a testcase
parent c72c77ca
......@@ -2772,3 +2772,14 @@ 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;
......@@ -2269,3 +2269,16 @@ 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;
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