From 6f8d3c4844e7f7dd760f09a5ab8ad309d1d690d6 Mon Sep 17 00:00:00 2001 From: "konstantin@mysql.com" <> Date: Thu, 22 Sep 2005 02:11:21 +0400 Subject: A fix and a test case for Bug#6513 "Test Suite: Values inserted by using cursor is interpreted latin1 character and Bug#9819 "Cursors: Mysql Server Crash while fetching from table with 5 million records." A fix for a possible memory leak when fetching into an SP cursor in a long loop. The patch uses a common implementation of cursors in the binary protocol and in stored procedures and implements materialized cursors. For implementation details, see comments in sql_cursor.cc --- sql/sp_head.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sql/sp_head.h') diff --git a/sql/sp_head.h b/sql/sp_head.h index 9888fe74149..f8d2a39458e 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -860,6 +860,12 @@ public: virtual void print(String *str); + /* + This call is used to cleanup the instruction when a sensitive + cursor is closed. For now stored procedures always use materialized + cursors and the call is not used. + */ + virtual void cleanup_stmt() { /* no op */ } private: sp_lex_keeper m_lex_keeper; @@ -1041,4 +1047,7 @@ sp_add_to_query_tables(THD *thd, LEX *lex, const char *db, const char *name, thr_lock_type locktype); +Item *sp_eval_func_item(THD *thd, Item **it, enum_field_types type, + Item *reuse, bool use_callers_arena); + #endif /* _SP_HEAD_H_ */ -- cgit v1.2.1