diff options
author | bell@sanja.is.com.ua <> | 2004-02-17 11:12:55 +0200 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2004-02-17 11:12:55 +0200 |
commit | a66b398eb8a8365c2070939a0a826be1d6a8708b (patch) | |
tree | 7656414131e3abbff86bae92c090d0209cd07663 /sql/item_cmpfunc.cc | |
parent | 8a865250c4180ee197c4626560eb46c2cea0a696 (diff) | |
parent | 44b37b089adbcef7efa8a9030732c4689e3a42ed (diff) | |
download | mariadb-git-a66b398eb8a8365c2070939a0a826be1d6a8708b.tar.gz |
merge
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r-- | sql/item_cmpfunc.cc | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 1bba934cf8f..f0bc73e9501 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -500,7 +500,6 @@ bool Item_in_optimizer::fix_left(THD *thd, } - bool Item_in_optimizer::fix_fields(THD *thd, struct st_table_list *tables, Item ** ref) { @@ -526,6 +525,7 @@ bool Item_in_optimizer::fix_fields(THD *thd, struct st_table_list *tables, return 0; } + longlong Item_in_optimizer::val_int() { cache->store(args[0]); @@ -539,18 +539,38 @@ longlong Item_in_optimizer::val_int() return tmp; } + +void Item_in_optimizer::keep_top_level_cache() +{ + cache->keep_array(); + save_cache= 1; +} + + +void Item_in_optimizer::cleanup() +{ + DBUG_ENTER("Item_in_optimizer::cleanup"); + Item_bool_func::cleanup(); + if (!save_cache) + cache= 0; + DBUG_VOID_RETURN; +} + + bool Item_in_optimizer::is_null() { cache->store(args[0]); return (null_value= (cache->null_value || args[1]->is_null())); } + longlong Item_func_eq::val_int() { int value= cmp.compare(); return value == 0 ? 1 : 0; } + /* Same as Item_func_eq, but NULL = NULL */ void Item_func_equal::fix_length_and_dec() |