Bug #60736 Wrong cell selected after re-organizing / can't copy after re-arranging column
Submitted: 2 Apr 2011 23:26 Modified: 24 May 2011 22:35
Reporter: Mike Reid Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.33 (b7508) OS:MacOS (Mac OS X 10.6.6)
Assigned to: CPU Architecture:Any
Tags: column, Edit, organize, workbench

[2 Apr 2011 23:26] Mike Reid
Description:
MySQL Workbench selects the wrong column in Query Results once you've re-arranged the columns.  Because of this, you cannot copy data from a re-arranged column or Open Value in Viewer by simply clicking the data you want. 

How to repeat:
1. Open Workbench
2. Connect to database
3. Run query with multiple columns in result set:

   e.g. select * from mysql.user;

4. Change the "Password" column's order (drag two or three columns to the right)
5. Try and click on a row's Password cell

6. Watch it never get selected, rather it selects one of the columns next to it.

Also, try and right-click on a Password value to "Open Value in Viewer" and watch unexpected value show up instead. Same goes for copying to clipboard since the correct cell is never selected...

(Note: I have only confirmed this issue on Mac. I have not tried it on Windows, etc)

Suggested fix:
Correctly maintain column references AFTER re-arranging them within a Query Result set.
[24 May 2011 22:32] Alfredo Kojima
Column rearranging is not support and the fact that you can do it is a bug. That has been corrected.
[24 May 2011 22:35] Mike Reid
That is very unfortunate...column re-arranging a bug? Hardly. It's an extremely useful feature, in my opinion, however it probably was just easier (read: shortcut) to prevent rearranging columns than to actually correct the side effect I've pointed out as a result of doing so.

Sorry to see it go. Had I known you'd be pulling this feature, claiming it as a bug, I would never have submitted this report in the first place.