mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
fixed memory allocation problem in IN with const rows
This commit is contained in:
parent
29b99eaa0d
commit
769f7e338d
1 changed files with 5 additions and 1 deletions
|
@ -1415,9 +1415,12 @@ cmp_item_row::~cmp_item_row()
|
|||
|
||||
void cmp_item_row::store_value(Item *item)
|
||||
{
|
||||
DBUG_ENTER("cmp_item_row::store_value");
|
||||
THD *thd= current_thd;
|
||||
n= item->cols();
|
||||
if ((comparators= (cmp_item **) thd->calloc(sizeof(cmp_item *)*n)))
|
||||
if (!comparators)
|
||||
comparators= (cmp_item **) thd->calloc(sizeof(cmp_item *)*n);
|
||||
if (comparators)
|
||||
{
|
||||
item->bring_value();
|
||||
item->null_value= 0;
|
||||
|
@ -1429,6 +1432,7 @@ void cmp_item_row::store_value(Item *item)
|
|||
item->null_value|= item->el(i)->null_value;
|
||||
}
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue