2003-01-06 00:48:59 +01:00
|
|
|
#
|
|
|
|
# Initialize
|
|
|
|
|
|
|
|
--disable_warnings
|
|
|
|
drop table if exists t1;
|
|
|
|
--enable_warnings
|
|
|
|
|
2000-12-28 02:56:38 +01:00
|
|
|
#
|
|
|
|
# Test of reading of bigint values
|
|
|
|
#
|
|
|
|
select 0,256,00000000000000065536,2147483647,-2147483648,2147483648,+4294967296;
|
|
|
|
select 9223372036854775807,-009223372036854775808;
|
|
|
|
select +9999999999999999999,-9999999999999999999;
|
2003-02-25 23:13:18 +01:00
|
|
|
select cast(9223372036854775808 as unsigned)+1;
|
2003-02-04 00:05:39 +01:00
|
|
|
select 9223372036854775808+1;
|
2003-07-20 12:26:18 +02:00
|
|
|
select -(0-3),round(-(0-3)), round(9999999999999999999);
|
|
|
|
|
2002-08-12 02:28:02 +02:00
|
|
|
#
|
|
|
|
# In 3.23 we have to disable the test of column to bigint as
|
|
|
|
# this fails on AIX powerpc (the resolution for double is not good enough)
|
|
|
|
# This will work on 4.0 as we then have internal handling of bigint variables.
|
|
|
|
#
|
|
|
|
|
2001-06-19 13:30:12 +02:00
|
|
|
create table t1 (a bigint unsigned not null, primary key(a));
|
2003-11-20 23:11:50 +01:00
|
|
|
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612);
|
2001-06-19 13:30:12 +02:00
|
|
|
select * from t1;
|
|
|
|
select * from t1 where a=18446744073709551615;
|
2002-08-08 21:12:03 +02:00
|
|
|
# select * from t1 where a='18446744073709551615';
|
2001-06-19 13:30:12 +02:00
|
|
|
delete from t1 where a=18446744073709551615;
|
2000-12-28 02:56:38 +01:00
|
|
|
select * from t1;
|
|
|
|
drop table t1;
|
2001-09-27 20:45:48 +02:00
|
|
|
|
|
|
|
create table t1 ( a int not null default 1, big bigint );
|
|
|
|
insert into t1 (big) values (-1),(12345678901234567),(9223372036854775807),(18446744073709551615);
|
|
|
|
select min(big),max(big),max(big)-1 from t1;
|
|
|
|
select min(big),max(big),max(big)-1 from t1 group by a;
|
|
|
|
alter table t1 modify big bigint unsigned not null;
|
|
|
|
select min(big),max(big),max(big)-1 from t1;
|
|
|
|
select min(big),max(big),max(big)-1 from t1 group by a;
|
|
|
|
alter table t1 add key (big);
|
|
|
|
select min(big),max(big),max(big)-1 from t1;
|
|
|
|
select min(big),max(big),max(big)-1 from t1 group by a;
|
|
|
|
alter table t1 modify big bigint not null;
|
|
|
|
select min(big),max(big),max(big)-1 from t1;
|
|
|
|
select min(big),max(big),max(big)-1 from t1 group by a;
|
|
|
|
drop table t1;
|
2003-02-04 00:05:39 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# Test problem with big values fir auto_increment
|
|
|
|
#
|
|
|
|
|
|
|
|
create table t1 (id bigint auto_increment primary key, a int) auto_increment=9999999999;
|
|
|
|
insert into t1 values (null,1);
|
|
|
|
select * from t1;
|
|
|
|
select * from t1 limit 9999999999;
|
|
|
|
drop table t1;
|
2003-11-16 17:37:15 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# Item_uint::save_to_field()
|
|
|
|
# BUG#1845
|
2003-11-20 23:11:50 +01:00
|
|
|
# This can't be fixed in MySQL 4.0 without loosing precisions for bigints
|
2003-11-16 17:37:15 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
CREATE TABLE t1 ( quantity decimal(60,0));
|
|
|
|
insert into t1 values (10000000000000000000);
|
2003-11-20 23:11:50 +01:00
|
|
|
insert into t1 values (10000000000000000000.0);
|
2003-11-16 17:37:15 +01:00
|
|
|
insert into t1 values ('10000000000000000000');
|
|
|
|
select * from t1;
|
|
|
|
drop table t1;
|
|
|
|
|
2004-02-04 09:59:18 +01:00
|
|
|
# atof() behaviour is different of different systems. to be fixed in 4.1
|
2004-02-24 12:31:33 +01:00
|
|
|
SELECT '0x8000000000000001'+0;
|
2004-02-02 15:57:57 +01:00
|
|
|
|