diff options
Diffstat (limited to 'mysql-test/t/union.test')
-rw-r--r-- | mysql-test/t/union.test | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index cc93fbd715a..a57ab469ac2 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -913,4 +913,13 @@ SELECT a FROM (SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY c) AS test; DROP TABLE t1; +# +# Bug#23345: Wrongly allowed INTO in a non-last select of a UNION. +# +--error 1221 +(select 1 into @var) union (select 1); +(select 1) union (select 1 into @var); +select @var; +--error 1172 +(select 2) union (select 1 into @var); --echo End of 5.0 tests |