Loading mysql-test/r/cast.result +6 −0 Original line number Diff line number Diff line Loading @@ -203,3 +203,9 @@ cast(@v1 as decimal(22, 2)) select cast(-1e18 as decimal(22,2)); cast(-1e18 as decimal(22,2)) -1000000000000000000.00 create table t1(s1 time); insert into t1 values ('11:11:11'); select cast(s1 as decimal(7,2)) from t1; cast(s1 as decimal(7,2)) 111111.00 drop table t1; mysql-test/r/func_group.result +0 −1 Original line number Diff line number Diff line Loading @@ -855,7 +855,6 @@ select col1,sum(col1),max(col1),min(col1) from t1 group by col1; col1 sum(col1) max(col1) min(col1) 5.000000000010 10.000000000020 5.000000000010 5.000000000010 DROP TABLE t1; CREATE TABLE t1( id int PRIMARY KEY, a int, Loading mysql-test/t/cast.test +5 −0 Original line number Diff line number Diff line Loading @@ -126,3 +126,8 @@ select cast(cast('1.2' as decimal(3,2)) as signed); set @v1=1e18; select cast(@v1 as decimal(22, 2)); select cast(-1e18 as decimal(22,2)); create table t1(s1 time); insert into t1 values ('11:11:11'); select cast(s1 as decimal(7,2)) from t1; drop table t1; sql/field.cc +0 −1 Original line number Diff line number Diff line Loading @@ -626,7 +626,6 @@ int Field_str::store_decimal(const my_decimal *d) my_decimal *Field_str::val_decimal(my_decimal *decimal_value) { DBUG_ASSERT(result_type() == INT_RESULT); longlong nr= val_int(); int2my_decimal(E_DEC_FATAL_ERROR, nr, 0, decimal_value); return decimal_value; Loading Loading
mysql-test/r/cast.result +6 −0 Original line number Diff line number Diff line Loading @@ -203,3 +203,9 @@ cast(@v1 as decimal(22, 2)) select cast(-1e18 as decimal(22,2)); cast(-1e18 as decimal(22,2)) -1000000000000000000.00 create table t1(s1 time); insert into t1 values ('11:11:11'); select cast(s1 as decimal(7,2)) from t1; cast(s1 as decimal(7,2)) 111111.00 drop table t1;
mysql-test/r/func_group.result +0 −1 Original line number Diff line number Diff line Loading @@ -855,7 +855,6 @@ select col1,sum(col1),max(col1),min(col1) from t1 group by col1; col1 sum(col1) max(col1) min(col1) 5.000000000010 10.000000000020 5.000000000010 5.000000000010 DROP TABLE t1; CREATE TABLE t1( id int PRIMARY KEY, a int, Loading
mysql-test/t/cast.test +5 −0 Original line number Diff line number Diff line Loading @@ -126,3 +126,8 @@ select cast(cast('1.2' as decimal(3,2)) as signed); set @v1=1e18; select cast(@v1 as decimal(22, 2)); select cast(-1e18 as decimal(22,2)); create table t1(s1 time); insert into t1 values ('11:11:11'); select cast(s1 as decimal(7,2)) from t1; drop table t1;
sql/field.cc +0 −1 Original line number Diff line number Diff line Loading @@ -626,7 +626,6 @@ int Field_str::store_decimal(const my_decimal *d) my_decimal *Field_str::val_decimal(my_decimal *decimal_value) { DBUG_ASSERT(result_type() == INT_RESULT); longlong nr= val_int(); int2my_decimal(E_DEC_FATAL_ERROR, nr, 0, decimal_value); return decimal_value; Loading