diff options
author | Alexander Barkov <bar@mariadb.com> | 2019-08-09 23:17:01 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2019-08-09 23:17:01 +0400 |
commit | d5f5cd2831d52fc9e676aa5d9a158cc0652dd3f0 (patch) | |
tree | 0cad4621396a9adf9b75c25df896224f41aec5df /sql/item_func.h | |
parent | 3e27677b596c03cb22a125fe799977d57c5dc0b4 (diff) | |
download | mariadb-git-d5f5cd2831d52fc9e676aa5d9a158cc0652dd3f0.tar.gz |
A cleanup: removing duplicate code: Item_func::val_decimal()
Using val_decimal_from_int() instead, which provides exactly
the same functionality.
Diffstat (limited to 'sql/item_func.h')
-rw-r--r-- | sql/item_func.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index 00ed688e9e3..17f5378910c 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -192,8 +192,6 @@ public: { return tmp_table_field_from_field_type(root, table); } Item *get_tmp_table_item(THD *thd); - my_decimal *val_decimal(my_decimal *); - void fix_char_length_ulonglong(ulonglong max_char_length_arg) { ulonglong max_result_length= max_char_length_arg * @@ -1005,6 +1003,10 @@ public: { collation.set_numeric(); } double val_real(); String *val_str(String*str); + my_decimal *val_decimal(my_decimal *decimal_value) + { + return val_decimal_from_int(decimal_value); + } bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) { return get_date_from_int(thd, ltime, fuzzydate); } const Type_handler *type_handler() const= 0; @@ -2424,6 +2426,10 @@ public: Item_udf_func(thd, udf_arg, list) {} longlong val_int(); double val_real() { return (double) Item_func_udf_int::val_int(); } + my_decimal *val_decimal(my_decimal *decimal_value) + { + return val_decimal_from_int(decimal_value); + } String *val_str(String *str); const Type_handler *type_handler() const { return &type_handler_longlong; } bool fix_length_and_dec() { decimals= 0; max_length= 21; return FALSE; } |