Bug #17420 Bookmark doesn't store comments in first line
Submitted: 15 Feb 2006 11:05 Modified: 4 Dec 2006 12:25
Reporter: Shaun Caig Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:1.1.20 OS:Windows (Windows XP Pro SP2)
Assigned to: Mike Lischke CPU Architecture:Any
Tags: Generic

[15 Feb 2006 11:05] Shaun Caig
Description:
When storing a query as a bookmark, if the first line of the query is a comment, this is not stored in the bookmark. This only appears to happen when the first line is a comment - comments further down the query are stored.

How to repeat:
Type the following into the Query Area:

/* Create Table query */
CREATE TABLE <database>.<table_name> AS
/* Insert SELECT query here */

Ctrl+B to add a bookmark, give it a title (e.g. Create Table).

Delete existing query in Query Area.

Double click on "Create Table" in Bookmark list. First comment will not be there.

Suggested fix:
Allow bookmarks to contain a comment as the first line.
[15 Feb 2006 11:41] MySQL Verification Team
Thank you for the bug report.
[4 Dec 2006 12:25] Mike Lischke
This problem cannot be fixed in a general way because the editor does not return all text to the bookmark handling which is before the actual command. A command starts with the first non-comment part after the previous delimiter or the begin of the editor content.

However I added a workaround: you can now select the text you want to bookmark and it is taken just as it is selected (even partial commands or multiple commands). If nothing is selected then the current command is taken as usual.