Commit f693473f authored by konstantin@mysql.com's avatar konstantin@mysql.com

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

values stored into DOUBLE column" (Can't repeat)
parent 905fdbf1
......@@ -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;
......@@ -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;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment