Bug #1233 "Inner" comments
Submitted: 9 Sep 2003 5:57 Modified: 10 Sep 2003 4:14
Reporter: Dmitry Katsubo Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.14 OS:Linux (Linux)
Assigned to: Ramil Kalimullin CPU Architecture:Any

[9 Sep 2003 5:57] Dmitry Katsubo
Description:
MySQL Reference Manual do not define the order, how the comments are handled. But I expect the next script to run ok:

Test 1 (table is NOT created):
=== cut ===
/* bundesland -- */

CREATE TABLE bundesland (
...
=== cut ===

The following examples are handled ok:

Test 2 (runs ok):
=== cut ===
/* bundesland */

CREATE TABLE bundesland (
...
=== cut ===

Test 3 (runs ok):
=== cut ===
/* bundesland --*/

CREATE TABLE bundesland (
...
=== cut ===

The documentation says that if a sequence '-- ' is met, then everything until the end-of-line is ignored. But this breakes the closing '*/' and creates the run-away comment. For example, the next "innocent" comment will cause a problem:

/* user_id -- used for many purposes */

How to repeat:
/* user_id -- used for many purposes */
create table abc ( user_id integer );

(the next will work:)
/* user_id - used for many purposes */
create table abc ( user_id integer );

Suggested fix:
Swap the order of processing "/* */" and "--" comments.
[10 Sep 2003 4:08] Ramil Kalimullin
Thank you for taking the time to report a problem.  Unfortunately
you are not using a current version of the product your reported a
problem with -- the problem might already be fixed. Please download
a new version from http://www.mysql.com/downloads/

If you are able to reproduce the bug with one of the latest versions,
please change the version on this bug report to the version you
tested and change the status back to "Open".  Again, thank you for
your continued support of MySQL.
[10 Sep 2003 4:14] Ramil Kalimullin
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Opps, sorry.
Actually I've tested the latest 4.0 bk tree.