• Dmitry Shulga's avatar
    MDEV-5816: Stored programs: validation of stored program statements · 5a8b9a16
    Dmitry Shulga authored
    For those SP instructions that need to get access to ia LEX object
    on execution, added storing of their original sql expressions inside
    classes derived from the class sp_lex_instr.
    
    A stored sql expression is returned by the abstract method
      sp_lex_instr::get_expr_query
    redefined in derived classes.
    
    Since an expression constituting a SP instruction can be invalid
    SQL statement in general case (not parseable statement), the virtual
    method sp_lex_instr::get_query() is introduced to return a valid string
    for a statement that corresponds to the given instruction.
    
    Additionally, introduced the rule remember_start_opt in the grammar.
    The new rule intended to get correct position of a current
    token taking into attention the fact whether lookahead was done or not.
    5a8b9a16
sql_class.h 252 KB