diff options
author | Igor Babaev <igor@askmonty.org> | 2012-06-08 22:15:49 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2012-06-08 22:15:49 -0700 |
commit | 10f42e2c33dff630559299e4151e10a84ce39fd8 (patch) | |
tree | c201a24f62b2e2dbfa1114d9d1eee76477d61d8a /mysql-test/r | |
parent | ca5473f1db6dc63baffc736737e54bdffd6449a6 (diff) | |
download | mariadb-git-10f42e2c33dff630559299e4151e10a84ce39fd8.tar.gz |
Fixed LP bug #1010729.
The bug prevented acceptance of UNION queries whose non-first select
clauses contained join expressions with degenerated single-table nests
as valid queries.
The bug was introduced into mysql-5.5 code line by the patch for
bug 33204.
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/union.result | 17 |
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; |