Bug #66407 Workbench SQL Editor now executes the next line after your cursor if your cursor
Submitted: 15 Aug 2012 20:17 Modified: 23 Aug 2012 11:45
Reporter: Peter Kniaz Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:5.2.41/5.2.42 OS:Windows (Microsoft Windows 7 Service Pack 1 (build 7601), 64-bit)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[15 Aug 2012 20:17] Peter Kniaz
Description:
Workbench SQL Editor now executes the next line after your cursor if your cursor is after the semicolon of the line above. This was not the case in earlier versions.  It is natural to type a line in, and run it, and expect the line to run that your curor is on.  This has caused me to inadvertantly run an update or drop table I didn't want to run!

----- Developer Notes -----

MySQL Workbench CE for Windows version 5.2.41  revision 9727
Configuration Directory: C:\Users\pkniaz\AppData\Roaming\MySQL\Workbench
Data Directory: C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE
Cairo Version: 1.8.8
OS: Microsoft Windows 7  Service Pack 1 (build 7601), 64-bit
CPU: 4x Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz, 7.9 GiB RAM
Active video adapter (0): Intel(R) HD Graphics 4000
Installed video RAM: -1984 MB
Current video mode: 1366 x 768 x 4294967296 colors
Used bit depth: 32
Driver version: 8.15.10.2639
Installed display drivers: igdumd64.dll,igd10umd64.dll,igd10umd64.dll,igdumd32,igd10umd32,igd10umd32
Current user language: English (United States)

How to repeat:
Put two queries in the SQL editor window and put your cursor after the semicolon of the first one but on the same line.
[16 Aug 2012 1:47] MySQL Verification Team
Thank you for the bug report. Work-around is to select the 1st line then it executes just the first one.
[16 Aug 2012 7:46] Peter Laursen
In SQL whitespace is insignificant.  Also linebreaks.  DELIMITER (whether standard ";" or a user defined DELIMITER) defines where a statement starts and stops - not linebreaks or other whitespace characters.

The current behavior is the correct one, I think.

Peter
(not a MySQL/Oracle person)
[23 Aug 2012 11:45] Mike Lischke
Duplicate of Bug #66505.