Commit e1c4d6d8 authored by unknown's avatar unknown
Browse files

A test case for Bug#7670 "Loss of precision for some integer

values stored into DOUBLE column" (Can't repeat)


mysql-test/r/type_decimal.result:
  Test results fixed (Bug#7670)
mysql-test/t/type_decimal.test:
  A test case for Bug#7670
parent a4a906b9
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -772,3 +772,16 @@ productid zlevelprice
003trans	39.98
004trans	31.18
drop table t1, t2;
create table t1 (a double(53,0));
insert into t1 values (9988317491112007680) ,(99883133042600208184115200);
select a from t1;
a
9988317491112007680
99883133042600208184115200
truncate t1;
insert into t1 values (9988317491112007680.0) ,(99883133042600208184115200.0);
select a from t1;
a
9988317491112007680
99883133042600208184115200
drop table t1;
+13 −0
Original line number Diff line number Diff line
@@ -376,3 +376,16 @@ insert INTO t2 SELECT * FROM t1;

select * from t2; 
drop table t1, t2;

# 
# A test case for Bug#7670 "Loss of precision for some integer values stored
# into DOUBLE column": check that there is no truncation
# when inserting big integers into double columns.
#
create table t1 (a double(53,0));
insert into t1 values (9988317491112007680) ,(99883133042600208184115200);
select a from t1;
truncate t1;
insert into t1 values (9988317491112007680.0) ,(99883133042600208184115200.0);
select a from t1;
drop table t1;