mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/media/sda1/mysql/mysql-5.0-9478
This commit is contained in:
@ -1742,6 +1742,7 @@ Cursor::init_from_thd(THD *thd)
|
||||
/*
|
||||
XXX: thd->locked_tables is not changed.
|
||||
What problems can we have with it if cursor is open?
|
||||
TODO: must be fixed because of the prelocked mode.
|
||||
*/
|
||||
/*
|
||||
TODO: grab thd->free_list here?
|
||||
@ -1871,10 +1872,6 @@ Cursor::fetch(ulong num_rows)
|
||||
}
|
||||
else if (error != NESTED_LOOP_KILLED)
|
||||
my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
|
||||
/* free cursor memory */
|
||||
free_items(free_list);
|
||||
free_list= 0;
|
||||
free_root(&main_mem_root, MYF(0));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1914,6 +1911,13 @@ Cursor::close()
|
||||
}
|
||||
join= 0;
|
||||
unit= 0;
|
||||
free_items(free_list);
|
||||
free_list= 0;
|
||||
/*
|
||||
Must be last, as some memory might be allocated for free purposes,
|
||||
like in free_tmp_table() (TODO: fix this issue)
|
||||
*/
|
||||
free_root(mem_root, MYF(0));
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
@ -1922,12 +1926,6 @@ Cursor::~Cursor()
|
||||
{
|
||||
if (is_open())
|
||||
close();
|
||||
free_items(free_list);
|
||||
/*
|
||||
Must be last, as some memory might be allocated for free purposes,
|
||||
like in free_tmp_table() (TODO: fix this issue)
|
||||
*/
|
||||
free_root(&main_mem_root, MYF(0));
|
||||
}
|
||||
|
||||
/*********************************************************************/
|
||||
|
Reference in New Issue
Block a user