Bug #73262 Executing a sql statement scrolls the sql window to the top
Submitted: 10 Jul 2014 18:43 Modified: 28 Aug 2014 21:54
Reporter: James Reed Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:6.1.7 OS:Windows
Assigned to: CPU Architecture:Any

[10 Jul 2014 18:43] James Reed
Description:
This is a bug that was fixed in 6.1.2 but has re-appeared in 6.1.4.  If my SQL windows has enough statements to require a scroll bar, if I scroll down to the bottom statement and execute it, the SQL windows automatically scrolls back to the top.  This is really irritating because I then have to scroll back down to the statement I was working on.

In 6.1.2 it was changed so it would scroll to the top and then scroll back down to wherever my cursor was.  This was much better but still not ideal.  Ideally it would not scroll at all and just leave the SQL window alone when executing statements.

Here is the related text from the Change Log for 6.1.2:

Selecting an element in a section (when the section was longer than the visible part of the overview panel) would scroll the view back up to the top of the panel, instead of preserving the current cursor focus. (Bug #14520978, Bug #66420)

How to repeat:
Add a bunch of SQL statements to the SQL window, enough to require scrolling.  Scroll to the bottom statement and execute it.  The SQL window will automatically scroll to the top and the statement you executed will no longer be in view.

Suggested fix:
Modify it so executing a SQL statement does not do anything to the SQL window.  Just leave it alone and don't do any scrolling.
[11 Jul 2014 11:13] MySQL Verification Team
Hello James,

Thank you for the report.
Verified as described on Win7/OL6 with WB 6.1.7

Thanks,
Umesh
[28 Aug 2014 21:54] Philip Olson
Fixed as of the upcoming MySQL Workbench 6.2.2 release, and here's the changelog entry:

After adding enough SQL statements in the SQL editor to require scrolling,
and scrolling to the bottom statement and executing it, the SQL window
would automatically scroll to the top statement. Now, the cursor position
is preserved.

Thank you for the bug report.