mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
changed allocation of st_table::insert_values
from table->mem_root to thd->mem_root (fixed bug #2438 "Runaway memory consumption")
This commit is contained in:
@ -198,7 +198,8 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
|
|||||||
if (duplic == DUP_UPDATE && !table->insert_values)
|
if (duplic == DUP_UPDATE && !table->insert_values)
|
||||||
{
|
{
|
||||||
/* it should be allocated before Item::fix_fields() */
|
/* it should be allocated before Item::fix_fields() */
|
||||||
table->insert_values=(byte *)alloc_root(&table->mem_root, table->rec_buff_length);
|
table->insert_values=
|
||||||
|
(byte *)alloc_root(&thd->mem_root, table->rec_buff_length);
|
||||||
if (!table->insert_values)
|
if (!table->insert_values)
|
||||||
goto abort;
|
goto abort;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user