Bug #58732 Limit in Preferences in wrong position in SELECT INTO
Submitted: 4 Dec 2010 16:59 Modified: 16 Nov 2011 6:25
Reporter: Polychronis Kontos Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.30CE OS:Windows (XP Home)
Assigned to: CPU Architecture:Any
Tags: limit, select into

[4 Dec 2010 16:59] Polychronis Kontos
Description:
It seems that when LIMIT is active in Preferences, LIMIT n is forming SQL stmnt 'SELECT expression LIMIT n INTO var_name' which is illegal.

How to repeat:
1) Limit rows with LIMIT 1000 is checked in Preferences>SQL Editor
2) Give SELECT 0 INTO @vi;
3) An error occurs after excecuting the statement. Without Limit rows checked, no errors occur.
[4 Dec 2010 19:59] MySQL Verification Team
Thank you for the bug report.
[5 Dec 2010 14:25] Peter Laursen
SELECT 0 INTO @vi LIMIT 1000;

... would be invalid as well BTW!
[16 Nov 2011 6:25] Philip Olson
Fixed as of 5.2.36:

+        Enabling the <literal>Limit Rows</literal> SQL editor preference
+        would cause invalid SQL syntax with <literal>SELECT
+        INTO</literal> statements.