Commit 769f7e33 authored by unknown's avatar unknown

fixed memory allocation problem in IN with const rows

parent 29b99eaa
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment