• Davi Arnaut's avatar
    Bug#50755: Crash if stored routine def contains version comments · 49318af3
    Davi Arnaut authored
    The problem was that a syntactically invalid trigger could cause
    the server to crash when trying to list triggers. The crash would
    happen due to a mishap in the backup/restore procedure that should
    protect parser items which are not associated with the trigger. The
    backup/restore is used to isolate the parse tree (and context) of
    a statement from the load (and parsing) of a trigger. In this case,
    a error during the parsing of a trigger could cause the improper
    backup/restore sequence.
    
    The solution is to properly restore the original statement context
    before the parser is exited due to syntax errors in the trigger body.
    49318af3
sql_lex.cc 81.5 KB