11
11
select 0,256,00000000000000065536,2147483647,-2147483648,2147483648,+4294967296;
12
12
select 9223372036854775807,-009223372036854775808;
13
13
select +9999999999999999999,-9999999999999999999;
14
select cast(9223372036854775808 as unsigned)+1;
14
select 9223372036854775808 +1;
15
15
select 9223372036854775808+1;
16
16
select -(0-3),round(-(0-3)), round(9999999999999999999);
17
17
select 1,11,101,1001,10001,100001,1000001,10000001,100000001,1000000001,10000000001,100000000001,1000000000001,10000000000001,100000000000001,1000000000000001,10000000000000001,100000000000000001,1000000000000000001,10000000000000000001;
18
18
select -1,-11,-101,-1001,-10001,-100001,-1000001,-10000001,-100000001,-1000000001,-10000000001,-100000000001,-1000000000001,-10000000000001,-100000000000001,-1000000000000001,-10000000000000001,-100000000000000001,-1000000000000000001,-10000000000000000001;
19
select conv(1,10,16),conv((1<<2)-1,10,16),conv((1<<10)-2,10,16),conv((1<<16)-3,10,16),conv((1<<25)-4,10,16),conv((1<<31)-5,10,16),conv((1<<36)-6,10,16),conv((1<<47)-7,10,16),conv((1<<48)-8,10,16),conv((1<<55)-9,10,16),conv((1<<56)-10,10,16),conv((1<<63)-11,10,16);
22
21
# In 3.23 we have to disable the test of column to bigint as
24
23
# This will work on 4.0 as we then have internal handling of bigint variables.
27
create table t1 (a bigint unsigned not null, primary key(a));
28
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612);
26
create table t1 (a bigint not null, primary key(a));
27
insert into t1 values (9223372036854775808);
28
insert into t1 values (0x7000000000000000);
30
30
select * from t1 where a=18446744073709551615;
31
31
# select * from t1 where a='18446744073709551615';
36
36
create table t1 ( a int not null default 1, big bigint );
37
insert into t1 (big) values (-1),(12345678901234567),(9223372036854775807),(18446744073709551615);
37
insert into t1 (big) values (-1),(9223372036854775808),(9223372036854775807),(9223372036854775808);
39
39
select min(big),max(big),max(big)-1 from t1;
40
40
select min(big),max(big),max(big)-1 from t1 group by a;
41
alter table t1 modify big bigint unsigned not null;
41
alter table t1 modify big bigint not null;
42
42
select min(big),max(big),max(big)-1 from t1;
43
43
select min(big),max(big),max(big)-1 from t1 group by a;
44
insert into t1 (big) values (18446744073709551615);
44
insert into t1 (big) values (9223372036854775808);
46
46
select min(big),max(big),max(big)-1 from t1;
47
47
select min(big),max(big),max(big)-1 from t1 group by a;
80
80
# atof() behaviour is different of different systems. to be fixed in 4.1
81
81
SELECT '0x8000000000000001'+0;
83
# Test for BUG#8562: joins over BIGINT UNSIGNED value + constant propagation
83
# Test for BUG#8562: joins over BIGINT value + constant propagation
85
value64 bigint unsigned not null,
85
value64 bigint not null,
86
86
value32 integer not null,
87
87
primary key(value64, value32)
91
value64 bigint unsigned not null,
91
value64 bigint not null,
92
92
value32 integer not null,
93
93
primary key(value64, value32)
148
148
18446744073709551615, 18446744073709551615
151
insert into t1 values (-1 | 0,-1 | 0,-1 | 0 ,-1 | 0);
151
insert into t1 values (-1,-1,-1,-1);
152
152
select * from t1;
155
create table t1 ( quantity decimal(2) unsigned);
156
insert into t1 values (500), (-500), (~0), (-1);
155
create table t1 ( quantity decimal(2));
156
insert into t1 values (50), (-50), (0), (-1);
157
157
select * from t1;
291
291
--echo bug 19955 -- mod is signed with bigint
293
select cast(10000002383263201056 as unsigned) mod 50 as result;
293
select 10000002383263201056 mod 50 as result;
295
create table t1 (c1 bigint unsigned);
295
create table t1 (c1 bigint);
296
296
insert into t1 values (10000002383263201056);
297
297
select c1 mod 50 as result from t1;
301
# Bug #8663 cant use bgint unsigned as input to cast
304
select cast(19999999999999999999 as signed);
305
select cast(-19999999999999999999 as signed);
308
301
# Bug #28625: -9223372036854775808 doesn't fit in BIGINT.