Skip to content

Commit 48655ce

Browse files
committed
test case for Bug #23303485 : HANDLE_FATAL_SIGNAL (SIG=11) IN SUBSELECT_UNION_ENGINE::NO_ROWS
1 parent 9fefe97 commit 48655ce

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

mysql-test/r/subselect2.result

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,3 +384,13 @@ DEALLOCATE PREPARE stmt;
384384
DROP VIEW v1;
385385
DROP TABLE t1,t2,t3;
386386
set optimizer_switch=@subselect2_test_tmp;
387+
create table t1 (a int);
388+
create table t2 (a int);
389+
create table t3(a int);
390+
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
391+
insert into t2 select a from t1;
392+
insert into t3 select a from t1;
393+
select null in (select a from t1 where a < out3.a union select a from t2 where
394+
(select a from t3) +1 < out3.a+1) from t3 out3;
395+
ERROR 21000: Subquery returns more than 1 row
396+
drop table t1, t2, t3;

mysql-test/t/subselect2.test

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,3 +398,16 @@ DROP TABLE t1,t2,t3;
398398

399399
set optimizer_switch=@subselect2_test_tmp;
400400

401+
#
402+
# Bug #23303485 : HANDLE_FATAL_SIGNAL (SIG=11) IN SUBSELECT_UNION_ENGINE::NO_ROWS
403+
#
404+
create table t1 (a int);
405+
create table t2 (a int);
406+
create table t3(a int);
407+
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
408+
insert into t2 select a from t1;
409+
insert into t3 select a from t1;
410+
--error ER_SUBQUERY_NO_1_ROW
411+
select null in (select a from t1 where a < out3.a union select a from t2 where
412+
(select a from t3) +1 < out3.a+1) from t3 out3;
413+
drop table t1, t2, t3;

0 commit comments

Comments
 (0)