Bug #53999 Unable to define columns to edit within result set
Submitted: 26 May 2010 15:01 Modified: 30 Jun 2011 10:24
Reporter: Alex Whitman Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.21 OS:Any
Assigned to: CPU Architecture:Any
Tags: Edit, SQL

[26 May 2010 15:01] Alex Whitman
To edit a result set in MySQL Workbench you have to use the EDIT keyword.  The rows to be edited can be narrowed down using the EDIT table WHERE foo AND bar.  There is however no way to narrow the number of columns.

If you have a table with 50 columns and you want to edit the second column and the last column of result set, this could mean a lot of scrolling left and right to get to the fields.

In MySQL Query Browser you could edit any result set (as long as it included a primary key) so editing a result set with a large number of columns could be made easier with SELECT id, col2, col50 FROM table;

How to repeat:
EDIT a table with n columns (where n is large enough so that there is a horizontal scroll bar in the result set area) with the intention of editing fields in the column 2 and column n.  A lot of horizontal scrolling will be required.

Suggested fix:

a) Allow the EDIT keyword to use fields, for example EDIT id, col1, col50 FROM table WHERE foo = bar; etc

b) Allow editing of the results of a SELECT query without having to first run an EDIT query.

In my opinion option b would be preferable.
[26 May 2010 18:36] Valeriy Kravchuk
Thank you for the problem report.
[1 Oct 2010 14:45] Thomas Johnson
The old MySQL Browser had a a edit button, that allowed the current resultset of a select to be edited.  It would be a great feature of the SQL Editor in MySQL Workbench to have the same feature.
[15 Nov 2010 10:15] Gustav Gans
I have to agree to Thomas remark. I encountered the EDIT keyword. It was quite convenient with the old QueryBrowser to simply hit F2 in most results and start editing. Without knowing for sure I doubt the enhanced EDIT functionality can make up for that.
[3 Dec 2010 17:07] Richard Jones
I agree on the need for the ability to edit results after a select statement (even if a "for update" was required). The tutorial for the SQL editor actually shows the buttons  e.g. apply changes to data after a simple select statment has been executed. For me those buttons only appear when the edit table command is used. Was the feature pulled??
[7 Jun 2011 10:01] Steve Daniels
Richard, after seeing your comment "The tutorial for the SQL editor actually shows the buttons e.g. apply changes to data after a simple select statment has been executed." I hope and pray this feature is 99% complete and just sat on a shelf somewhere collecting dust because due to some mistake it has been overlooked and forgotten about. It was mentioned over two years ago by Mike Lischke, Senior Software Engineer MySQL Developer Tools Oracle Corporation.

Perhaps it's stalled due to trying to get better code to detect whether the SELECT is editable or not. I'd love it to launch as is, or perhaps with the old QB version of the detection code that we know and love.

[30 Jun 2011 10:24] Jon Stephens
Duplicate of BUG#56794.
[13 Jul 2011 4:37] Miguel M
Still hoping to see column specifications when editing queries sometime soon. 

I'm appreciative of all the effort that went into Workbench, of course, But practically speaking, the move from Query Browser to WB now seems like a step backward with the reduced functionality of the QB feature I used most often.