summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2003-12-30 14:08:19 +0400
committerunknown <hf@deer.(none)>2003-12-30 14:08:19 +0400
commitc3b49a4e6ad53caba5c3c42caa84e763021be69a (patch)
tree2ae6e41d1324a906e2f8a6868b34fe75950e736f /sql/item_cmpfunc.cc
parent1575b77af5b446150d0fa435149df209b29dd0f3 (diff)
downloadmariadb-git-c3b49a4e6ad53caba5c3c42caa84e763021be69a.tar.gz
Fix for prepared statements
Here i added Item_*::cleanup() functions, removed a lot of ~Item_*'s, added code to restore order_list and group_list sql/item.cc: cleanups methods implemented Item_ref constructors changed sql/item.h: cleanups declared Item_ref constructors changed some ~Item_* deleted sql/item_cmpfunc.cc: new Item_ref format sql/item_cmpfunc.h: saving/restoring of the original arguments added to eq and equal functions sql/item_func.cc: New Item_ref format sql/item_func.h: destructors removed/changed to 'cleanup()' sql/item_row.cc: New Item_ref format sql/item_row.h: ~Item_row -> cleanup() sql/item_strfunc.cc: new Item_ref format sql/item_strfunc.h: destructors removed sql/item_subselect.cc: Item_subselect implementation, new Item_ref() format sql/item_subselect.h: cleanups for subselects declared sql/item_sum.cc: cleanups implementations sql/item_sum.h: cleanups declarations destructors removed sql/mysql_priv.h: free_items, cleanup_items exported sql/sql_prepare.cc: cleanup_items, free_items calls added stmt->query_id= thd->query_id restored cleanup procedures for group_list and order_list added sql/sql_yacc.yy: New Item_ref() format
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index a79ef21e97a..4b270c6aad0 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -496,7 +496,6 @@ longlong Item_func_eq::val_int()
return value == 0 ? 1 : 0;
}
-
/* Same as Item_func_eq, but NULL = NULL */
void Item_func_equal::fix_length_and_dec()
@@ -1754,7 +1753,7 @@ void Item_cond::split_sum_func(Item **ref_pointer_array, List<Item> &fields)
uint el= fields.elements;
fields.push_front(item);
ref_pointer_array[el]= item;
- li.replace(new Item_ref(ref_pointer_array + el, 0, item->name));
+ li.replace(new Item_ref(ref_pointer_array + el, li.ref(), 0, item->name));
}
item->update_used_tables();
used_tables_cache|=item->used_tables();