From 4fb6f4dddf85d40f98086091b13c5fec39600b90 Mon Sep 17 00:00:00 2001 From: "petr@mysql.com" <> Date: Thu, 18 Aug 2005 11:23:54 +0200 Subject: Fix for Bug#11247 Stored procedures: Function calls in long loops leak memory and Bug#12297 SP crashes the server if data inserted inside a lon loop Third commit attempt. With fixes to the issues, showed up after full rebuild and tests on other hosts. --- sql/sp_rcontext.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sql/sp_rcontext.h') diff --git a/sql/sp_rcontext.h b/sql/sp_rcontext.h index 856beb13f6d..dedbc7bdef1 100644 --- a/sql/sp_rcontext.h +++ b/sql/sp_rcontext.h @@ -48,8 +48,14 @@ class sp_rcontext : public Sql_alloc public: - MEM_ROOT *callers_mem_root; // Used to store result fields bool in_handler; + /* + Arena used to (re) allocate items on . E.g. reallocate INOUT/OUT + SP parameters when they don't fit into prealloced items. This + is common situation with String items. It is used mainly in + sp_eval_func_item(). + */ + Query_arena *callers_arena; sp_rcontext(uint fsize, uint hmax, uint cmax); -- cgit v1.2.1