diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-09-06 14:25:20 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-09-06 14:25:20 +0300 |
commit | 780d2bb8a7eca4fdbdf70fbd51c0bdbae5b0057e (patch) | |
tree | b7447115f45de0f03bbe18c26fc0866367483066 /sql/item_func.h | |
parent | db9e41ddc31f2e705a54132cf69c781e1cc60f07 (diff) | |
parent | 18af13b88ba580562981a190c25da128a2e9db26 (diff) | |
download | mariadb-git-780d2bb8a7eca4fdbdf70fbd51c0bdbae5b0057e.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'sql/item_func.h')
-rw-r--r-- | sql/item_func.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index 22832543242..f1212033b6c 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1715,21 +1715,36 @@ public: /* This handles round and truncate */ -class Item_func_round :public Item_func_numhybrid +class Item_func_round :public Item_func_hybrid_field_type { bool truncate; void fix_length_and_dec_decimal(uint decimals_to_set); void fix_length_and_dec_double(uint decimals_to_set); public: Item_func_round(THD *thd, Item *a, Item *b, bool trunc_arg) - :Item_func_numhybrid(thd, a, b), truncate(trunc_arg) {} + :Item_func_hybrid_field_type(thd, a, b), truncate(trunc_arg) {} const char *func_name() const { return truncate ? "truncate" : "round"; } double real_op(); longlong int_op(); my_decimal *decimal_op(my_decimal *); + bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate); + bool time_op(THD *thd, MYSQL_TIME *ltime); + bool native_op(THD *thd, Native *to) + { + DBUG_ASSERT(0); + return true; + } + String *str_op(String *str) + { + DBUG_ASSERT(0); + return NULL; + } void fix_arg_decimal(); void fix_arg_int(); void fix_arg_double(); + void fix_arg_time(); + void fix_arg_datetime(); + void fix_arg_temporal(const Type_handler *h, uint int_part_length); bool fix_length_and_dec() { return args[0]->type_handler()->Item_func_round_fix_length_and_dec(this); |