mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
b2e946136d
Moved IF(test,column,NULL) code to 4.0 Changed mysys_priv.h to include my_pthread.h or my_no_pthread.h. Removed some CR's in os2 files. Docs/manual.texi: Changelog include/global.h: Fix for BIGINT problem on AIX include/my_no_pthread.h: Fixed typo libmysql/Makefile.shared: Fix for BIGINT problem on AIX mysql-test/mysql-test-run.sh: Fix to find xterm on AIX 4.3 mysql-test/r/bigint.result: Fix for BIGINT problem on AIX mysql-test/r/func_if.result: Change results for IF() after reverting change. mysql-test/t/bigint.test: Fix for BIGINT problem on AIX mysys/Makefile.am: Fix for BIGINT problem on AIX mysys/my_gethostbyname.c: Cleanup mysys/my_init.c: Cleanup mysys/my_net.c: Cleanup mysys/my_os2cond.c: Space & CRLF cleanup mysys/my_os2dirsrch.c: Space & CRLF cleanup mysys/my_os2dirsrch.h: Space & CRLF cleanup mysys/my_os2dlfcn.c: Space & CRLF cleanup mysys/my_os2file64.c: Space & CRLF cleanup mysys/my_os2mutex.c: Space & CRLF cleanup mysys/my_os2thread.c: Space & CRLF cleanup mysys/my_os2tls.c: Space & CRLF cleanup mysys/mysys_priv.h: cleanup mysys/thr_rwlock.c: cleanup sql/ha_innobase.cc: Removed usage of sprintf() Fixed missing end \0 which caused control characters to appear in SHOW INNODB STATUS sql/item_cmpfunc.cc: Reverted change for IF() sql/mysqld.cc: Fix for shutdown on AIX
75 lines
2.8 KiB
Text
75 lines
2.8 KiB
Text
select 0,256,00000000000000065536,2147483647,-2147483648,2147483648,+4294967296;
|
|
0 256 00000000000000065536 2147483647 -2147483648 2147483648 +4294967296
|
|
0 256 65536 2147483647 -2147483648 2147483648 4294967296
|
|
select 9223372036854775807,-009223372036854775808;
|
|
9223372036854775807 -009223372036854775808
|
|
9223372036854775807 -9223372036854775808
|
|
select +9999999999999999999,-9999999999999999999;
|
|
+9999999999999999999 -9999999999999999999
|
|
10000000000000000000 -10000000000000000000
|
|
drop table if exists t1;
|
|
create table t1 (a bigint unsigned not null, primary key(a));
|
|
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE);
|
|
select * from t1;
|
|
a
|
|
18446744073709551614
|
|
18446744073709551615
|
|
select * from t1 where a=18446744073709551615;
|
|
a
|
|
18446744073709551615
|
|
delete from t1 where a=18446744073709551615;
|
|
select * from t1;
|
|
a
|
|
18446744073709551614
|
|
drop table t1;
|
|
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;
|
|
min(big) max(big) max(big)-1
|
|
-1 9223372036854775807 9223372036854775806
|
|
select min(big),max(big),max(big)-1 from t1 group by a;
|
|
min(big) max(big) max(big)-1
|
|
-1 9223372036854775807 9223372036854775806
|
|
alter table t1 modify big bigint unsigned not null;
|
|
select min(big),max(big),max(big)-1 from t1;
|
|
min(big) max(big) max(big)-1
|
|
12345678901234567 18446744073709551615 18446744073709551614
|
|
select min(big),max(big),max(big)-1 from t1 group by a;
|
|
min(big) max(big) max(big)-1
|
|
12345678901234567 18446744073709551615 18446744073709551614
|
|
alter table t1 add key (big);
|
|
select min(big),max(big),max(big)-1 from t1;
|
|
min(big) max(big) max(big)-1
|
|
12345678901234567 18446744073709551615 18446744073709551614
|
|
select min(big),max(big),max(big)-1 from t1 group by a;
|
|
min(big) max(big) max(big)-1
|
|
12345678901234567 18446744073709551615 18446744073709551614
|
|
alter table t1 modify big bigint not null;
|
|
select min(big),max(big),max(big)-1 from t1;
|
|
min(big) max(big) max(big)-1
|
|
-1 9223372036854775807 9223372036854775806
|
|
select min(big),max(big),max(big)-1 from t1 group by a;
|
|
min(big) max(big) max(big)-1
|
|
-1 9223372036854775807 9223372036854775806
|
|
drop table t1;
|
|
select CAST(1-2 AS UNSIGNED);
|
|
CAST(1-2 AS UNSIGNED)
|
|
18446744073709551615
|
|
select CAST(CAST(1-2 AS UNSIGNED) AS SIGNED INTEGER);
|
|
CAST(CAST(1-2 AS UNSIGNED) AS SIGNED INTEGER)
|
|
-1
|
|
select CONVERT('-1',UNSIGNED);
|
|
CONVERT('-1',UNSIGNED)
|
|
18446744073709551615
|
|
select cast(-5 as unsigned) | 1, cast(-5 as unsigned) & -1;
|
|
cast(-5 as unsigned) | 1 cast(-5 as unsigned) & -1
|
|
18446744073709551611 18446744073709551611
|
|
select cast(-5 as unsigned) -1, cast(-5 as unsigned) + 1;
|
|
cast(-5 as unsigned) -1 cast(-5 as unsigned) + 1
|
|
18446744073709551610 18446744073709551612
|
|
select ~5, cast(~5 as signed);
|
|
~5 cast(~5 as signed)
|
|
18446744073709551610 -6
|
|
select cast(5 as unsigned) -6.0;
|
|
cast(5 as unsigned) -6.0
|
|
-1.0
|