summaryrefslogtreecommitdiff
path: root/sql/sp_rcontext.h
diff options
context:
space:
mode:
authorunknown <pem@mysql.comhem.se>2005-06-10 16:14:01 +0200
committerunknown <pem@mysql.comhem.se>2005-06-10 16:14:01 +0200
commit03949f8ce8aba38e691bda665d277df8bc1fbee2 (patch)
treed62d5453cb34063af9f715acecb554a0ee41ef38 /sql/sp_rcontext.h
parent8331a7cd3cce954d497bd4b128136e5c59d9f611 (diff)
downloadmariadb-git-03949f8ce8aba38e691bda665d277df8bc1fbee2.tar.gz
Post review and additional fix for BUG#10968: Stored procedures: crash if long loop.
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.
Diffstat (limited to 'sql/sp_rcontext.h')
-rw-r--r--sql/sp_rcontext.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sp_rcontext.h b/sql/sp_rcontext.h
index ba5fa950dc3..864dc3df146 100644
--- a/sql/sp_rcontext.h
+++ b/sql/sp_rcontext.h
@@ -47,6 +47,7 @@ class sp_rcontext : public Sql_alloc
public:
+ MEM_ROOT *callers_mem_root; // Used to store result fields
bool in_handler;
sp_rcontext(uint fsize, uint hmax, uint cmax);