revno: 3690.1.38
committer: Marc Alff <marc.alff@oracle.com>
branch nick: mysql-trunk-bug13819100
timestamp: Wed 2012-03-07 17:15:16 +0100
message:
Bug#13819100 BROKEN SYNTAX ACCEPTED FOR START SLAVE, STOP SLAVE
Before this fix, the parser accepted the following syntax for STOP SLAVE:
STOP SLAVE ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ;
The root cause was the bison grammar for rule slave_thread_opts,
which produced a list of "SQL_THREAD", "RELAY_THREAD" or (empty string),
separated by ",".
The grammar has been fixed so that the grammar rule is:
- either en empty string
- or a list of "SQL_THREAD", "RELAY_THREAD" separated by ",".
which is the proper syntax.
In addition, the grammar rules have been cleaned up, so that, when practical:
- (a) using the bison internal stack ($$, $1, etc) is preferred
- (b) setting global variables in rules, as in Lex->slave_thd_opt= ...
is avoided
Bison is an ascendent parser, for which the natural pattern in (a).
Pattern (b) is for descendent parsers, and mixing both concepts is a bad
idea.
Note that using the same option multiple times in the list is tolerated,
as before, and interpreted as a single option (no change).