1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

After merge fixes

Added push_back(void *, MEM_ROOT *) to make some list-handling code easier that needs to be allocated in a different mem-root
(Before one had to change thd->mem_root ; push_back(); restore mem_root.
This commit is contained in:
monty@mysql.com
2004-11-09 03:58:44 +02:00
parent 1087186657
commit 2bba55b57f
19 changed files with 91 additions and 101 deletions

View File

@ -1828,7 +1828,7 @@ void mysql_stmt_execute(THD *thd, char *packet, uint packet_length)
{
DBUG_PRINT("info",("Using READ_ONLY cursor"));
if (!stmt->cursor &&
!(stmt->cursor= new (&stmt->mem_root) Cursor()))
!(stmt->cursor= new (&stmt->main_mem_root) Cursor()))
{
send_error(thd, ER_OUT_OF_RESOURCES);
DBUG_VOID_RETURN;
@ -2013,7 +2013,12 @@ static void execute_stmt(THD *thd, Prepared_statement *stmt,
/*
COM_FETCH handler: fetches requested amount of rows from cursor
SYNOPSIS
mysql_stmt_fetch()
thd Thread handler
packet Packet from client (with stmt_id & num_rows)
packet_length Length of packet
*/
void mysql_stmt_fetch(THD *thd, char *packet, uint packet_length)
@ -2023,7 +2028,6 @@ void mysql_stmt_fetch(THD *thd, char *packet, uint packet_length)
ulong num_rows= uint4korr(packet+=4);
Statement *stmt;
int error;
DBUG_ENTER("mysql_stmt_fetch");
if (!(stmt= thd->stmt_map.find(stmt_id)) ||