diff options
Diffstat (limited to 'mysql-test/r/range.result')
-rw-r--r-- | mysql-test/r/range.result | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index bdd87919fd9..01ee018a434 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -475,3 +475,89 @@ id name uid id name uid 1025 Y 25 1025 Y 25 1026 Z 26 1026 Z 26 drop table t1,t2; +create table t1 (x bigint unsigned not null); +insert into t1(x) values (0xfffffffffffffff0); +insert into t1(x) values (0xfffffffffffffff1); +select * from t1; +x +18446744073709551600 +18446744073709551601 +select count(*) from t1 where x>0; +count(*) +2 +select count(*) from t1 where x=0; +count(*) +0 +select count(*) from t1 where x<0; +count(*) +0 +select count(*) from t1 where x < -16; +count(*) +0 +select count(*) from t1 where x = -16; +count(*) +0 +select count(*) from t1 where x > -16; +count(*) +2 +select count(*) from t1 where x = 18446744073709551601; +count(*) +1 +create table t2 (x bigint not null); +insert into t2(x) values (0xfffffffffffffff0); +insert into t2(x) values (0xfffffffffffffff1); +select * from t2; +x +-16 +-15 +select count(*) from t2 where x>0; +count(*) +0 +select count(*) from t2 where x=0; +count(*) +0 +select count(*) from t2 where x<0; +count(*) +2 +select count(*) from t2 where x < -16; +count(*) +0 +select count(*) from t2 where x = -16; +count(*) +1 +select count(*) from t2 where x > -16; +count(*) +1 +select count(*) from t2 where x = 18446744073709551601; +count(*) +0 +drop table t1; +create table t1 (x bigint unsigned not null primary key) engine=innodb; +insert into t1(x) values (0xfffffffffffffff0); +insert into t1(x) values (0xfffffffffffffff1); +select * from t1; +x +18446744073709551600 +18446744073709551601 +select count(*) from t1 where x>0; +count(*) +2 +select count(*) from t1 where x=0; +count(*) +0 +select count(*) from t1 where x<0; +count(*) +0 +select count(*) from t1 where x < -16; +count(*) +0 +select count(*) from t1 where x = -16; +count(*) +0 +select count(*) from t1 where x > -16; +count(*) +1 +select count(*) from t1 where x = 18446744073709551601; +count(*) +1 +drop table t1; |