summaryrefslogtreecommitdiff
path: root/mysql-test/t/union.test
diff options
context:
space:
mode:
authorunknown <acurtis@pcgem.rdg.cyberkinetica.com>2005-02-13 22:35:52 +0000
committerunknown <acurtis@pcgem.rdg.cyberkinetica.com>2005-02-13 22:35:52 +0000
commita8d2152f973dc56897725356cd0f88310a7689b8 (patch)
tree8166a91c79593f9015c764e76b75588c02f949ff /mysql-test/t/union.test
parent0d57871425c1a4a2b469cecad92e1ce41ba9b572 (diff)
downloadmariadb-git-a8d2152f973dc56897725356cd0f88310a7689b8.tar.gz
Bug#2435
Alter handling for UNION syntax Tests for UNION and parentheses mysql-test/r/union.result: Bug#2435 Tests for UNION and parentheses mysql-test/t/union.test: Bug#2435 Tests for UNION and parentheses sql/sql_yacc.yy: Bug#2435 Amend handling of UNION with parentheses.
Diffstat (limited to 'mysql-test/t/union.test')
-rw-r--r--mysql-test/t/union.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test
index 90b2197603b..82f26f63254 100644
--- a/mysql-test/t/union.test
+++ b/mysql-test/t/union.test
@@ -699,3 +699,15 @@ union
order by sdate;
show columns from t4;
drop table t1, t2, t3, t4;
+
+#
+# Bug #2435 UNION with parentheses not supported
+#
+create table t1 (a int not null, b char (10) not null);
+insert into t1 values(1,'a'),(2,'b'),(3,'c'),(3,'c');
+select * from ((select * from t1 limit 1)) a;
+select * from ((select * from t1 limit 1) union (select * from t1 limit 1)) a;
+select * from ((select * from t1 limit 1) union (select * from t1 limit 1) union (select * from t1 limit 1)) a;
+select * from ((((select * from t1))) union (select * from t1) union (select * from t1)) a;
+select * from ((select * from t1) union (((select * from t1))) union (select * from t1)) a;
+drop table t1;