diff options
author | unknown <hf@deer.(none)> | 2003-12-30 14:08:19 +0400 |
---|---|---|
committer | unknown <hf@deer.(none)> | 2003-12-30 14:08:19 +0400 |
commit | 367ded9f71c7209c851e212ecedc538ca810d8da (patch) | |
tree | 2ae6e41d1324a906e2f8a6868b34fe75950e736f /sql/item_cmpfunc.h | |
parent | d55382369eb639417dd01a62ff4867f9213f10ce (diff) | |
download | mariadb-git-367ded9f71c7209c851e212ecedc538ca810d8da.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.h')
-rw-r--r-- | sql/item_cmpfunc.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 541bc47557d..50c5449c1ec 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -197,11 +197,19 @@ public: class Item_bool_rowready_func2 :public Item_bool_func2 { + Item *orig_a, *orig_b; /* propagate_const can change parameters */ public: - Item_bool_rowready_func2(Item *a,Item *b) :Item_bool_func2(a,b) + Item_bool_rowready_func2(Item *a,Item *b) :Item_bool_func2(a,b), + orig_a(a), orig_b(b) { allowed_arg_cols= a->cols(); } + void cleanup() + { + Item_bool_func2::cleanup(); + tmp_arg[0]= orig_a; + tmp_arg[1]= orig_b; + } }; class Item_func_not :public Item_bool_func @@ -705,10 +713,6 @@ class Item_func_in :public Item_int_func } longlong val_int(); void fix_length_and_dec(); - ~Item_func_in() - { - cleanup(); /* This is not called by Item::~Item() */ - } void cleanup() { delete array; @@ -888,7 +892,6 @@ public: Item_cond(THD *thd, Item_cond &item); Item_cond(List<Item> &nlist) :Item_bool_func(), list(nlist), abort_on_null(0) {} - ~Item_cond() { list.delete_elements(); } bool add(Item *item) { return list.push_back(item); } bool fix_fields(THD *, struct st_table_list *, Item **ref); |