Bug #98229 The handle of comment --
Submitted: 15 Jan 2020 4:54 Modified: 16 Jan 2020 1:44
Reporter: wang shoutao Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:8.0.18 OS:Windows
Assigned to: CPU Architecture:Any

[15 Jan 2020 4:54] wang shoutao
Description:
Bug1
--------------------------------------------------------
--DDL for Procedure PROC_INSERT1TONPERFDATA
--------------------------------------------------------

has error in line 2
must write in the way

--------------------------------------------------------
--  DDL for Procedure PROC_INSERT1TONPERFDATA
--------------------------------------------------------

Bug2

DELIMITER ;
--------------------------------------------------------
--  DDL for Procedure PROC_INSERT1TONPERFDATA
--------------------------------------------------------

has error on line 3

must write in the way
DELIMITER ;
-- ------------------------------------------------------
--  DDL for Procedure PROC_INSERT1TONPERFDATA
-- ------------------------------------------------------

How to repeat:
Both way should work
[15 Jan 2020 7:55] MySQL Verification Team
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at https://dev.mysql.com/doc/refman/8.0/en/comments.html 

Quoting from the above link "From a --  sequence to the end of the line. In MySQL, the --  (double-dash) comment style requires the second dash to be followed by at least one whitespace or control character (such as a space, tab, newline, and so on)"
[16 Jan 2020 1:44] wang shoutao
Thanks for the explanation. 

But there still a problem is "---------".
  If the line after "DELIMITER ;", there must be a space after second "-"
  if there is no "DELIMITER ;", the space after second "-" is not needed. 

This make the scrip is not consistent.

I upload three images to make it easy to understand.
[16 Jan 2020 1:44] wang shoutao
1

Attachment: 1.jpg (image/jpeg, text), 23.74 KiB.

[16 Jan 2020 1:44] wang shoutao
2

Attachment: 2.jpg (image/jpeg, text), 24.59 KiB.

[16 Jan 2020 1:45] wang shoutao
3

Attachment: 3.jpg (image/jpeg, text), 24.64 KiB.