• unknown's avatar
    Fix for trigger.test failure in --debug mode. · d51a5bae
    unknown authored
    We can't have Item_trigger_field as aggregated object inside of
    sp_instr_set_trigger_field class since in this case its destructor
    will be called twice. So instead let us create this Item separately
    and store pointer to it in instruction object.
    
    
    sql/sp_head.cc:
      sp_instr_set_trigger_field:
        We can't have Item_trigger_field as aggregated object since in this
        case its destructor will be called twice, so let us store pointer
        to this Item (Another way to avoid this is to exclude this Item
        from free_list but this can't be done in elegant way in 5.0 and
        will also cause additional problems with Item::cleanup()).
    sql/sp_head.h:
      sp_instr_set_trigger_field:
        We can't have Item_trigger_field as aggregated object since in this
        case its destructor will be called twice, so let us store pointer
        to this Item (Another way to avoid this is to exclude this Item
        from free_list but this can't be done in elegant way in 5.0 and
        will also cause additional problems with Item::cleanup()).
    sql/sql_yacc.yy:
      We can't have Item_trigger_field as aggregated object inside of
      sp_instr_set_trigger_field class since in this case its destructor
      will be called twice. So instead let us create this Item separately
      and store pointer to it in instruction object.
    d51a5bae
sp_head.h 20.4 KB