Bug #57161 Comment Delition affter compiling function
Submitted: 1 Oct 2010 8:09 Modified: 13 Jun 2013 21:27
Reporter: Alex Shapiro Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.28 OS:Any (Windows, Mac OS X)
Assigned to: CPU Architecture:Any
Tags: comments, functions, procedures

[1 Oct 2010 8:09] Alex Shapiro
Description:
In the begining of the function or procedure there is a commented line:

For documentation purposes I inserted a long very descriptive comment, that describes all the function purpose and context to other functions a procedures:

After compiling the Procedure, the comment was gone!
it returned to the initial state:

How to repeat:
Inserting comment into already commented text in the Routine window:

-- ---------------------------
-- Routine DDL
-- ---------------------------

like so:

-- ---------------------------
-- Routine DDL
-- Very long and descriptive comment
-- ---------------------------

press Apply button...
[4 Oct 2010 16:33] Valeriy Kravchuk
Yes, this is easily repeatable (also during modeling) and is very misleading. Why allow to edit comments if they are immediately forgotten?
[13 Nov 2010 4:08] Alfredo Kojima
Valeriy,

Comments added to routine editor in Modeling are saved.
Comments added before routine code in SQL Editor are discarded as expected, since the server doesn't store any comments outside the routine definition. Comments that are inlined in the routine body are preserved.

I think this is Not a Bug
[13 Nov 2010 8:47] Valeriy Kravchuk
As we speak about modeling part it would be nice for Workbench to be able to save comments related to stored procedures even if they are our of procedure code itself. 

I agree it is not a bug, but as you present this comment text in edit control user expects his changes to be saved. I'd call this a feature request.
[13 Nov 2010 12:46] Alfredo Kojima
Alex, as I explained above, comments that come before or after the routine definition are not stored by the server, so if you alter a routine in the SQL Editor, such comments will be deleted.

I'll keep this bug open as a feature request so that comments can be stored for Modeling, which is a bit different matter.
[29 May 2013 13:30] Mike Lischke
Posted by developer:
 
A separate comment box has been added on all platforms to allow specifying db independent comments for a store routine.
[13 Jun 2013 21:27] Philip Olson
Fixed as of the upcoming MySQL Workbench 6.0.2 public beta release, and here's the changelog entry:

A comment tab was added to allow specifying database independent comments
for a store routines/views.

Thank you for the bug report.