1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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
This commit is contained in:
unknown
2005-03-24 15:12:53 +03:00
parent 648d40ea66
commit 3b236b1dfd
4 changed files with 89 additions and 7 deletions

View File

@ -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();
};