From 0b751b4042ea671ce732b7bcc7104071865e11b3 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 13 Feb 2005 22:35:52 +0000 Subject: 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. --- mysql-test/t/union.test | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mysql-test/t/union.test') 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; -- cgit v1.2.1