From 367ded9f71c7209c851e212ecedc538ca810d8da Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 30 Dec 2003 14:08:19 +0400 Subject: 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 --- sql/item_row.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sql/item_row.h') diff --git a/sql/item_row.h b/sql/item_row.h index a09bd1a2c31..1b792f981fd 100644 --- a/sql/item_row.h +++ b/sql/item_row.h @@ -34,10 +34,14 @@ public: with_null(0) {} - ~Item_row() + void cleanup() { if (array_holder && items) + { sql_element_free(items); + items= 0; + array_holder= 0; + } } enum Type type() const { return ROW_ITEM; }; -- cgit v1.2.1 From 9768dc84c83eee93954a57f310ef3896861432b2 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 20 Jan 2004 20:55:47 +0400 Subject: Pack of changes about 'cleanup()'-s Some errorneous code trimmed sql/item.cc: initialization of the Item_type_holder::orig_item added sql/item.h: No use to call cleanup() in ~Item this only calls Item::cleanup() We should use item->delete_self() instead of 'delete item' now Code added to restore Item_type_holder::item_type value sql/item_row.h: this cleanup is wrong sql/item_sum.cc: initialization added sql/item_sum.h: Item_xxx& -> Item_xxx* sql/sql_parse.cc: delete item -> item->delete_self() --- sql/item_row.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'sql/item_row.h') diff --git a/sql/item_row.h b/sql/item_row.h index 1b792f981fd..f87b4f66e80 100644 --- a/sql/item_row.h +++ b/sql/item_row.h @@ -34,16 +34,6 @@ public: with_null(0) {} - void cleanup() - { - if (array_holder && items) - { - sql_element_free(items); - items= 0; - array_holder= 0; - } - } - enum Type type() const { return ROW_ITEM; }; void illegal_method_call(const char *); bool is_null() { return null_value; } -- cgit v1.2.1