diff options
author | Alexander Barkov <bar@mariadb.com> | 2019-05-14 21:47:38 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2019-05-15 07:21:00 +0400 |
commit | 462d6893977f31ffd4cb35f7eb76b521acfd1fb4 (patch) | |
tree | 38ada44127c26fc8c833988b09a42dbe22186c7c | |
parent | 49373397057aac63b4ce1557c941d508ea87be99 (diff) | |
download | mariadb-git-462d6893977f31ffd4cb35f7eb76b521acfd1fb4.tar.gz |
MDEV-19468 Hybrid type expressions return wrong format for FLOAT
-rw-r--r-- | mysql-test/main/derived_cond_pushdown.result | 2 | ||||
-rw-r--r-- | mysql-test/main/select.result | 14 | ||||
-rw-r--r-- | mysql-test/main/select_jcl6.result | 14 | ||||
-rw-r--r-- | mysql-test/main/select_pkeycache.result | 14 | ||||
-rw-r--r-- | mysql-test/main/type_float.result | 37 | ||||
-rw-r--r-- | mysql-test/main/type_float.test | 37 | ||||
-rw-r--r-- | sql/field.cc | 21 | ||||
-rw-r--r-- | sql/item.cc | 12 | ||||
-rw-r--r-- | sql/item.h | 33 | ||||
-rw-r--r-- | sql/protocol.cc | 2 | ||||
-rw-r--r-- | sql/sql_type.cc | 64 | ||||
-rw-r--r-- | sql/sql_type.h | 15 | ||||
-rw-r--r-- | sql/sql_type_real.h | 35 | ||||
-rw-r--r-- | storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result | 6 | ||||
-rw-r--r-- | storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result | 6 | ||||
-rw-r--r-- | storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result | 6 | ||||
-rw-r--r-- | storage/rocksdb/mysql-test/rocksdb/r/type_float.result | 6 |
17 files changed, 255 insertions, 69 deletions
diff --git a/mysql-test/main/derived_cond_pushdown.result b/mysql-test/main/derived_cond_pushdown.result index fa1cf8c0373..4474cb8c2d9 100644 --- a/mysql-test/main/derived_cond_pushdown.result +++ b/mysql-test/main/derived_cond_pushdown.result @@ -7884,7 +7884,7 @@ EXPLAIN "access_type": "ALL", "rows": 3, "filtered": 100, - "attached_condition": "sq.i = 2.7100000381469727", + "attached_condition": "sq.i = 2.71", "materialized": { "query_block": { "select_id": 2, diff --git a/mysql-test/main/select.result b/mysql-test/main/select.result index 9b6a570717b..352ab4ddef4 100644 --- a/mysql-test/main/select.result +++ b/mysql-test/main/select.result @@ -2789,26 +2789,26 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range key1 key1 5 NULL 3 Using where; Using index select max(key1) from t1 where key1 <= 0.6158; max(key1) -0.6158000230789185 +0.6158 select max(key2) from t2 where key2 <= 1.6158; max(key2) -1.6158000230789185 +1.6158 select min(key1) from t1 where key1 >= 0.3762; min(key1) -0.37619999051094055 +0.3762 select min(key2) from t2 where key2 >= 1.3762; min(key2) -1.3761999607086182 +1.3762 select max(key1), min(key2) from t1, t2 where key1 <= 0.6158 and key2 >= 1.3762; max(key1) min(key2) -0.6158000230789185 1.3761999607086182 +0.6158 1.3762 select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5; max(key1) -0.38449999690055847 +0.3845 select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5; min(key1) -0.38449999690055847 +0.3845 DROP TABLE t1,t2; CREATE TABLE t1 (i BIGINT UNSIGNED NOT NULL); INSERT INTO t1 VALUES (10); diff --git a/mysql-test/main/select_jcl6.result b/mysql-test/main/select_jcl6.result index d78fad15da1..1c7192b75b6 100644 --- a/mysql-test/main/select_jcl6.result +++ b/mysql-test/main/select_jcl6.result @@ -2800,26 +2800,26 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range key1 key1 5 NULL 3 Using where; Using index select max(key1) from t1 where key1 <= 0.6158; max(key1) -0.6158000230789185 +0.6158 select max(key2) from t2 where key2 <= 1.6158; max(key2) -1.6158000230789185 +1.6158 select min(key1) from t1 where key1 >= 0.3762; min(key1) -0.37619999051094055 +0.3762 select min(key2) from t2 where key2 >= 1.3762; min(key2) -1.3761999607086182 +1.3762 select max(key1), min(key2) from t1, t2 where key1 <= 0.6158 and key2 >= 1.3762; max(key1) min(key2) -0.6158000230789185 1.3761999607086182 +0.6158 1.3762 select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5; max(key1) -0.38449999690055847 +0.3845 select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5; min(key1) -0.38449999690055847 +0.3845 DROP TABLE t1,t2; CREATE TABLE t1 (i BIGINT UNSIGNED NOT NULL); INSERT INTO t1 VALUES (10); diff --git a/mysql-test/main/select_pkeycache.result b/mysql-test/main/select_pkeycache.result index 9b6a570717b..352ab4ddef4 100644 --- a/mysql-test/main/select_pkeycache.result +++ b/mysql-test/main/select_pkeycache.result @@ -2789,26 +2789,26 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range key1 key1 5 NULL 3 Using where; Using index select max(key1) from t1 where key1 <= 0.6158; max(key1) -0.6158000230789185 +0.6158 select max(key2) from t2 where key2 <= 1.6158; max(key2) -1.6158000230789185 +1.6158 select min(key1) from t1 where key1 >= 0.3762; min(key1) -0.37619999051094055 +0.3762 select min(key2) from t2 where key2 >= 1.3762; min(key2) -1.3761999607086182 +1.3762 select max(key1), min(key2) from t1, t2 where key1 <= 0.6158 and key2 >= 1.3762; max(key1) min(key2) -0.6158000230789185 1.3761999607086182 +0.6158 1.3762 select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5; max(key1) -0.38449999690055847 +0.3845 select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5; min(key1) -0.38449999690055847 +0.3845 DROP TABLE t1,t2; CREATE TABLE t1 (i BIGINT UNSIGNED NOT NULL); INSERT INTO t1 VALUES (10); diff --git a/mysql-test/main/type_float.result b/mysql-test/main/type_float.result index be7c639ddd3..8e97ab497ea 100644 --- a/mysql-test/main/type_float.result +++ b/mysql-test/main/type_float.result @@ -840,3 +840,40 @@ DROP TABLE t1; # # End of 10.2 tests # +# +# Start of 10.3 tests +# +# +# MDEV-19468 Hybrid type expressions return wrong format for FLOAT +# +CREATE TABLE t1 (a FLOAT); +INSERT INTO t1 VALUES (0.671437); +SELECT a, COALESCE(a), MAX(a), LEAST(a,a), (SELECT a FROM t1) AS c FROM t1; +a COALESCE(a) MAX(a) LEAST(a,a) c +0.671437 0.671437 0.671437 0.671437 0.671437 +DROP TABLE t1; +CREATE TABLE t1 (a FLOAT); +INSERT INTO t1 VALUES (0.671437); +SELECT +CONCAT(a), +CONCAT(COALESCE(a)), +CONCAT(LEAST(a,a)), +CONCAT(MAX(a)), +CONCAT((SELECT a FROM t1)) AS c +FROM t1; +CONCAT(a) CONCAT(COALESCE(a)) CONCAT(LEAST(a,a)) CONCAT(MAX(a)) c +0.671437 0.671437 0.671437 0.671437 0.671437 +CREATE TABLE t2 AS SELECT +CONCAT(a), +CONCAT(COALESCE(a)), +CONCAT(LEAST(a,a)), +CONCAT(MAX(a)), +CONCAT((SELECT a FROM t1)) AS c +FROM t1; +SELECT * FROM t2; +CONCAT(a) CONCAT(COALESCE(a)) CONCAT(LEAST(a,a)) CONCAT(MAX(a)) c +0.671437 0.671437 0.671437 0.671437 0.671437 +DROP TABLE t1, t2; +# +# End of 10.3 tests +# diff --git a/mysql-test/main/type_float.test b/mysql-test/main/type_float.test index 9dba1c709d5..5f9958dbe2b 100644 --- a/mysql-test/main/type_float.test +++ b/mysql-test/main/type_float.test @@ -581,3 +581,40 @@ DROP TABLE t1; --echo # --echo # End of 10.2 tests --echo # + +--echo # +--echo # Start of 10.3 tests +--echo # + +--echo # +--echo # MDEV-19468 Hybrid type expressions return wrong format for FLOAT +--echo # + +CREATE TABLE t1 (a FLOAT); +INSERT INTO t1 VALUES (0.671437); +SELECT a, COALESCE(a), MAX(a), LEAST(a,a), (SELECT a FROM t1) AS c FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 (a FLOAT); +INSERT INTO t1 VALUES (0.671437); +SELECT + CONCAT(a), + CONCAT(COALESCE(a)), + CONCAT(LEAST(a,a)), + CONCAT(MAX(a)), + CONCAT((SELECT a FROM t1)) AS c +FROM t1; +CREATE TABLE t2 AS SELECT + CONCAT(a), + CONCAT(COALESCE(a)), + CONCAT(LEAST(a,a)), + CONCAT(MAX(a)), + CONCAT((SELECT a FROM t1)) AS c +FROM t1; +SELECT * FROM t2; +DROP TABLE t1, t2; + + +--echo # +--echo # End of 10.3 tests +--echo # diff --git a/sql/field.cc b/sql/field.cc index de1121bd322..c6bdb013cdf 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -4556,34 +4556,15 @@ String *Field_float::val_str(String *val_buffer, { ASSERT_COLUMN_MARKED_FOR_READ; DBUG_ASSERT(!zerofill || field_length <= MAX_FIELD_CHARLENGTH); - float nr; - float4get(nr,ptr); - uint to_length= 70; - if (val_buffer->alloc(to_length)) + if (Float(ptr).to_string(val_buffer, dec)) { my_error(ER_OUT_OF_RESOURCES, MYF(0)); return val_buffer; } - char *to=(char*) val_buffer->ptr(); - size_t len; - - if (dec >= FLOATING_POINT_DECIMALS) - len= my_gcvt(nr, MY_GCVT_ARG_FLOAT, to_length - 1, to, NULL); - else - { - /* - We are safe here because the buffer length is 70, and - fabs(float) < 10^39, dec < FLOATING_POINT_DECIMALS. So the resulting string - will be not longer than 69 chars + terminating '\0'. - */ - len= my_fcvt(nr, dec, to, NULL); - } - val_buffer->length((uint) len); if (zerofill) prepend_zeros(val_buffer); - val_buffer->set_charset(&my_charset_numeric); return val_buffer; } diff --git a/sql/item.cc b/sql/item.cc index 99335765066..81d474a014c 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -10153,7 +10153,7 @@ longlong Item_cache_real::val_int() } -String* Item_cache_real::val_str(String *str) +String* Item_cache_double::val_str(String *str) { DBUG_ASSERT(fixed == 1); if (!has_value()) @@ -10163,6 +10163,16 @@ String* Item_cache_real::val_str(String *str) } +String* Item_cache_float::val_str(String *str) +{ + DBUG_ASSERT(fixed == 1); + if (!has_value()) + return NULL; + Float((float) value).to_string(str, decimals); + return str; +} + + my_decimal *Item_cache_real::val_decimal(my_decimal *decimal_val) { DBUG_ASSERT(fixed == 1); diff --git a/sql/item.h b/sql/item.h index f6dfbce10b2..2adc111db03 100644 --- a/sql/item.h +++ b/sql/item.h @@ -6186,21 +6186,44 @@ public: class Item_cache_real: public Item_cache { +protected: double value; public: - Item_cache_real(THD *thd): Item_cache(thd, &type_handler_double), - value(0) {} - + Item_cache_real(THD *thd, const Type_handler *h) + :Item_cache(thd, h), + value(0) + {} double val_real(); longlong val_int(); - String* val_str(String *str); my_decimal *val_decimal(my_decimal *); bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate) { return get_date_from_real(ltime, fuzzydate); } bool cache_value(); Item *convert_to_basic_const_item(THD *thd); +}; + + +class Item_cache_double: public Item_cache_real +{ +public: + Item_cache_double(THD *thd) + :Item_cache_real(thd, &type_handler_double) + { } + String* val_str(String *str); + Item *get_copy(THD *thd) + { return get_item_copy<Item_cache_double>(thd, this); } +}; + + +class Item_cache_float: public Item_cache_real +{ +public: + Item_cache_float(THD *thd) + :Item_cache_real(thd, &type_handler_float) + { } + String* val_str(String *str); Item *get_copy(THD *thd) - { return get_item_copy<Item_cache_real>(thd, this); } + { return get_item_copy<Item_cache_float>(thd, this); } }; diff --git a/sql/protocol.cc b/sql/protocol.cc index edd084c2132..84ca4585a12 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -1209,7 +1209,7 @@ bool Protocol_text::store(float from, uint32 decimals, String *buffer) field_types[field_pos] == MYSQL_TYPE_FLOAT); field_pos++; #endif - buffer->set_real((double) from, decimals, thd->charset()); + Float(from).to_string(buffer, decimals); return net_store_data((uchar*) buffer->ptr(), buffer->length()); } diff --git a/sql/sql_type.cc b/sql/sql_type.cc index 39d9fc5c2bd..b984dd8eb3b 100644 --- a/sql/sql_type.cc +++ b/sql/sql_type.cc @@ -125,6 +125,32 @@ bool Type_handler_data::init() Type_handler_data *type_handler_data= NULL; +bool Float::to_string(String *val_buffer, uint dec) const +{ + uint to_length= 70; + if (val_buffer->alloc(to_length)) + return true; + + char *to=(char*) val_buffer->ptr(); + size_t len; + + if (dec >= FLOATING_POINT_DECIMALS) + len= my_gcvt(m_value, MY_GCVT_ARG_FLOAT, to_length - 1, to, NULL); + else + { + /* + We are safe here because the buffer length is 70, and + fabs(float) < 10^39, dec < FLOATING_POINT_DECIMALS. So the resulting string + will be not longer than 69 chars + terminating '\0'. + */ + len= my_fcvt(m_value, (int) dec, to, NULL); + } + val_buffer->length((uint) len); + val_buffer->set_charset(&my_charset_numeric); + return false; +} + + void Time::make_from_item(Item *item, const Options opt) { if (item->get_date(this, opt.get_date_flags())) @@ -2708,9 +2734,15 @@ Type_handler_year::Item_get_cache(THD *thd, const Item *item) const } Item_cache * -Type_handler_real_result::Item_get_cache(THD *thd, const Item *item) const +Type_handler_double::Item_get_cache(THD *thd, const Item *item) const +{ + return new (thd->mem_root) Item_cache_double(thd); +} + +Item_cache * +Type_handler_float::Item_get_cache(THD *thd, const Item *item) const { - return new (thd->mem_root) Item_cache_real(thd); + return new (thd->mem_root) Item_cache_float(thd); } Item_cache * @@ -3575,7 +3607,7 @@ Type_handler_int_result::Item_func_hybrid_field_type_get_date( /***************************************************************************/ String * -Type_handler_real_result::Item_func_hybrid_field_type_val_str( +Type_handler_double::Item_func_hybrid_field_type_val_str( Item_func_hybrid_field_type *item, String *str) const { @@ -3583,6 +3615,19 @@ Type_handler_real_result::Item_func_hybrid_field_type_val_str( } +String * +Type_handler_float::Item_func_hybrid_field_type_val_str( + Item_func_hybrid_field_type *item, + String *str) const +{ + Float nr(item->real_op()); + if (item->null_value) + return 0; + nr.to_string(str, item->decimals); + return str; +} + + double Type_handler_real_result::Item_func_hybrid_field_type_val_real( Item_func_hybrid_field_type *item) @@ -4042,13 +4087,24 @@ String *Type_handler_decimal_result:: } -String *Type_handler_real_result:: +String *Type_handler_double:: Item_func_min_max_val_str(Item_func_min_max *func, String *str) const { return func->val_string_from_real(str); } +String *Type_handler_float:: + Item_func_min_max_val_str(Item_func_min_max *func, String *str) const +{ + Float nr(func->val_real()); + if (func->null_value) + return 0; + nr.to_string(str, func->decimals); + return str; +} + + double Type_handler_string_result:: Item_func_min_max_val_real(Item_func_min_max *func) const { diff --git a/sql/sql_type.h b/sql/sql_type.h index 3a5a00231ca..b317832880a 100644 --- a/sql/sql_type.h +++ b/sql/sql_type.h @@ -25,6 +25,7 @@ #include "sql_array.h" #include "sql_const.h" #include "sql_time.h" +#include "sql_type_real.h" class Field; class Column_definition; @@ -1779,7 +1780,6 @@ public: const st_value *value) const; int Item_save_in_field(Item *item, Field *field, bool no_conversions) const; Item *make_const_item_for_comparison(THD *, Item *src, const Item *cmp) const; - Item_cache *Item_get_cache(THD *thd, const Item *item) const; bool set_comparator_func(Arg_comparator *cmp) const; bool Item_hybrid_func_fix_attributes(THD *thd, const char *name, @@ -1799,8 +1799,6 @@ public: longlong Item_val_int_signed_typecast(Item *item) const; longlong Item_val_int_unsigned_typecast(Item *item) const; String *Item_func_hex_val_str_ascii(Item_func_hex *item, String *str) const; - String *Item_func_hybrid_field_type_val_str(Item_func_hybrid_field_type *, - String *) const; double Item_func_hybrid_field_type_val_real(Item_func_hybrid_field_type *) const; longlong Item_func_hybrid_field_type_val_int(Item_func_hybrid_field_type *) @@ -1811,7 +1809,6 @@ public: bool Item_func_hybrid_field_type_get_date(Item_func_hybrid_field_type *, MYSQL_TIME *, ulonglong fuzzydate) const; - String *Item_func_min_max_val_str(Item_func_min_max *, String *) const; longlong Item_func_between_val_int(Item_func_between *func) const; cmp_item *make_cmp_item(THD *thd, CHARSET_INFO *cs) const; in_vector *make_in_vector(THD *, const Item_func_in *, uint nargs) const; @@ -2611,6 +2608,11 @@ public: TABLE *table) const; void Item_param_set_param_func(Item_param *param, uchar **pos, ulong len) const; + + Item_cache *Item_get_cache(THD *thd, const Item *item) const; + String *Item_func_hybrid_field_type_val_str(Item_func_hybrid_field_type *, + String *) const; + String *Item_func_min_max_val_str(Item_func_min_max *, String *) const; }; @@ -2643,6 +2645,11 @@ public: TABLE *table) const; void Item_param_set_param_func(Item_param *param, uchar **pos, ulong len) const; + + Item_cache *Item_get_cache(THD *thd, const Item *item) const; + String *Item_func_hybrid_field_type_val_str(Item_func_hybrid_field_type *, + String *) const; + String *Item_func_min_max_val_str(Item_func_min_max *, String *) const; }; diff --git a/sql/sql_type_real.h b/sql/sql_type_real.h new file mode 100644 index 00000000000..f1024ac453e --- /dev/null +++ b/sql/sql_type_real.h @@ -0,0 +1,35 @@ +/* Copyright (c) 2019 MariaDB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ + +#ifndef SQL_TYPE_REAL_INCLUDED +#define SQL_TYPE_REAL_INCLUDED + + +class Float +{ + float m_value; +public: + Float(float nr) + :m_value(nr) + { } + Float(const uchar *ptr) + { + float4get(m_value, ptr); + } + bool to_string(String *to, uint dec) const; +}; + + +#endif // SQL_TYPE_REAL_INCLUDED diff --git a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result index 64d87b7116d..e5a8d2dd2d3 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result @@ -1654,15 +1654,15 @@ CONCAT('', MAX(d1_0)), CONCAT('', MAX(d10_10)), CONCAT('', MAX(d53)), CONCAT('', MAX(d53_10)) FROM t1; -CONCAT('', MAX(f)) 9.999999680285692e37 +CONCAT('', MAX(f)) 1e38 CONCAT('', MAX(d)) 1e81 CONCAT('', MAX(d10_10)) 0.9999999999 CONCAT('', MAX(d1_0)) 9 CONCAT('', MAX(d53)) 100000000000000000000000000000000000000000000000000000 CONCAT('', MAX(d53_10)) 10000000000000000000000000000000000000000000.0000000000 -CONCAT('', MAX(f0)) 9.999999680285692e37 +CONCAT('', MAX(f0)) 1e38 CONCAT('', MAX(f20_3)) 99999998430674940.000 -CONCAT('', MAX(f23_0)) 9.999999680285692e37 +CONCAT('', MAX(f23_0)) 1e38 CONCAT('', MAX(r1_1)) 0.9 INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES ( 9999999999999999999999999999999999999999999999999999999999999.9999, diff --git a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result index ba651fcbb14..ac87cb02571 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result @@ -1441,15 +1441,15 @@ CONCAT('', MAX(d1_0)), CONCAT('', MAX(d10_10)), CONCAT('', MAX(d53)), CONCAT('', MAX(d53_10)) FROM t1; -CONCAT('', MAX(f)) 9.999999680285692e37 +CONCAT('', MAX(f)) 1e38 CONCAT('', MAX(d)) 1e81 CONCAT('', MAX(d10_10)) 0.9999999999 CONCAT('', MAX(d1_0)) 9 CONCAT('', MAX(d53)) 100000000000000000000000000000000000000000000000000000 CONCAT('', MAX(d53_10)) 10000000000000000000000000000000000000000000.0000000000 -CONCAT('', MAX(f0)) 9.999999680285692e37 +CONCAT('', MAX(f0)) 1e38 CONCAT('', MAX(f20_3)) 99999998430674940.000 -CONCAT('', MAX(f23_0)) 9.999999680285692e37 +CONCAT('', MAX(f23_0)) 1e38 CONCAT('', MAX(r1_1)) 0.9 INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES ( 9999999999999999999999999999999999999999999999999999999999999.9999, diff --git a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result index b931743d59a..439f9be9a8a 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result @@ -328,15 +328,15 @@ CONCAT('', MAX(d1_0)), CONCAT('', MAX(d10_10)), CONCAT('', MAX(d53)), CONCAT('', MAX(d53_10)) FROM t1; -CONCAT('', MAX(f)) 9.999999680285692e37 +CONCAT('', MAX(f)) 1e38 CONCAT('', MAX(d)) 1e81 CONCAT('', MAX(d10_10)) 0.9999999999 CONCAT('', MAX(d1_0)) 9 CONCAT('', MAX(d53)) 100000000000000000000000000000000000000000000000000000 CONCAT('', MAX(d53_10)) 10000000000000000000000000000000000000000000.0000000000 -CONCAT('', MAX(f0)) 9.999999680285692e37 +CONCAT('', MAX(f0)) 1e38 CONCAT('', MAX(f20_3)) 99999998430674940.000 -CONCAT('', MAX(f23_0)) 9.999999680285692e37 +CONCAT('', MAX(f23_0)) 1e38 CONCAT('', MAX(r1_1)) 0.9 INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES ( 9999999999999999999999999999999999999999999999999999999999999.9999, diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_float.result b/storage/rocksdb/mysql-test/rocksdb/r/type_float.result index 778ed95d338..371b550d4ab 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/type_float.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/type_float.result @@ -138,15 +138,15 @@ CONCAT('', MAX(d1_0)), CONCAT('', MAX(d10_10)), CONCAT('', MAX(d53)), CONCAT('', MAX(d53_10)) FROM t1; -CONCAT('', MAX(f)) 9.999999680285692e37 +CONCAT('', MAX(f)) 1e38 CONCAT('', MAX(d)) 1e81 CONCAT('', MAX(d10_10)) 0.9999999999 CONCAT('', MAX(d1_0)) 9 CONCAT('', MAX(d53)) 100000000000000000000000000000000000000000000000000000 CONCAT('', MAX(d53_10)) 10000000000000000000000000000000000000000000.0000000000 -CONCAT('', MAX(f0)) 9.999999680285692e37 +CONCAT('', MAX(f0)) 1e38 CONCAT('', MAX(f20_3)) 99999998430674940.000 -CONCAT('', MAX(f23_0)) 9.999999680285692e37 +CONCAT('', MAX(f23_0)) 1e38 CONCAT('', MAX(r1_1)) 0.9 INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES ( 9999999999999999999999999999999999999999999999999999999999999.9999, |