diff options
author | monty@mashka.mysql.fi <> | 2003-08-11 22:44:43 +0300 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2003-08-11 22:44:43 +0300 |
commit | 2263e3e51faba531a0a7055dbf706a6a8719ad70 (patch) | |
tree | 3c0ddcb446b8be099c3ab2616c459a573ee3cf92 /sql/item_cmpfunc.h | |
parent | 1279f9b024614cf97cf447cfb10d6d7d69abb8bc (diff) | |
parent | 6e7a509d06824447e427dd44d5692489267d9c4b (diff) | |
download | mariadb-git-2263e3e51faba531a0a7055dbf706a6a8719ad70.tar.gz |
Merge with 4.0.14
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 25cc97d60bf..2570a86ea80 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -291,6 +291,7 @@ public: enum Item_result result_type () const { return cached_result_type; } void fix_length_and_dec(); const char *func_name() const { return "ifnull"; } + table_map not_null_tables() const { return 0; } }; @@ -312,6 +313,7 @@ public: } void fix_length_and_dec(); const char *func_name() const { return "if"; } + table_map not_null_tables() const { return 0; } }; @@ -328,6 +330,7 @@ public: enum Item_result result_type () const { return cached_result_type; } void fix_length_and_dec(); const char *func_name() const { return "nullif"; } + table_map not_null_tables() const { return 0; } }; @@ -344,8 +347,10 @@ public: void fix_length_and_dec(); enum Item_result result_type () const { return cached_result_type; } const char *func_name() const { return "coalesce"; } + table_map not_null_tables() const { return 0; } }; + class Item_func_case :public Item_func { int first_expr_num, else_expr_num; @@ -376,6 +381,7 @@ public: longlong val_int(); String *val_str(String *); void fix_length_and_dec(); + table_map not_null_tables() const { return 0; } enum Item_result result_type () const { return cached_result_type; } const char *func_name() const { return "case"; } void print(String *str); @@ -668,6 +674,7 @@ public: } } } + table_map not_null_tables() const { return 0; } optimize_type select_optimize() const { return OPTIMIZE_NULL; } }; @@ -699,8 +706,10 @@ public: } const char *func_name() const { return "isnotnull"; } optimize_type select_optimize() const { return OPTIMIZE_NULL; } + table_map not_null_tables() const { return 0; } }; + class Item_func_like :public Item_bool_func2 { char escape; @@ -773,6 +782,8 @@ class Item_cond :public Item_bool_func protected: List<Item> list; bool abort_on_null; + table_map and_tables_cache; + public: /* Item_cond() is only used to create top level items */ Item_cond() : Item_bool_func(), abort_on_null(1) { const_item_cache=0; } @@ -812,15 +823,23 @@ public: enum Functype functype() const { return COND_OR_FUNC; } longlong val_int(); const char *func_name() const { return "or"; } + table_map not_null_tables() const { return and_tables_cache; } }; +/* + XOR is Item_cond, not an Item_int_func bevause we could like to + optimize (a XOR b) later on. It's low prio, though +*/ + class Item_cond_xor :public Item_cond { public: Item_cond_xor() :Item_cond() {} Item_cond_xor(Item *i1,Item *i2) :Item_cond(i1,i2) {} enum Functype functype() const { return COND_XOR_FUNC; } + /* TODO: remove the next line when implementing XOR optimization */ + enum Type type() const { return FUNC_ITEM; } longlong val_int(); const char *func_name() const { return "xor"; } }; |