summaryrefslogtreecommitdiff
path: root/mysql-test/r/union.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/union.result')
-rw-r--r--mysql-test/r/union.result17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index 1ac688787c6..75255d558c4 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -1845,3 +1845,20 @@ dev
SELECT(SELECT 1 AS a FROM dual ORDER BY a DESC LIMIT 1) AS dev;
dev
1
+#
+# LP bug#1010729: Unexpected syntax error from UNION
+# (bug #54382) with single-table join nest
+#
+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 );
+a
+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)
+UNION
+SELECT t1.pk FROM t1 LEFT JOIN (t2) ON (t1.pk = t2.fk);
+pk
+DROP TABLE t1,t2;