Bug #40802 | Incorrect query splitting on Windows | ||
---|---|---|---|
Submitted: | 17 Nov 2008 20:08 | Modified: | 9 Jan 2009 10:00 |
Reporter: | Björn Voigt (OCA) | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Query Browser | Severity: | S3 (Non-critical) |
Version: | 5.0r14 | OS: | Windows |
Assigned to: | Mike Lischke | CPU Architecture: | Any |
[17 Nov 2008 20:08]
Björn Voigt
[20 Nov 2008 23:57]
Mark McAulay
This happens in 1.2.14 and is a real pain for pasted in queries. It would be good if it was fixed.
[21 Nov 2008 17:02]
MySQL Verification Team
Thank you for the bug report. Select Now();Enters open a new line and Select Now();Select User(); gives a message of multiple statements that only the first one will be executed.
[8 Jan 2009 13:07]
Mike Lischke
This implementation is by design. The query area allows to contain more than one query (separated by semikolon), only that no query must start on the same line where another one ends. The query where the cursor is in can be executed. Thus, if your cursor is after the semicolon it tries to find a new query somewhere after that point. If there is none, you get the known error message.
[8 Jan 2009 13:12]
Mike Lischke
I should add that this feature works by line, hence the limitation that you cannot have one query starting on a line where another one ends. However, it has also the useful consequence that you can have your cursor after a semicolon, if you stay on the same line as where the query ends and nothing but white spaces follow. Btw: the currently active lines are visible (because the others are dimmed, using a light gray background). So you can see what is the active query and gets executed if you trigger that.
[9 Jan 2009 10:00]
Björn Voigt
But again I want to point out, that the Linux version does not give an error on point 2) of the description of this bug and executes the query. If you want to have this bug marked as "Not a Bug", it remains an incompatibility between the Windows and Linux version. I know that the GUI of the Windows and Linux version are programmed in different programming languages. Anyway it's a bit unclear why the query parsing code is also incompatible. I suggest to use a simple trim() function to remove trailing whitespace in the query. This would fix point 2).