Description:
Porting SQL statements from other implementation to MySQL conflicts with
Non-standard handling of SQL 92 comments that are deifned[1] as:
5.2 <token> and <separator>
...
<comment> ::=
<comment introducer> [ <comment character>... ] <newline>
<comment character> ::=
<nonquote character>
| <quote>
<comment introducer> ::= <minus sign><minus sign>[<minus sign>...]
<newline> ::= !! implementation-defined end-of-line indicator
How to repeat:
"-- " comment requirement with required SPACE is not standard SQL.
Suggested fix:
the --ansi mode should enforce strict SQL 92, in terms of comments as well.
The manual of 5.x also incorrectly states that "Some other SQL databases use", whereas it should read that this is the standard compliant manner of writing comments into the SQL files. Please rephrase the manual as well.
`--' as the Start of a Comment
..............................
Some other SQL databases use `--' to start comments. MySQL Server uses
`#' as the start comment character. You can also use the C comment
style `/* this is a comment */' with MySQL Server. *Note Comments::.
MySQL Server 3.23.3 and above support the `--' comment style, provided
the comment is followed by a space (or by a control character such as a
newline) ... [2]
[1] The SQL 92 is downloadable at:
http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt
[2] The text exerpt is from manaual 5.0.1-alpha