summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-02-12 03:10:26 +0200
committerunknown <bell@sanja.is.com.ua>2004-02-12 03:10:26 +0200
commit4b37cf65f7d9d83005fd73dc05fae39639303f24 (patch)
treeec08c4d5b30f56815e8bfdacd0319bbcbd9f1abb /sql/item_cmpfunc.h
parent73c56ba8a59e87500aede58b2931223799cf153d (diff)
downloadmariadb-git-4b37cf65f7d9d83005fd73dc05fae39639303f24.tar.gz
memory leacks in PS with subqueries fixed (adddition to fix of BUG#2462)
sql/item.h: mechanism to keep reference in cache array for row IN sql/item_cmpfunc.cc: mechanism to keep reference in cache array for row IN layout fixed sql/item_cmpfunc.h: mechanism to keep reference in cache array for row IN sql/item_subselect.cc: fixed memory pools swapping prevented deleting Item_in_optimizer cache in case of row IN subquery sql/mysql_priv.h: declarations of function moved to be useful in sql_class.h sql/sql_base.cc: keep fields expanded from '*' in statement memory pool sql/sql_class.cc: fixed restoring/backup of memory pool and list of items sql/sql_class.h: memory allocation methods moved to Statement memory pool substituting for preparing sql/sql_lex.cc: ref_pointer_array kept in statement memory sql/sql_lex.h: reinitialization of UNIT sql/sql_prepare.cc: memory allocation/swapping fixed tests/client_test.c: layout fixed
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r--sql/item_cmpfunc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index b6f78827ca5..e0f8c313bcd 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -91,9 +91,10 @@ class Item_in_optimizer: public Item_bool_func
{
protected:
Item_cache *cache;
+ bool save_cache;
public:
Item_in_optimizer(Item *a, Item_in_subselect *b):
- Item_bool_func(a, (Item *)b), cache(0) {}
+ Item_bool_func(a, (Item *)b), cache(0), save_cache(0) {}
bool fix_fields(THD *, struct st_table_list *, Item **);
bool fix_left(THD *thd, struct st_table_list *tables, Item **ref);
bool is_null();
@@ -108,6 +109,7 @@ public:
void cleanup();
const char *func_name() const { return "<in_optimizer>"; }
Item_cache **get_cache() { return &cache; }
+ void keep_top_level_cache();
};
class Comp_creator