Commit dcf14ed5 authored by peter@mysql.com's avatar peter@mysql.com

Merge mysql.com:/home/pz/mysql/mysql-4.1-root

into mysql.com:/home/pz/mysql/mysql-4.1
parents 3b425c8b 945758f0
...@@ -1290,9 +1290,10 @@ bool Item_cache_row::setup(Item * item) ...@@ -1290,9 +1290,10 @@ bool Item_cache_row::setup(Item * item)
for (uint i= 0; i < item_count; i++) for (uint i= 0; i < item_count; i++)
{ {
Item *el= item->el(i); Item *el= item->el(i);
if (!(values[i]= Item_cache::get_cache(el->result_type()))) Item_cache *tmp;
if (!(tmp= values[i]= Item_cache::get_cache(el->result_type())))
return 1; return 1;
values[i]->setup(el); tmp->setup(el);
} }
return 0; return 0;
} }
......
...@@ -552,11 +552,13 @@ class cmp_item_row :public cmp_item ...@@ -552,11 +552,13 @@ class cmp_item_row :public cmp_item
~cmp_item_row() ~cmp_item_row()
{ {
if (comparators) if (comparators)
{
for (uint i= 0; i < n; i++) for (uint i= 0; i < n; i++)
{ {
if (comparators[i]) if (comparators[i])
delete comparators[i]; delete comparators[i];
} }
}
} }
void store_value(Item *item); void store_value(Item *item);
int cmp(Item *arg); int cmp(Item *arg);
......
...@@ -55,6 +55,7 @@ bool Item_row::fix_fields(THD *thd, TABLE_LIST *tabl, Item **ref) ...@@ -55,6 +55,7 @@ bool Item_row::fix_fields(THD *thd, TABLE_LIST *tabl, Item **ref)
return 1; return 1;
used_tables_cache |= items[i]->used_tables(); used_tables_cache |= items[i]->used_tables();
if (const_item_cache&= items[i]->const_item() && !with_null) if (const_item_cache&= items[i]->const_item() && !with_null)
{
if (items[i]->cols() > 1) if (items[i]->cols() > 1)
with_null|= items[i]->null_inside(); with_null|= items[i]->null_inside();
else else
...@@ -62,6 +63,7 @@ bool Item_row::fix_fields(THD *thd, TABLE_LIST *tabl, Item **ref) ...@@ -62,6 +63,7 @@ bool Item_row::fix_fields(THD *thd, TABLE_LIST *tabl, Item **ref)
items[i]->val_int(); items[i]->val_int();
with_null|= items[i]->null_value; with_null|= items[i]->null_value;
} }
}
maybe_null|= items[i]->maybe_null; maybe_null|= items[i]->maybe_null;
} }
return 0; return 0;
......
...@@ -604,7 +604,7 @@ void Item_in_subselect::row_value_transformer(THD *thd, ...@@ -604,7 +604,7 @@ void Item_in_subselect::row_value_transformer(THD *thd,
} }
if (sl->having || sl->with_sum_func || sl->group_list.first || if (sl->having || sl->with_sum_func || sl->group_list.first ||
!sl->table_list.elements || !sl->table_list.elements) !sl->table_list.elements)
sl->having= and_items(sl->having, item); sl->having= and_items(sl->having, item);
else else
sl->where= and_items(sl->where, item); sl->where= and_items(sl->where, item);
......
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