summaryrefslogtreecommitdiff
path: root/mysql-test/main/union.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/union.test')
-rw-r--r--mysql-test/main/union.test18
1 files changed, 9 insertions, 9 deletions
diff --git a/mysql-test/main/union.test b/mysql-test/main/union.test
index f86cae87524..463eb609151 100644
--- a/mysql-test/main/union.test
+++ b/mysql-test/main/union.test
@@ -973,12 +973,12 @@ DROP TABLE t1;
#
# Bug#23345: Wrongly allowed INTO in a non-last select of a UNION.
+# (fixed)
#
---error 1221
+--error ER_CANT_USE_OPTION_HERE
(select 1 into @var) union (select 1);
(select 1) union (select 1 into @var);
-select @var;
---error 1172
+--error ER_TOO_MANY_ROWS
(select 2) union (select 1 into @var);
#
@@ -1102,11 +1102,11 @@ SELECT a INTO DUMPFILE 'union.out.file2' FROM (
SELECT a FROM t1 UNION SELECT a INTO @v FROM t1;
SELECT a FROM t1 UNION SELECT a INTO OUTFILE 'union.out.file5' FROM t1;
SELECT a FROM t1 UNION SELECT a INTO OUTFILE 'union.out.file6' FROM t1;
---error ER_PARSE_ERROR
+--error ER_CANT_USE_OPTION_HERE
SELECT a INTO @v FROM t1 UNION SELECT a FROM t1;
---error ER_PARSE_ERROR
+--error ER_CANT_USE_OPTION_HERE
SELECT a INTO OUTFILE 'union.out.file7' FROM t1 UNION SELECT a FROM t1;
---error ER_PARSE_ERROR
+--error ER_CANT_USE_OPTION_HERE
SELECT a INTO DUMPFILE 'union.out.file8' FROM t1 UNION SELECT a FROM t1;
-- echo # Tests fix in parser rule query_expression_body.
@@ -1361,15 +1361,15 @@ SET @@global.slow_query_log= @old_slow_query_log;
CREATE TABLE t1 (a int);
CREATE TABLE t2 (b int);
CREATE TABLE t3 (c int);
-SELECT a FROM t1 UNION SELECT b FROM t2 JOIN (t3) ON ( t2.b = t3.c );
+SELECT a FROM t1 UNION SELECT b FROM t2 JOIN t3 ON ( t2.b = t3.c );
DROP TABLE t1, t2, t3;
CREATE TABLE t1 (pk int NOT NULL);
CREATE TABLE t2 (pk int NOT NULL, fk int NOT NULL);
-SELECT t1.pk FROM t1 LEFT JOIN (t2) ON (t1.pk = t2.fk)
+SELECT t1.pk FROM t1 LEFT JOIN t2 ON (t1.pk = t2.fk)
UNION
-SELECT t1.pk FROM t1 LEFT JOIN (t2) ON (t1.pk = t2.fk);
+SELECT t1.pk FROM t1 LEFT JOIN t2 ON (t1.pk = t2.fk);
DROP TABLE t1,t2;