Bug #53610 Insert snippet to SQL area doesn't work
Submitted: 12 May 2010 20:48 Modified: 4 Jun 2010 13:57
Reporter: Steve Narum Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.21 OSS rc OS:Windows (XP64)
Assigned to: Alfredo Kojima CPU Architecture:Any
Tags: regression, snippets

[12 May 2010 20:48] Steve Narum
Description:
The Insert Snippet feature seems to have broken between 5.2.19 and 5.2.21.  Neither the right-click-on-the-snippet method nor the toolbar button do anything for me in the RC.  Both methods worked fine in the BETA.  The Replace mode works just fine.

How to repeat:
Create a snippet.  Clear the SQL Query pane.  Select the snippet and use the Replace function to copy it into the query.  Try to insert a second copy of the snippet by using the Insert function.  Nothing will happen.
[12 May 2010 20:55] Steve Narum
Interestingly, after submitting the report, I noticed an odd behavior.  I typed one line of SQL into a new script tab.  I then tried to add a second line of code (different) by Inserting an existing snippet.  As I reported, I see no change to the script pane.  However I then told the tool to save the script contents as a new snippet.  The new snippet has both lines of code, but with no new-line between.  I verified that if I try to run the script as is (the second line still does not show up) it runs only one command.  However if I paste the snippet into a new script, both commands appear.
[13 May 2010 4:08] Valeriy Kravchuk
Not repeatable on Mac OS X. Looks like Windows-specific problem.
[13 May 2010 7:11] Valeriy Kravchuk
Indeed, Insert Text into SQL Area does not work for snippets on XP.
[26 May 2010 19:08] Alfredo Kojima
Fixed
[26 May 2010 21:45] Alfredo Kojima
Fixed for toolbar too
[28 May 2010 18:12] Johannes Taxacher
fix confirmed in repository
[4 Jun 2010 13:57] Tony Bedford
An entry has been added to the 5.2.22 changelog:

In the SQL Editor, the toolbar items on the Snippets tab to replace and insert snippets had no effect when clicked.