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

Fixed BUG#10961: Stored procedures: crash if select * from dual

Have to catch errors from SELECT when opening a cursor.


mysql-test/r/sp.result:
  New test case for BUG#10961.
mysql-test/t/sp.test:
  New test case for BUG#10961.
sql/protocol.h:
  Init data in Protocol_cursor constructor, for error cases.
sql/sp_head.cc:
  Catch "hidden" errors during SELECT when opening a cursor.
This commit is contained in:
unknown
2005-06-01 12:18:41 +02:00
parent abbdab6ac9
commit 77bd9d36e6
4 changed files with 73 additions and 3 deletions

View File

@ -159,8 +159,8 @@ public:
MYSQL_ROWS **prev_record;
ulong row_count;
Protocol_cursor() {}
Protocol_cursor(THD *thd_arg, MEM_ROOT *ini_alloc) :Protocol_simple(thd_arg), alloc(ini_alloc) {}
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;