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)+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
27
26
create table t1 (a bigint not null, primary key(a));
28
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612);
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
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;
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
155
create table t1 ( quantity decimal(2));
156
insert into t1 values (500), (-500), (~0), (-1);
156
insert into t1 values (50), (-50), (0), (-1);
157
157
select * from t1;