• unknown's avatar
    Fixed on BUG#16568: Continue handler with simple CASE not working correctly · af187fa2
    unknown authored
      After trying multiple inheritance (to messy and hard make it work) and
      sublassing jump_if_not (worked, but ugly), decided to on this solution
      instead:
      Inserting an abstract sp_instr_opt_meta class as parent for all instructions
      with destinations makes it possible to handle a continuation pointer for
      sp_instr_set_case_expr too.
      Note: No special test case; the fix is captured by the changed behaviour of
      bug14643_2, and bug14498_4 (formerly disabled), in sp.test.
    
    
    mysql-test/r/sp.result:
      Updated results for BUG#16568 (affects results for bug14643_2 and bug14498_4)
    mysql-test/t/sp.test:
      Enabled test bug14498_4 for BUG#16568.
    sql/sp_head.cc:
      Changed type of some parameters and variables (sp_instr_opt_meta instead of sp_instr_jump*).
      Added consistency check of m_ip member in instructions in sp_head::show_routine_code().
      Updated print() method of, and added opt_mark() and opt_move() methods to
      sp_instr_set_case_expr, to handle the new continuation destination.
    sql/sp_head.h:
      New abstract class between sp_instr and instructions with destinations, in particular
      sp_instr_set_case_expr, for continuation destination handling.
      Changed type of some parameters and variables (sp_instr_opt_meta instead of sp_instr_jump*).
      Added opt_mark(), opt_move() and set_destination() methods to
      sp_instr_set_case_expr.
    sql/sql_parse.cc:
      Fixed small bug at show_routine_code() call (tested return value the wrong way).
    sql/sql_yacc.yy:
      sp_instr_set_case_expr is now added to backpatch list (for the new cont. destination).
    af187fa2
sp.result 99.4 KB