fixed memory allocation problem in IN with const rows

This commit is contained in:
unknown 2003-11-19 19:31:19 +02:00
parent 29b99eaa0d
commit 769f7e338d

View file

@ -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;
}