mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
72da2e4c94
Added CEIL as an alias for CEILING Cleaned up CHECK constraint handling. (We don't anymore require braces after CHECK) Added casting to CHAR. mysql-test/r/bigint.result: Moved casting test to cast.test mysql-test/r/func_time.result: Test of new functions mysql-test/t/bigint.test: Moved casting test to cast.test mysql-test/t/func_time.test: Test of new functions sql/item_create.cc: Added casting to CHAR sql/item_func.h: Added casting to CHAR sql/item_timefunc.h: Added casting to CHAR sql/lex.h: Added new ANSI functions LOCALTIME, LOCALTIMESTAMP and CURRENT_USER Added CEIL as an alias for CEILING sql/sql_yacc.yy: Cleaned up CHECK constraint handling.
54 lines
2.2 KiB
Text
54 lines
2.2 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;
|