• unknown's avatar
    BUG#20769: Dangling pointer in ctype_recoding test case. · 17c4a2ea
    unknown authored
    In some functions dealing with strings and character sets, the wrong
    pointers were saved for restoration in THD::rollback_item_tree_changes().
    This could potentially cause random corruption or crashes.
    
    Fixed by passing the original Item ** locations, not local stack copies.
    
    Also remove unnecessary use of default arguments.
    
    
    sql/item.cc:
      Function agg_item_charsets() now handles non-consequtive Item *'s.
    sql/item.h:
      Remove use of default argument.
    sql/item_cmpfunc.cc:
      Remove use of default argument.
    sql/item_func.cc:
      Remove use of default argument.
    sql/item_func.h:
      Function agg_item_charsets() now handles non-consequtive Item *'s.
    sql/item_strfunc.cc:
      Pass original Item **'s to agg_arg_charsets(), not local copies, to ensure
      proper restoration in THD::rollback_item_tree_changes().
    sql/item_sum.cc:
      Remove use of default argument.
    17c4a2ea
item.h 77.6 KB