Bug #65702 | parentheses around table with union | ||
---|---|---|---|
Submitted: | 21 Jun 2012 21:01 | Modified: | 20 Aug 2013 20:11 |
Reporter: | Richard Ejem | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Parser | Severity: | S3 (Non-critical) |
Version: | 5.5.9, 5.5.25, 5.5.26 | OS: | Any (win 7 x64) |
Assigned to: | CPU Architecture: | Any | |
Tags: | parentheses, regression, UNION |
[21 Jun 2012 21:01]
Richard Ejem
[22 Jun 2012 4:17]
Valeriy Kravchuk
Thank you for the bug report. Indeed, it works in 5.1.x: macbook-pro:5.5 openxs$ bin/mysql -uroot test Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.1.64-debug Source distribution Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> SELECT * FROM ((select 1) x) UNION SELECT * FROM ((select 2) y); +---+ | 1 | +---+ | 1 | | 2 | +---+ 2 rows in set (0.07 sec) but NOT in 5.5.x: macbook-pro:5.5 openxs$ bin/mysql -uroot test Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.26-debug Source distribution Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> SELECT * FROM ((select 1) x) UNION SELECT * FROM ((select 2) y); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 See bug #65381 also. Root case may be the same.
[20 Aug 2013 14:16]
Gleb Shchepa
The duplicate of this bug has been fixed in 5.5.32.