MDEV-24898: Server crashes in st_select_lex::next_select
(trivial backport to 10.2) Add a testcase
This commit is contained in:
parent
c72c77ca3b
commit
2f6912dabc
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user