• unknown's avatar
    Post review and additional fix for BUG#10968: Stored procedures: crash if long loop. · 65c4ffc0
    unknown authored
      Fixed valgrind complaints. This fixes the memory leak problems for
      procedured, and partially for functions. There's still a leak involving
      results from functions that turned out to be too involved, so it will be
      fixed separately.
    
    
    mysql-test/r/sp.result:
      Fixed some minor mistake (spotted while debugging).
    mysql-test/t/sp.test:
      Fixed some minor mistake (spotted while debugging).
    sql/item_func.cc:
      Moved Item_func_sp::cleanup() from item_func.h to ease debugging,
      and made a debug output come out right.
    sql/item_func.h:
      Moved Item_func_sp::cleanup() to item_func.cc to ease debugging.
    sql/sp_head.cc:
      Fixed valgrind problems with the previous memory leak fix (unit cleanup and
      putting result field in a differen mem_root), and removed prealloc flag from
      init_alloc_root() calls.
    sql/sp_rcontext.cc:
      New mem_root pointer used for return fields from functions.
    sql/sp_rcontext.h:
      New mem_root pointer used for return fields from functions.
    65c4ffc0
sp_rcontext.cc 7.6 KB