• Marc Alff's avatar
    Bug#26030 (Parsing fails for stored routine w/multi-statement execution · 2b285467
    Marc Alff authored
    enabled)
    
    Before this fix, the lexer and parser would treat the ';' character as a
    different token (either ';' or END_OF_INPUT), based on convoluted logic,
    which failed in simple cases where a stored procedure is implemented as a
    single statement, and used in a multi query.
    
    With this fix:
    - the character ';' is always parsed as a ';' token in the lexer,
    - parsing multi queries is implemented in the parser, in the 'query:' rules,
    - the value of thd->client_capabilities, which is the capabilities
      negotiated between the client and the server during bootstrap,
      is immutable and not arbitrarily modified during parsing (which was the
      root cause of the bug)
    
    2b285467
sql_yacc.yy 268 KB