diff options
author | konstantin@mysql.com <> | 2005-09-22 02:11:21 +0400 |
---|---|---|
committer | konstantin@mysql.com <> | 2005-09-22 02:11:21 +0400 |
commit | 6f8d3c4844e7f7dd760f09a5ab8ad309d1d690d6 (patch) | |
tree | c670884265eea87654bb764c095e254eff48128d /sql/protocol.h | |
parent | e89c5220b54fe74d1afc1361f91e18b164e90e33 (diff) | |
download | mariadb-git-6f8d3c4844e7f7dd760f09a5ab8ad309d1d690d6.tar.gz |
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
Diffstat (limited to 'sql/protocol.h')
-rw-r--r-- | sql/protocol.h | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/sql/protocol.h b/sql/protocol.h index 2717d2258fa..c00bbba4cc9 100644 --- a/sql/protocol.h +++ b/sql/protocol.h @@ -150,30 +150,6 @@ public: virtual bool store(Field *field); }; -class Protocol_cursor :public Protocol_simple -{ -public: - MEM_ROOT *alloc; - MYSQL_FIELD *fields; - MYSQL_ROWS *data; - MYSQL_ROWS **prev_record; - ulong row_count; - - Protocol_cursor() :data(NULL) {} - Protocol_cursor(THD *thd_arg, MEM_ROOT *ini_alloc) :Protocol_simple(thd_arg), alloc(ini_alloc), data(NULL) {} - bool prepare_for_send(List<Item> *item_list) - { - row_count= 0; - fields= NULL; - data= NULL; - prev_record= &data; - return Protocol_simple::prepare_for_send(item_list); - } - bool send_fields(List<Item> *list, uint flags); - bool write(); - uint get_field_count() { return field_count; } -}; - void send_warning(THD *thd, uint sql_errno, const char *err=0); void net_printf_error(THD *thd, uint sql_errno, ...); void net_send_error(THD *thd, uint sql_errno=0, const char *err=0); |