diff options
author | unknown <sanja@askmonty.org> | 2013-09-25 21:07:06 +0300 |
---|---|---|
committer | unknown <sanja@askmonty.org> | 2013-09-25 21:07:06 +0300 |
commit | 9d83468e78ba23f024ce3c11443913ad75cf1ea5 (patch) | |
tree | 0cef7fa6a3fd2e47fe22d105b2b8bbfe1b5a03e0 /sql/item_cmpfunc.h | |
parent | 2fe0836eed16ce5809c34064893681f12c77da9f (diff) | |
parent | 64d6d8334fa63a0faa6d91ded21eca8e3871c7ec (diff) | |
download | mariadb-git-9d83468e78ba23f024ce3c11443913ad75cf1ea5.tar.gz |
merge 5.5 -> 10.0-base
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 4901b146b39..19c43f9e55b 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -765,11 +765,6 @@ public: my_decimal *decimal_op(my_decimal *); bool date_op(MYSQL_TIME *ltime,uint fuzzydate); void fix_length_and_dec(); - void update_used_tables() - { - Item_func_coalesce::update_used_tables(); - maybe_null|= args[1]->maybe_null; - } const char *func_name() const { return "ifnull"; } Field *tmp_table_field(TABLE *table); uint decimal_precision() const; @@ -789,11 +784,6 @@ public: String *str_op(String *); bool fix_fields(THD *, Item **); void fix_length_and_dec(); - void update_used_tables() - { - Item_func::update_used_tables(); - maybe_null|= args[1]->maybe_null || args[2]->maybe_null; - } uint decimal_precision() const; const char *func_name() const { return "if"; } bool eval_not_null_tables(uchar *opt_arg); @@ -1259,12 +1249,6 @@ public: bool date_op(MYSQL_TIME *ltime, uint fuzzydate); bool fix_fields(THD *thd, Item **ref); void fix_length_and_dec(); - void update_used_tables() - { - Item_func::update_used_tables(); - if (else_expr_num == -1 || args[else_expr_num]->maybe_null) - maybe_null= 1; - } uint decimal_precision() const; table_map not_null_tables() const { return 0; } const char *func_name() const { return "case"; } @@ -1384,14 +1368,13 @@ public: enum Functype functype() const { return ISNULL_FUNC; } void fix_length_and_dec() { - decimals=0; max_length=1; set_persist_maybe_null(0); + decimals=0; max_length=1; maybe_null=0; update_used_tables(); } const char *func_name() const { return "isnull"; } /* Optimize case of not_null_column IS NULL */ virtual void update_used_tables() { - args[0]->update_used_tables(); if (!args[0]->maybe_null) { used_tables_cache= 0; /* is always false */ @@ -1399,6 +1382,7 @@ public: } else { + args[0]->update_used_tables(); used_tables_cache= args[0]->used_tables(); const_item_cache= args[0]->const_item(); } @@ -1446,7 +1430,7 @@ public: enum Functype functype() const { return ISNOTNULL_FUNC; } void fix_length_and_dec() { - decimals=0; max_length=1; set_persist_maybe_null(0); + decimals=0; max_length=1; maybe_null=0; } const char *func_name() const { return "isnotnull"; } optimize_type select_optimize() const { return OPTIMIZE_NULL; } @@ -1517,12 +1501,6 @@ public: void cleanup(); longlong val_int(); bool fix_fields(THD *thd, Item **ref); - void update_used_tables() - { - Item_bool_func::update_used_tables(); - if (regex_is_const) - maybe_null= 1; - } const char *func_name() const { return "regexp"; } virtual inline void print(String *str, enum_query_type query_type) |