Bug #62524 | MySQL Workbench does not allow LIMIT statements at the end of UNION selects | ||
---|---|---|---|
Submitted: | 23 Sep 2011 21:25 | Modified: | 3 Feb 2012 1:37 |
Reporter: | Brandon Johnson | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Workbench: SQL Editor | Severity: | S2 (Serious) |
Version: | 5.2.34, 5.2.35, 5.2.36, 5.2.37 | OS: | Windows |
Assigned to: | CPU Architecture: | Any |
[23 Sep 2011 21:25]
Brandon Johnson
[24 Sep 2011 5:45]
Valeriy Kravchuk
Thank you for the bug report. Verified just as described with recent 5.2.35 on Windows XP.
[28 Dec 2011 15:47]
Brandon Johnson
This only occurs when the Preferences option of "Limit Rows" is enabled, and a query has a union with a trailing limit. This query works: select COUNT(*) from mysql.user UNION (select count(*) from mysql.db LIMIT 0,500) UNION select count(*) from mysql.host; This query doesn't: select COUNT(*) from mysql.user UNION (select count(*) from mysql.db LIMIT 0,500) UNION select count(*) from mysql.host LIMIT 0,500;
[3 Feb 2012 1:37]
Philip Olson
Fixed as of 5.2.38: Queries containing a "UNION" are now excluded from the automatic addition of the "LIMIT" clause, when the "Limit Rows" preference is enabled.