WL#930: Allow -- comments with no space
Affects: Server-7.1 — Status: Un-Assigned — Priority: Very High
MySQL, like Sybase, requires that simple comments begin with "-- " and not merely "--" to avoid ambiguity. But following the suggestion of Mr Åke Persson from that other Uppsala DBMS company, there will be a change to SQL:2003 which solves the ambiguity in a different way. The numeric expression "x--5" will be illegal but "x- -5" will be valid. SQL:2003 and SQL:2008 now say: " <simple comment> ::= <simple comment introducer> [ <comment character>... ] <newline> <simple comment introducer> ::= <minus sign><minus sign> ... There shall be no <separator> separating the <minus sign>s of a <simple comment introducer>. ... <newline> is the implementation-defined end-of-line indicator ... if [string used in PREPARE] contains a <simple comment> then an exception condition is raised: syntax error or access rule violation. ... " Presumably we would define end-of-string as a type of <newline>. This is a behaviour change and I think Monty doesn't like it much. But if we start by deprecating the old behaviour in MySQL 6.x, I think it should be safe to get this into 7.x. Feature requests: BUG#14032 Comment with space requirement '-- ' is not standard SQL 92
Copyright (c) 2000, 2018, Oracle Corporation and/or its affiliates. All rights reserved.