diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-10-04 08:24:06 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-10-04 08:24:06 +0300 |
commit | 2c1067166d7e8a9541578220b408f1e553e23916 (patch) | |
tree | 2ba0932f92d88e01d51393de63dda842f6daf320 /sql/item_cmpfunc.h | |
parent | 2cf3e2ea2fca3d3613309de94d55c88dedb3831a (diff) | |
parent | 61b2618d3aae78950f1b8dbe8d4482573c77875d (diff) | |
download | mariadb-git-2c1067166d7e8a9541578220b408f1e553e23916.tar.gz |
Merge bb-10.2-ext into 10.3
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 0756899f47c..f0862608463 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -930,6 +930,8 @@ public: class Item_func_strcmp :public Item_long_func { + bool check_arguments() const + { return check_argument_types_can_return_str(0, 2); } String value1, value2; DTCollation cmp_collation; public: @@ -993,7 +995,7 @@ public: longlong int_op(); String *str_op(String *); my_decimal *decimal_op(my_decimal *); - bool date_op(MYSQL_TIME *ltime,uint fuzzydate); + bool date_op(MYSQL_TIME *ltime, ulonglong fuzzydate); void fix_length_and_dec() { if (!aggregate_for_result(func_name(), args, arg_count, true)) @@ -1065,7 +1067,7 @@ public: longlong int_op(); String *str_op(String *str); my_decimal *decimal_op(my_decimal *); - bool date_op(MYSQL_TIME *ltime,uint fuzzydate); + bool date_op(MYSQL_TIME *ltime, ulonglong fuzzydate); void fix_length_and_dec() { Item_func_case_abbreviation2::fix_length_and_dec2(args); @@ -1097,7 +1099,7 @@ public: :Item_func_case_abbreviation2(thd, a, b, c) { } - bool date_op(MYSQL_TIME *ltime, uint fuzzydate) + bool date_op(MYSQL_TIME *ltime, ulonglong fuzzydate) { return get_date_with_conversion_from_item(find_item(), ltime, fuzzydate); } @@ -1210,7 +1212,7 @@ public: Item_func_hybrid_field_type::cleanup(); arg_count= 2; // See the comment to the constructor } - bool date_op(MYSQL_TIME *ltime, uint fuzzydate); + bool date_op(MYSQL_TIME *ltime, ulonglong fuzzydate); double real_op(); longlong int_op(); String *str_op(String *str); @@ -2099,7 +2101,7 @@ public: longlong int_op(); String *str_op(String *); my_decimal *decimal_op(my_decimal *); - bool date_op(MYSQL_TIME *ltime, uint fuzzydate); + bool date_op(MYSQL_TIME *ltime, ulonglong fuzzydate); bool fix_fields(THD *thd, Item **ref); table_map not_null_tables() const { return 0; } const char *func_name() const { return "case"; } @@ -2829,6 +2831,11 @@ public: */ class Item_func_regexp_instr :public Item_long_func { + bool check_arguments() const + { + return args[0]->check_type_can_return_str(func_name()) || + args[1]->check_type_can_return_text(func_name()); + } Regexp_processor_pcre re; DTCollation cmp_collation; public: |