diff options
author | unknown <konstantin@mysql.com> | 2005-03-24 15:12:53 +0300 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2005-03-24 15:12:53 +0300 |
commit | 3b236b1dfd1fdc34548e296dc63e75735becd61d (patch) | |
tree | ec4df54ab1b5ce7db1d531ed35940a9f42ceecd6 /sql/sql_select.h | |
parent | 648d40ea663aecb584c832380a4309a127d7c2a5 (diff) | |
download | mariadb-git-3b236b1dfd1fdc34548e296dc63e75735becd61d.tar.gz |
Fixes and test cases for Bug#8880 "Commands out of sync error with cursors"
and Bug#9159 "Server crash during mysql_stmt_close".
The patch adds support for single-row result sets in cursors.
libmysql/libmysql.c:
If we wanted a cursor, and the server wasn't able to create one,
buffer all rows on client. Currently this is possible only for
single row result sets and some SHOW commands.
sql/sql_prepare.cc:
Properly free resources if there was a request to open a cursor which
wasn't fullfilled.
Give error on attempt to open a cursor for a statement not returning
a result set.
sql/sql_select.h:
Initialize Item_arena of Cursor object. A case when a cursor object
is created but not used is possible with single-row result sets.
tests/mysql_client_test.c:
Test cases for Bug#8880 and Bug#9159
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r-- | sql/sql_select.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index 02e1dde8a7f..9667dc24552 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -370,7 +370,7 @@ public: void close(); void set_unit(SELECT_LEX_UNIT *unit_arg) { unit= unit_arg; } - Cursor() :join(0), unit(0) {} + Cursor() :Item_arena(TRUE), join(0), unit(0) {} ~Cursor(); }; |