diff options
author | Alexander Barkov <bar@mariadb.org> | 2016-07-03 11:20:46 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2016-07-03 11:20:46 +0400 |
commit | 3ccf8218bc03a9cc598cd2da5c5a98ea2412cc05 (patch) | |
tree | e8bc6f5b4600582e87466c22bb7da52fe5cb72dc /sql/item_func.cc | |
parent | f832b47833bd03fbb9e972508097f3f88c0ba184 (diff) | |
download | mariadb-git-3ccf8218bc03a9cc598cd2da5c5a98ea2412cc05.tar.gz |
Partial backporting of 7b50447aa6d051b8d14bb01ef14802cb8ffee223
(MDEV-9407, MDEV-9408) from 10.1
Needed to fix MDEV-10317 easier.
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 51 |
1 files changed, 2 insertions, 49 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 6edb276ca20..0d21183cac8 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -509,43 +509,6 @@ bool Item_func::eq(const Item *item, bool binary_cmp) const } -Field *Item_func::tmp_table_field(TABLE *table) -{ - Field *field= NULL; - MEM_ROOT *mem_root= table->in_use->mem_root; - - switch (result_type()) { - case INT_RESULT: - if (max_char_length() > MY_INT32_NUM_DECIMAL_DIGITS) - field= new (mem_root) - Field_longlong(max_char_length(), maybe_null, name, - unsigned_flag); - else - field= new (mem_root) - Field_long(max_char_length(), maybe_null, name, - unsigned_flag); - break; - case REAL_RESULT: - field= new (mem_root) - Field_double(max_char_length(), maybe_null, name, decimals); - break; - case STRING_RESULT: - return make_string_field(table); - case DECIMAL_RESULT: - field= Field_new_decimal::create_from_item(mem_root, this); - break; - case ROW_RESULT: - case TIME_RESULT: - // This case should never be chosen - DBUG_ASSERT(0); - field= 0; - break; - } - if (field) - field->init(table); - return field; -} - /* bool Item_func::is_expensive_processor(uchar *arg) { @@ -2910,10 +2873,10 @@ void Item_func_min_max::fix_length_and_dec() collation.set_numeric(); fix_char_length(float_length(decimals)); /* - Set type to DOUBLE, as Item_func::tmp_table_field() does not + Set type to DOUBLE, as Item_func::create_tmp_field() does not distinguish between DOUBLE and FLOAT and always creates Field_double. Perhaps we should eventually change this to use agg_field_type() here, - and fix Item_func::tmp_table_field() to create Field_float when possible. + and fix Item_func::create_tmp_field() to create Field_float when possible. */ set_handler_by_field_type(MYSQL_TYPE_DOUBLE); break; @@ -6805,16 +6768,6 @@ longlong Item_func_found_rows::val_int() } -Field * -Item_func_sp::tmp_table_field(TABLE *t_arg) -{ - DBUG_ENTER("Item_func_sp::tmp_table_field"); - - DBUG_ASSERT(sp_result_field); - DBUG_RETURN(sp_result_field); -} - - /** @brief Checks if requested access to function can be granted to user. If function isn't found yet, it searches function first. |