summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/bigint.result8
-rw-r--r--mysql-test/t/bigint.test4
2 files changed, 10 insertions, 2 deletions
diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result
index 2b595c2b83d..308adc881f2 100644
--- a/mysql-test/r/bigint.result
+++ b/mysql-test/r/bigint.result
@@ -15,9 +15,11 @@ select 9223372036854775808+1;
9223372036854775809
drop table if exists t1;
create table t1 (a bigint unsigned not null, primary key(a));
-insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE);
+insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612);
select * from t1;
a
+18446744073709551612
+18446744073709551613
18446744073709551614
18446744073709551615
select * from t1 where a=18446744073709551615;
@@ -26,6 +28,8 @@ a
delete from t1 where a=18446744073709551615;
select * from t1;
a
+18446744073709551612
+18446744073709551613
18446744073709551614
drop table t1;
create table t1 ( a int not null default 1, big bigint );
@@ -69,9 +73,11 @@ id a
drop table t1;
CREATE TABLE t1 ( quantity decimal(60,0));
insert into t1 values (10000000000000000000);
+insert into t1 values (10000000000000000000.0);
insert into t1 values ('10000000000000000000');
select * from t1;
quantity
+-8446744073709551616
10000000000000000000
10000000000000000000
drop table t1;
diff --git a/mysql-test/t/bigint.test b/mysql-test/t/bigint.test
index a7cc068ec46..f21f821e45c 100644
--- a/mysql-test/t/bigint.test
+++ b/mysql-test/t/bigint.test
@@ -14,7 +14,7 @@ select 9223372036854775808+1;
drop table if exists t1;
create table t1 (a bigint unsigned not null, primary key(a));
-insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE);
+insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612);
select * from t1;
select * from t1 where a=18446744073709551615;
# select * from t1 where a='18446744073709551615';
@@ -50,10 +50,12 @@ drop table t1;
#
# Item_uint::save_to_field()
# BUG#1845
+# This can't be fixed in MySQL 4.0 without loosing precisions for bigints
#
CREATE TABLE t1 ( quantity decimal(60,0));
insert into t1 values (10000000000000000000);
+insert into t1 values (10000000000000000000.0);
insert into t1 values ('10000000000000000000');
select * from t1;
drop table t1;