summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-01-02 12:24:33 +0200
committerunknown <bell@sanja.is.com.ua>2003-01-02 12:24:33 +0200
commit3fe840ee07992340b5b7977ec66483e6f837ba1b (patch)
tree97814f92c58bdd329bfaa1a60725d7be46326137 /sql
parentbe551fd94370ef85aa9aa9cad36a890eee9c04b0 (diff)
downloadmariadb-git-3fe840ee07992340b5b7977ec66483e6f837ba1b.tar.gz
post-post-review fix (SCRUM)
sql/item.cc: post-post-review fix sql/item_cmpfunc.h: post-post-review fix sql/item_row.cc: post-post-review fix sql/item_subselect.cc: post-post-review fix
Diffstat (limited to 'sql')
-rw-r--r--sql/item.cc5
-rw-r--r--sql/item_cmpfunc.h2
-rw-r--r--sql/item_row.cc2
-rw-r--r--sql/item_subselect.cc2
4 files changed, 8 insertions, 3 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 8feeabd306e..c6cce9a5b48 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -1290,9 +1290,10 @@ bool Item_cache_row::setup(Item * item)
for (uint i= 0; i < item_count; 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;
- values[i]->setup(el);
+ tmp->setup(el);
}
return 0;
}
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 44c788f381c..bd7d1bfaf7a 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -552,11 +552,13 @@ public:
~cmp_item_row()
{
if (comparators)
+ {
for (uint i= 0; i < n; i++)
{
if (comparators[i])
delete comparators[i];
}
+ }
}
void store_value(Item *item);
int cmp(Item *arg);
diff --git a/sql/item_row.cc b/sql/item_row.cc
index ba4ac19b880..c62ab60c0cd 100644
--- a/sql/item_row.cc
+++ b/sql/item_row.cc
@@ -55,6 +55,7 @@ bool Item_row::fix_fields(THD *thd, TABLE_LIST *tabl, Item **ref)
return 1;
used_tables_cache |= items[i]->used_tables();
if (const_item_cache&= items[i]->const_item() && !with_null)
+ {
if (items[i]->cols() > 1)
with_null|= items[i]->null_inside();
else
@@ -62,6 +63,7 @@ bool Item_row::fix_fields(THD *thd, TABLE_LIST *tabl, Item **ref)
items[i]->val_int();
with_null|= items[i]->null_value;
}
+ }
maybe_null|= items[i]->maybe_null;
}
return 0;
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index 75aef846b17..c5ecdc87d40 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -604,7 +604,7 @@ void Item_in_subselect::row_value_transformer(THD *thd,
}
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);
else
sl->where= and_items(sl->where, item);