Bug #49370 "Insert text into SQL area" replaces, instead
Submitted: 2 Dec 2009 21:09 Modified: 8 Dec 2009 16:42
Reporter: Todd Farmer (OCA) Email Updates:
Status: Closed Impact on me:
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2.10 r4680 OS:Microsoft Windows (XP)
Assigned to: Sergei Tkachenko CPU Architecture:Any

[2 Dec 2009 21:09] Todd Farmer
When working with SQL Snippets, I right-clicked one and selected "Insert text into SQL area", but it replaced the existing text.  It seems that it does this when the contents of the SQL area are already selected, which is the state WB leaves the SQL area after replacing/inserting SQL snippets.

Maybe the solution is not select the entire SQL area after completing the snippet insert/replace, if the behavior to replace all selected text is a requirement.

How to repeat:
See above.

Suggested fix:
See above.
[3 Dec 2009 9:53] Johannes Taxacher
i agree, seems best to not select whole text after text was insertet/replaced
[7 Dec 2009 9:47] Johannes Taxacher
fixed in repository. will be included in 5.2.11
[8 Dec 2009 16:42] Tony Bedford
An entry has been added to the 5.2.11 changelog:

When using the SQL Snippets palette, right-clicking on a snippet, and then selecting the menu item Insert text into SQL Area, replaced all text in the SQL Statements area. This happened after another snippet had previously been inserted, as the default state was to leave all code in the SQL Statements area selected.