794 lines
39 KiB
Plaintext
794 lines
39 KiB
Plaintext
########################
|
|
# Fixed point columns (NUMERIC, DECIMAL)
|
|
########################
|
|
DROP TABLE IF EXISTS t1;
|
|
CREATE TABLE t1 (
|
|
d DECIMAL UNSIGNED,
|
|
d0 DECIMAL(0) UNSIGNED,
|
|
d1_1 DECIMAL(1,1) UNSIGNED,
|
|
d10_2 DECIMAL(10,2) UNSIGNED,
|
|
d60_10 DECIMAL(60,10) UNSIGNED,
|
|
n NUMERIC UNSIGNED,
|
|
n0_0 NUMERIC(0,0) UNSIGNED,
|
|
n1 NUMERIC(1) UNSIGNED,
|
|
n20_4 NUMERIC(20,4) UNSIGNED,
|
|
n65_4 NUMERIC(65,4) UNSIGNED,
|
|
pk NUMERIC UNSIGNED PRIMARY KEY
|
|
) ENGINE=xengine;
|
|
Warnings:
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
SHOW COLUMNS IN t1;
|
|
Field Type Null Key Default Extra
|
|
d decimal(10,0) unsigned YES NULL
|
|
d0 decimal(10,0) unsigned YES NULL
|
|
d1_1 decimal(1,1) unsigned YES NULL
|
|
d10_2 decimal(10,2) unsigned YES NULL
|
|
d60_10 decimal(60,10) unsigned YES NULL
|
|
n decimal(10,0) unsigned YES NULL
|
|
n0_0 decimal(10,0) unsigned YES NULL
|
|
n1 decimal(1,0) unsigned YES NULL
|
|
n20_4 decimal(20,4) unsigned YES NULL
|
|
n65_4 decimal(65,4) unsigned YES NULL
|
|
pk decimal(10,0) unsigned NO PRI NULL
|
|
INSERT INTO t1 (d,d0,d1_1,d10_2,d60_10,n,n0_0,n1,n20_4,n65_4,pk) VALUES (100,123456,0.3,40000.25,123456789123456789.10001,1024,7000.0,8.0,999999.9,9223372036854775807,1);
|
|
INSERT INTO t1 (d,d0,d1_1,d10_2,d60_10,n,n0_0,n1,n20_4,n65_4,pk) VALUES (0,0,0,0,0,0,0,0,0,0,2);
|
|
INSERT INTO t1 (d,d0,d1_1,d10_2,d60_10,n,n0_0,n1,n20_4,n65_4,pk) VALUES (9999999999.0,9999999999.0,0.9,99999999.99,99999999999999999999999999999999999999999999999999.9999999999,9999999999.0,9999999999.0,9.0,9999999999999999.9999,9999999999999999999999999999999999999999999999999999999999999.9999,3);
|
|
SELECT d,d0,d1_1,d10_2,d60_10,n,n0_0,n1,n20_4,n65_4 FROM t1;
|
|
d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4
|
|
0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000
|
|
100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000
|
|
9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999
|
|
INSERT INTO t1 (d,d0,d1_1,d10_2,d60_10,n,n0_0,n1,n20_4,n65_4,pk) VALUES (-100,-123456,-0.3,-40000.25,-123456789123456789.10001,-1024,-7000.0,-8.0,-999999.9,-9223372036854775807,4);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'd' at row 1
|
|
Warning 1264 Out of range value for column 'd0' at row 1
|
|
Warning 1264 Out of range value for column 'd1_1' at row 1
|
|
Warning 1264 Out of range value for column 'd10_2' at row 1
|
|
Warning 1264 Out of range value for column 'd60_10' at row 1
|
|
Warning 1264 Out of range value for column 'n' at row 1
|
|
Warning 1264 Out of range value for column 'n0_0' at row 1
|
|
Warning 1264 Out of range value for column 'n1' at row 1
|
|
Warning 1264 Out of range value for column 'n20_4' at row 1
|
|
Warning 1264 Out of range value for column 'n65_4' at row 1
|
|
INSERT INTO t1 (d,d0,d1_1,d10_2,d60_10,n,n0_0,n1,n20_4,n65_4,pk) VALUES (-9999999999.0,-9999999999.0,-0.9,-99999999.99,-99999999999999999999999999999999999999999999999999.9999999999,-9999999999.0,-9999999999.0,-9.0,-9999999999999999.9999,-9999999999999999999999999999999999999999999999999999999999999.9999,5);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'd' at row 1
|
|
Warning 1264 Out of range value for column 'd0' at row 1
|
|
Warning 1264 Out of range value for column 'd1_1' at row 1
|
|
Warning 1264 Out of range value for column 'd10_2' at row 1
|
|
Warning 1264 Out of range value for column 'd60_10' at row 1
|
|
Warning 1264 Out of range value for column 'n' at row 1
|
|
Warning 1264 Out of range value for column 'n0_0' at row 1
|
|
Warning 1264 Out of range value for column 'n1' at row 1
|
|
Warning 1264 Out of range value for column 'n20_4' at row 1
|
|
Warning 1264 Out of range value for column 'n65_4' at row 1
|
|
SELECT d,d0,d1_1,d10_2,d60_10,n,n0_0,n1,n20_4,n65_4 FROM t1;
|
|
d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4
|
|
0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000
|
|
0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000
|
|
0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000
|
|
100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000
|
|
9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999
|
|
SELECT d,d0,d1_1,d10_2,d60_10,n,n0_0,n1,n20_4,n65_4 FROM t1 WHERE n20_4 = 9999999999999999.9999 OR d < 100;
|
|
d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4
|
|
0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000
|
|
0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000
|
|
0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000
|
|
9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999
|
|
INSERT INTO t1 (d,d0,d1_1,d10_2,d60_10,n,n0_0,n1,n20_4,n65_4,pk) VALUES (
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
6
|
|
);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'd' at row 1
|
|
Warning 1264 Out of range value for column 'd0' at row 1
|
|
Warning 1264 Out of range value for column 'd1_1' at row 1
|
|
Warning 1264 Out of range value for column 'd10_2' at row 1
|
|
Warning 1264 Out of range value for column 'd60_10' at row 1
|
|
Warning 1264 Out of range value for column 'n' at row 1
|
|
Warning 1264 Out of range value for column 'n0_0' at row 1
|
|
Warning 1264 Out of range value for column 'n1' at row 1
|
|
Warning 1264 Out of range value for column 'n20_4' at row 1
|
|
SELECT d,d0,d1_1,d10_2,d60_10,n,n0_0,n1,n20_4,n65_4 FROM t1;
|
|
d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4
|
|
0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000
|
|
0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000
|
|
0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000
|
|
100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000
|
|
9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999
|
|
9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999
|
|
INSERT INTO t1 (d,d0,d1_1,d10_2,d60_10,n,n0_0,n1,n20_4,n65_4,pk) VALUES (10000000000.0,10000000000.0,1.1,100000000.99,100000000000000000000000000000000000000000000000000.0,10000000000.0,10000000000.0,10.0,10000000000000000.9999,10000000000000000000000000000000000000000000000000000000000000.9999,7);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'd' at row 1
|
|
Warning 1264 Out of range value for column 'd0' at row 1
|
|
Warning 1264 Out of range value for column 'd1_1' at row 1
|
|
Warning 1264 Out of range value for column 'd10_2' at row 1
|
|
Warning 1264 Out of range value for column 'd60_10' at row 1
|
|
Warning 1264 Out of range value for column 'n' at row 1
|
|
Warning 1264 Out of range value for column 'n0_0' at row 1
|
|
Warning 1264 Out of range value for column 'n1' at row 1
|
|
Warning 1264 Out of range value for column 'n20_4' at row 1
|
|
Warning 1264 Out of range value for column 'n65_4' at row 1
|
|
SELECT d,d0,d1_1,d10_2,d60_10,n,n0_0,n1,n20_4,n65_4 FROM t1;
|
|
d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4
|
|
0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000
|
|
0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000
|
|
0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000
|
|
100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000
|
|
9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999
|
|
9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999
|
|
9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999
|
|
INSERT INTO t1 (d,d0,d1_1,d10_2,d60_10,n,n0_0,n1,n20_4,n65_4,pk) VALUES (9999999999.1,9999999999.1,1.9,99999999.001,99999999999999999999999999999999999999999999999999.99999999991,9999999999.1,9999999999.1,9.1,9999999999999999.00001,9999999999999999999999999999999999999999999999999999999999999.11111,8);
|
|
Warnings:
|
|
Note 1265 Data truncated for column 'd' at row 1
|
|
Note 1265 Data truncated for column 'd0' at row 1
|
|
Warning 1264 Out of range value for column 'd1_1' at row 1
|
|
Note 1265 Data truncated for column 'd10_2' at row 1
|
|
Note 1265 Data truncated for column 'd60_10' at row 1
|
|
Note 1265 Data truncated for column 'n' at row 1
|
|
Note 1265 Data truncated for column 'n0_0' at row 1
|
|
Note 1265 Data truncated for column 'n1' at row 1
|
|
Note 1265 Data truncated for column 'n20_4' at row 1
|
|
Note 1265 Data truncated for column 'n65_4' at row 1
|
|
SELECT d,d0,d1_1,d10_2,d60_10,n,n0_0,n1,n20_4,n65_4 FROM t1;
|
|
d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4
|
|
0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000
|
|
0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000
|
|
0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000
|
|
100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000
|
|
9999999999 9999999999 0.9 99999999.00 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.0000 9999999999999999999999999999999999999999999999999999999999999.1111
|
|
9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999
|
|
9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999
|
|
9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999
|
|
ALTER TABLE t1 ADD COLUMN n66 NUMERIC(66) UNSIGNED;
|
|
ERROR 42000: Too-big precision 66 specified for 'n66'. Maximum is 65.
|
|
ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(66,6) UNSIGNED;
|
|
ERROR 42000: Too-big precision 66 specified for 'n66_6'. Maximum is 65.
|
|
ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(66,66) UNSIGNED;
|
|
ERROR 42000: Too big scale 66 specified for column 'n66_66'. Maximum is 30.
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (
|
|
a DECIMAL UNSIGNED,
|
|
b NUMERIC UNSIGNED,
|
|
PRIMARY KEY (a)
|
|
) ENGINE=xengine;
|
|
Warnings:
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
SHOW COLUMNS IN t1;
|
|
Field Type Null Key Default Extra
|
|
a decimal(10,0) unsigned NO PRI NULL
|
|
b decimal(10,0) unsigned YES NULL
|
|
INSERT INTO t1 (a,b) VALUES (1.0,-1.0);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'b' at row 1
|
|
INSERT INTO t1 (a,b) VALUES (-100,100);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'a' at row 1
|
|
SELECT a,b FROM t1;
|
|
a b
|
|
0 100
|
|
1 0
|
|
DROP TABLE t1;
|
|
########################
|
|
# Floating point columns (FLOAT, DOUBLE)
|
|
########################
|
|
DROP TABLE IF EXISTS t1;
|
|
CREATE TABLE t1 (
|
|
f FLOAT UNSIGNED,
|
|
f0 FLOAT(0) UNSIGNED,
|
|
r1_1 REAL(1,1) UNSIGNED,
|
|
f23_0 FLOAT(23) UNSIGNED,
|
|
f20_3 FLOAT(20,3) UNSIGNED,
|
|
d DOUBLE UNSIGNED,
|
|
d1_0 DOUBLE(1,0) UNSIGNED,
|
|
d10_10 DOUBLE PRECISION (10,10) UNSIGNED,
|
|
d53 DOUBLE(53,0) UNSIGNED,
|
|
d53_10 DOUBLE(53,10) UNSIGNED,
|
|
pk DOUBLE UNSIGNED PRIMARY KEY
|
|
) ENGINE=xengine;
|
|
Warnings:
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
SHOW COLUMNS IN t1;
|
|
Field Type Null Key Default Extra
|
|
f float unsigned YES NULL
|
|
f0 float unsigned YES NULL
|
|
r1_1 double(1,1) unsigned YES NULL
|
|
f23_0 float unsigned YES NULL
|
|
f20_3 float(20,3) unsigned YES NULL
|
|
d double unsigned YES NULL
|
|
d1_0 double(1,0) unsigned YES NULL
|
|
d10_10 double(10,10) unsigned YES NULL
|
|
d53 double(53,0) unsigned YES NULL
|
|
d53_10 double(53,10) unsigned YES NULL
|
|
pk double unsigned NO PRI NULL
|
|
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (12345.12345,12345.12345,0.9,123456789.123,56789.987,11111111.111,8.0,0.0123456789,1234566789123456789,99999999999999999.99999999,1);
|
|
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
|
f 12345.1
|
|
d 11111111.111
|
|
d10_10 0.0123456789
|
|
d1_0 8
|
|
d53 1234566789123456800
|
|
d53_10 100000000000000000.0000000000
|
|
f0 12345.1
|
|
f20_3 56789.988
|
|
f23_0 123457000
|
|
r1_1 0.9
|
|
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (0,0,0,0,0,0,0,0,0,0,2);
|
|
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (
|
|
99999999999999999999999999999999999999,
|
|
99999999999999999999999999999999999999.9999999999999999,
|
|
0.9,
|
|
99999999999999999999999999999999999999.9,
|
|
99999999999999999.999,
|
|
999999999999999999999999999999999999999999999999999999999999999999999999999999999,
|
|
9,
|
|
0.9999999999,
|
|
1999999999999999999999999999999999999999999999999999999,
|
|
19999999999999999999999999999999999999999999.9999999999,
|
|
3
|
|
);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'd53' at row 1
|
|
Warning 1264 Out of range value for column 'd53_10' at row 1
|
|
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
|
f 12345.1
|
|
d 0
|
|
d 11111111.111
|
|
d 1e81
|
|
d10_10 0.0000000000
|
|
d10_10 0.0123456789
|
|
d10_10 0.9999999999
|
|
d1_0 0
|
|
d1_0 8
|
|
d1_0 9
|
|
d53 0
|
|
d53 100000000000000000000000000000000000000000000000000000
|
|
d53 1234566789123456800
|
|
d53_10 0.0000000000
|
|
d53_10 100000000000000000.0000000000
|
|
d53_10 10000000000000000000000000000000000000000000.0000000000
|
|
f 0
|
|
f 1e38
|
|
f0 0
|
|
f0 12345.1
|
|
f0 1e38
|
|
f20_3 0.000
|
|
f20_3 56789.988
|
|
f20_3 99999998430674940.000
|
|
f23_0 0
|
|
f23_0 123457000
|
|
f23_0 1e38
|
|
r1_1 0.0
|
|
r1_1 0.9
|
|
r1_1 0.9
|
|
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (-999999999999999999999999,-99999999999.999999999999,-0.9,-999.99999999999999999999,-99999999999999999.999,-999999999999999999999999999999999999999999999999999999999999-0.999,-9,-.9999999999,-999999999999999999999999999999.99999999999999999999999,-9999999999999999999999999999999999999999999.9999999999,4);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'f' at row 1
|
|
Warning 1264 Out of range value for column 'f0' at row 1
|
|
Warning 1264 Out of range value for column 'r1_1' at row 1
|
|
Warning 1264 Out of range value for column 'f23_0' at row 1
|
|
Warning 1264 Out of range value for column 'f20_3' at row 1
|
|
Warning 1264 Out of range value for column 'd' at row 1
|
|
Warning 1264 Out of range value for column 'd1_0' at row 1
|
|
Warning 1264 Out of range value for column 'd10_10' at row 1
|
|
Warning 1264 Out of range value for column 'd53' at row 1
|
|
Warning 1264 Out of range value for column 'd53_10' at row 1
|
|
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
|
f 12345.1
|
|
d 0
|
|
d 0
|
|
d 11111111.111
|
|
d 1e81
|
|
d10_10 0.0000000000
|
|
d10_10 0.0000000000
|
|
d10_10 0.0123456789
|
|
d10_10 0.9999999999
|
|
d1_0 0
|
|
d1_0 0
|
|
d1_0 8
|
|
d1_0 9
|
|
d53 0
|
|
d53 0
|
|
d53 100000000000000000000000000000000000000000000000000000
|
|
d53 1234566789123456800
|
|
d53_10 0.0000000000
|
|
d53_10 0.0000000000
|
|
d53_10 100000000000000000.0000000000
|
|
d53_10 10000000000000000000000000000000000000000000.0000000000
|
|
f 0
|
|
f 0
|
|
f 1e38
|
|
f0 0
|
|
f0 0
|
|
f0 12345.1
|
|
f0 1e38
|
|
f20_3 0.000
|
|
f20_3 0.000
|
|
f20_3 56789.988
|
|
f20_3 99999998430674940.000
|
|
f23_0 0
|
|
f23_0 0
|
|
f23_0 123457000
|
|
f23_0 1e38
|
|
r1_1 0.0
|
|
r1_1 0.0
|
|
r1_1 0.9
|
|
r1_1 0.9
|
|
SELECT MAX(f), MAX(f0), MAX(r1_1), MAX(f23_0), MAX(f20_3), MAX(d), MAX(d1_0), MAX(d10_10), MAX(d53), MAX(d53_10) FROM t1;
|
|
MAX(f) 1e38
|
|
MAX(d) 1e81
|
|
MAX(d10_10) 0.9999999999
|
|
MAX(d1_0) 9
|
|
MAX(d53) 100000000000000000000000000000000000000000000000000000
|
|
MAX(d53_10) 10000000000000000000000000000000000000000000.0000000000
|
|
MAX(f0) 1e38
|
|
MAX(f20_3) 99999998430674940.000
|
|
MAX(f23_0) 1e38
|
|
MAX(r1_1) 0.9
|
|
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
9999999999999999999999999999999999999999999999999999999999999.9999,
|
|
5
|
|
);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'f' at row 1
|
|
Warning 1264 Out of range value for column 'f0' at row 1
|
|
Warning 1264 Out of range value for column 'r1_1' at row 1
|
|
Warning 1264 Out of range value for column 'f23_0' at row 1
|
|
Warning 1264 Out of range value for column 'f20_3' at row 1
|
|
Warning 1264 Out of range value for column 'd1_0' at row 1
|
|
Warning 1264 Out of range value for column 'd10_10' at row 1
|
|
Warning 1264 Out of range value for column 'd53' at row 1
|
|
Warning 1264 Out of range value for column 'd53_10' at row 1
|
|
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
|
f 12345.1
|
|
d 0
|
|
d 0
|
|
d 11111111.111
|
|
d 1e61
|
|
d 1e81
|
|
d10_10 0.0000000000
|
|
d10_10 0.0000000000
|
|
d10_10 0.0123456789
|
|
d10_10 0.9999999999
|
|
d10_10 0.9999999999
|
|
d1_0 0
|
|
d1_0 0
|
|
d1_0 8
|
|
d1_0 9
|
|
d1_0 9
|
|
d53 0
|
|
d53 0
|
|
d53 100000000000000000000000000000000000000000000000000000
|
|
d53 100000000000000000000000000000000000000000000000000000
|
|
d53 1234566789123456800
|
|
d53_10 0.0000000000
|
|
d53_10 0.0000000000
|
|
d53_10 100000000000000000.0000000000
|
|
d53_10 10000000000000000000000000000000000000000000.0000000000
|
|
d53_10 10000000000000000000000000000000000000000000.0000000000
|
|
f 0
|
|
f 0
|
|
f 1e38
|
|
f 3.40282e38
|
|
f0 0
|
|
f0 0
|
|
f0 12345.1
|
|
f0 1e38
|
|
f0 3.40282e38
|
|
f20_3 0.000
|
|
f20_3 0.000
|
|
f20_3 56789.988
|
|
f20_3 99999998430674940.000
|
|
f20_3 99999998430674940.000
|
|
f23_0 0
|
|
f23_0 0
|
|
f23_0 123457000
|
|
f23_0 1e38
|
|
f23_0 3.40282e38
|
|
r1_1 0.0
|
|
r1_1 0.0
|
|
r1_1 0.9
|
|
r1_1 0.9
|
|
r1_1 0.9
|
|
INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (
|
|
999999999999999999999999999999999999999,
|
|
999999999999999999999999999999999999999.9999999999999999,
|
|
1.9,
|
|
999999999999999999999999999999999999999.9,
|
|
999999999999999999.999,
|
|
9999999999999999999999999999999999999999999999999999999999999999999999999999999999,
|
|
99,
|
|
1.9999999999,
|
|
1999999999999999999999999999999999999999999999999999999,
|
|
19999999999999999999999999999999999999999999.9999999999,
|
|
6
|
|
);
|
|
Warnings:
|
|
Warning 1292 Truncated incorrect DECIMAL value: '999999999999999999999999999999999999999999999999999999999999999999999999999999999'
|
|
Warning 1264 Out of range value for column 'f' at row 1
|
|
Warning 1264 Out of range value for column 'f0' at row 1
|
|
Warning 1264 Out of range value for column 'r1_1' at row 1
|
|
Warning 1264 Out of range value for column 'f23_0' at row 1
|
|
Warning 1264 Out of range value for column 'f20_3' at row 1
|
|
Warning 1264 Out of range value for column 'd1_0' at row 1
|
|
Warning 1264 Out of range value for column 'd10_10' at row 1
|
|
Warning 1264 Out of range value for column 'd53' at row 1
|
|
Warning 1264 Out of range value for column 'd53_10' at row 1
|
|
SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1;
|
|
f 12345.1
|
|
d 0
|
|
d 0
|
|
d 11111111.111
|
|
d 1e61
|
|
d 1e65
|
|
d 1e81
|
|
d10_10 0.0000000000
|
|
d10_10 0.0000000000
|
|
d10_10 0.0123456789
|
|
d10_10 0.9999999999
|
|
d10_10 0.9999999999
|
|
d10_10 0.9999999999
|
|
d1_0 0
|
|
d1_0 0
|
|
d1_0 8
|
|
d1_0 9
|
|
d1_0 9
|
|
d1_0 9
|
|
d53 0
|
|
d53 0
|
|
d53 100000000000000000000000000000000000000000000000000000
|
|
d53 100000000000000000000000000000000000000000000000000000
|
|
d53 100000000000000000000000000000000000000000000000000000
|
|
d53 1234566789123456800
|
|
d53_10 0.0000000000
|
|
d53_10 0.0000000000
|
|
d53_10 100000000000000000.0000000000
|
|
d53_10 10000000000000000000000000000000000000000000.0000000000
|
|
d53_10 10000000000000000000000000000000000000000000.0000000000
|
|
d53_10 10000000000000000000000000000000000000000000.0000000000
|
|
f 0
|
|
f 0
|
|
f 1e38
|
|
f 3.40282e38
|
|
f 3.40282e38
|
|
f0 0
|
|
f0 0
|
|
f0 12345.1
|
|
f0 1e38
|
|
f0 3.40282e38
|
|
f0 3.40282e38
|
|
f20_3 0.000
|
|
f20_3 0.000
|
|
f20_3 56789.988
|
|
f20_3 99999998430674940.000
|
|
f20_3 99999998430674940.000
|
|
f20_3 99999998430674940.000
|
|
f23_0 0
|
|
f23_0 0
|
|
f23_0 123457000
|
|
f23_0 1e38
|
|
f23_0 3.40282e38
|
|
f23_0 3.40282e38
|
|
r1_1 0.0
|
|
r1_1 0.0
|
|
r1_1 0.9
|
|
r1_1 0.9
|
|
r1_1 0.9
|
|
r1_1 0.9
|
|
ALTER TABLE t1 ADD COLUMN d0_0 DOUBLE(0,0) UNSIGNED;
|
|
ERROR 42000: Display width out of range for column 'd0_0' (max = 255)
|
|
ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(256,1) UNSIGNED;
|
|
ERROR 42000: Too-big precision 256 specified for 'n66_6'. Maximum is 65.
|
|
ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(40,35) UNSIGNED;
|
|
ERROR 42000: Too big scale 35 specified for column 'n66_66'. Maximum is 30.
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (
|
|
a DOUBLE UNSIGNED,
|
|
b FLOAT UNSIGNED,
|
|
PRIMARY KEY (b)
|
|
) ENGINE=xengine;
|
|
Warnings:
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
Warning 1681 UNSIGNED for decimal and floating point data types is deprecated and support for it will be removed in a future release.
|
|
SHOW COLUMNS IN t1;
|
|
Field Type Null Key Default Extra
|
|
a double unsigned YES NULL
|
|
b float unsigned NO PRI NULL
|
|
INSERT INTO t1 (a,b) VALUES (1.0,-1.0);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'b' at row 1
|
|
INSERT INTO t1 (a,b) VALUES (-100,100);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'a' at row 1
|
|
SELECT a,b FROM t1;
|
|
a b
|
|
0 100
|
|
1 0
|
|
DROP TABLE t1;
|
|
########################
|
|
# INT columns
|
|
########################
|
|
DROP TABLE IF EXISTS t1;
|
|
CREATE TABLE t1 (
|
|
i INT UNSIGNED,
|
|
i0 INT(0) UNSIGNED,
|
|
i1 INT(1) UNSIGNED,
|
|
i20 INT(20) UNSIGNED,
|
|
t TINYINT UNSIGNED,
|
|
t0 TINYINT(0) UNSIGNED,
|
|
t1 TINYINT(1) UNSIGNED,
|
|
t20 TINYINT(20) UNSIGNED,
|
|
s SMALLINT UNSIGNED,
|
|
s0 SMALLINT(0) UNSIGNED,
|
|
s1 SMALLINT(1) UNSIGNED,
|
|
s20 SMALLINT(20) UNSIGNED,
|
|
m MEDIUMINT UNSIGNED,
|
|
m0 MEDIUMINT(0) UNSIGNED,
|
|
m1 MEDIUMINT(1) UNSIGNED,
|
|
m20 MEDIUMINT(20) UNSIGNED,
|
|
b BIGINT UNSIGNED,
|
|
b0 BIGINT(0) UNSIGNED,
|
|
b1 BIGINT(1) UNSIGNED,
|
|
b20 BIGINT(20) UNSIGNED,
|
|
pk INT AUTO_INCREMENT PRIMARY KEY
|
|
) ENGINE=xengine;
|
|
Warnings:
|
|
Warning 1681 Integer display width is deprecated and will be removed in a future release.
|
|
Warning 1681 Integer display width is deprecated and will be removed in a future release.
|
|
Warning 1681 Integer display width is deprecated and will be removed in a future release.
|
|
Warning 1681 Integer display width is deprecated and will be removed in a future release.
|
|
Warning 1681 Integer display width is deprecated and will be removed in a future release.
|
|
Warning 1681 Integer display width is deprecated and will be removed in a future release.
|
|
Warning 1681 Integer display width is deprecated and will be removed in a future release.
|
|
Warning 1681 Integer display width is deprecated and will be removed in a future release.
|
|
Warning 1681 Integer display width is deprecated and will be removed in a future release.
|
|
Warning 1681 Integer display width is deprecated and will be removed in a future release.
|
|
Warning 1681 Integer display width is deprecated and will be removed in a future release.
|
|
Warning 1681 Integer display width is deprecated and will be removed in a future release.
|
|
Warning 1681 Integer display width is deprecated and will be removed in a future release.
|
|
Warning 1681 Integer display width is deprecated and will be removed in a future release.
|
|
Warning 1681 Integer display width is deprecated and will be removed in a future release.
|
|
SHOW COLUMNS IN t1;
|
|
Field Type Null Key Default Extra
|
|
i int(10) unsigned YES NULL
|
|
i0 int(10) unsigned YES NULL
|
|
i1 int(1) unsigned YES NULL
|
|
i20 int(20) unsigned YES NULL
|
|
t tinyint(3) unsigned YES NULL
|
|
t0 tinyint(3) unsigned YES NULL
|
|
t1 tinyint(1) unsigned YES NULL
|
|
t20 tinyint(20) unsigned YES NULL
|
|
s smallint(5) unsigned YES NULL
|
|
s0 smallint(5) unsigned YES NULL
|
|
s1 smallint(1) unsigned YES NULL
|
|
s20 smallint(20) unsigned YES NULL
|
|
m mediumint(8) unsigned YES NULL
|
|
m0 mediumint(8) unsigned YES NULL
|
|
m1 mediumint(1) unsigned YES NULL
|
|
m20 mediumint(20) unsigned YES NULL
|
|
b bigint(20) unsigned YES NULL
|
|
b0 bigint(20) unsigned YES NULL
|
|
b1 bigint(1) unsigned YES NULL
|
|
b20 bigint(20) unsigned YES NULL
|
|
pk int(11) NO PRI NULL auto_increment
|
|
INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) VALUES (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20);
|
|
INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) VALUES (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
|
|
INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) VALUES (2147483647,2147483647,2147483647,2147483647,127,127,127,127,32767,32767,32767,32767,8388607,8388607,8388607,8388607,9223372036854775807,9223372036854775807,9223372036854775807,9223372036854775807);
|
|
SELECT i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20 FROM t1;
|
|
i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20
|
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
|
2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807
|
|
INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) VALUES (-2147483648,-2147483648,-2147483648,-2147483648,-128,-128,-128,-128,-32768,-32768,-32768,-32768,-8388608,-8388608,-8388608,-8388608,-9223372036854775808,-9223372036854775808,-9223372036854775808,-9223372036854775808);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'i' at row 1
|
|
Warning 1264 Out of range value for column 'i0' at row 1
|
|
Warning 1264 Out of range value for column 'i1' at row 1
|
|
Warning 1264 Out of range value for column 'i20' at row 1
|
|
Warning 1264 Out of range value for column 't' at row 1
|
|
Warning 1264 Out of range value for column 't0' at row 1
|
|
Warning 1264 Out of range value for column 't1' at row 1
|
|
Warning 1264 Out of range value for column 't20' at row 1
|
|
Warning 1264 Out of range value for column 's' at row 1
|
|
Warning 1264 Out of range value for column 's0' at row 1
|
|
Warning 1264 Out of range value for column 's1' at row 1
|
|
Warning 1264 Out of range value for column 's20' at row 1
|
|
Warning 1264 Out of range value for column 'm' at row 1
|
|
Warning 1264 Out of range value for column 'm0' at row 1
|
|
Warning 1264 Out of range value for column 'm1' at row 1
|
|
Warning 1264 Out of range value for column 'm20' at row 1
|
|
Warning 1264 Out of range value for column 'b' at row 1
|
|
Warning 1264 Out of range value for column 'b0' at row 1
|
|
Warning 1264 Out of range value for column 'b1' at row 1
|
|
Warning 1264 Out of range value for column 'b20' at row 1
|
|
INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) VALUES (4294967295,4294967295,4294967295,4294967295,255,255,255,255,65535,65535,65535,65535,16777215,16777215,16777215,16777215,18446744073709551615,18446744073709551615,18446744073709551615,18446744073709551615);
|
|
SELECT i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20 FROM t1;
|
|
i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20
|
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
|
2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807
|
|
4294967295 4294967295 4294967295 4294967295 255 255 255 255 65535 65535 65535 65535 16777215 16777215 16777215 16777215 18446744073709551615 18446744073709551615 18446744073709551615 18446744073709551615
|
|
INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) VALUES (-2147483649,-2147483649,-2147483649,-2147483649,-129,-129,-129,-129,-32769,-32769,-32769,-32769,-8388609,-8388609,-8388609,-8388609,-9223372036854775809,-9223372036854775809,-9223372036854775809,-9223372036854775809);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'i' at row 1
|
|
Warning 1264 Out of range value for column 'i0' at row 1
|
|
Warning 1264 Out of range value for column 'i1' at row 1
|
|
Warning 1264 Out of range value for column 'i20' at row 1
|
|
Warning 1264 Out of range value for column 't' at row 1
|
|
Warning 1264 Out of range value for column 't0' at row 1
|
|
Warning 1264 Out of range value for column 't1' at row 1
|
|
Warning 1264 Out of range value for column 't20' at row 1
|
|
Warning 1264 Out of range value for column 's' at row 1
|
|
Warning 1264 Out of range value for column 's0' at row 1
|
|
Warning 1264 Out of range value for column 's1' at row 1
|
|
Warning 1264 Out of range value for column 's20' at row 1
|
|
Warning 1264 Out of range value for column 'm' at row 1
|
|
Warning 1264 Out of range value for column 'm0' at row 1
|
|
Warning 1264 Out of range value for column 'm1' at row 1
|
|
Warning 1264 Out of range value for column 'm20' at row 1
|
|
Warning 1264 Out of range value for column 'b' at row 1
|
|
Warning 1264 Out of range value for column 'b0' at row 1
|
|
Warning 1264 Out of range value for column 'b1' at row 1
|
|
Warning 1264 Out of range value for column 'b20' at row 1
|
|
INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) VALUES (4294967296,4294967296,4294967296,4294967296,256,256,256,256,65536,65536,65536,65536,16777216,16777216,16777216,16777216,18446744073709551616,18446744073709551616,18446744073709551616,18446744073709551616);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'i' at row 1
|
|
Warning 1264 Out of range value for column 'i0' at row 1
|
|
Warning 1264 Out of range value for column 'i1' at row 1
|
|
Warning 1264 Out of range value for column 'i20' at row 1
|
|
Warning 1264 Out of range value for column 't' at row 1
|
|
Warning 1264 Out of range value for column 't0' at row 1
|
|
Warning 1264 Out of range value for column 't1' at row 1
|
|
Warning 1264 Out of range value for column 't20' at row 1
|
|
Warning 1264 Out of range value for column 's' at row 1
|
|
Warning 1264 Out of range value for column 's0' at row 1
|
|
Warning 1264 Out of range value for column 's1' at row 1
|
|
Warning 1264 Out of range value for column 's20' at row 1
|
|
Warning 1264 Out of range value for column 'm' at row 1
|
|
Warning 1264 Out of range value for column 'm0' at row 1
|
|
Warning 1264 Out of range value for column 'm1' at row 1
|
|
Warning 1264 Out of range value for column 'm20' at row 1
|
|
Warning 1264 Out of range value for column 'b' at row 1
|
|
Warning 1264 Out of range value for column 'b0' at row 1
|
|
Warning 1264 Out of range value for column 'b1' at row 1
|
|
Warning 1264 Out of range value for column 'b20' at row 1
|
|
INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) SELECT b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b FROM t1 WHERE b IN (-9223372036854775808,9223372036854775807,18446744073709551615);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'i' at row 1
|
|
Warning 1264 Out of range value for column 'i0' at row 1
|
|
Warning 1264 Out of range value for column 'i1' at row 1
|
|
Warning 1264 Out of range value for column 'i20' at row 1
|
|
Warning 1264 Out of range value for column 't' at row 1
|
|
Warning 1264 Out of range value for column 't0' at row 1
|
|
Warning 1264 Out of range value for column 't1' at row 1
|
|
Warning 1264 Out of range value for column 't20' at row 1
|
|
Warning 1264 Out of range value for column 's' at row 1
|
|
Warning 1264 Out of range value for column 's0' at row 1
|
|
Warning 1264 Out of range value for column 's1' at row 1
|
|
Warning 1264 Out of range value for column 's20' at row 1
|
|
Warning 1264 Out of range value for column 'm' at row 1
|
|
Warning 1264 Out of range value for column 'm0' at row 1
|
|
Warning 1264 Out of range value for column 'm1' at row 1
|
|
Warning 1264 Out of range value for column 'm20' at row 1
|
|
Warning 1264 Out of range value for column 'i' at row 2
|
|
Warning 1264 Out of range value for column 'i0' at row 2
|
|
Warning 1264 Out of range value for column 'i1' at row 2
|
|
Warning 1264 Out of range value for column 'i20' at row 2
|
|
Warning 1264 Out of range value for column 't' at row 2
|
|
Warning 1264 Out of range value for column 't0' at row 2
|
|
Warning 1264 Out of range value for column 't1' at row 2
|
|
Warning 1264 Out of range value for column 't20' at row 2
|
|
Warning 1264 Out of range value for column 's' at row 2
|
|
Warning 1264 Out of range value for column 's0' at row 2
|
|
Warning 1264 Out of range value for column 's1' at row 2
|
|
Warning 1264 Out of range value for column 's20' at row 2
|
|
Warning 1264 Out of range value for column 'm' at row 2
|
|
Warning 1264 Out of range value for column 'm0' at row 2
|
|
Warning 1264 Out of range value for column 'm1' at row 2
|
|
Warning 1264 Out of range value for column 'm20' at row 2
|
|
Warning 1264 Out of range value for column 'i' at row 3
|
|
Warning 1264 Out of range value for column 'i0' at row 3
|
|
Warning 1264 Out of range value for column 'i1' at row 3
|
|
Warning 1264 Out of range value for column 'i20' at row 3
|
|
Warning 1264 Out of range value for column 't' at row 3
|
|
Warning 1264 Out of range value for column 't0' at row 3
|
|
Warning 1264 Out of range value for column 't1' at row 3
|
|
Warning 1264 Out of range value for column 't20' at row 3
|
|
Warning 1264 Out of range value for column 's' at row 3
|
|
Warning 1264 Out of range value for column 's0' at row 3
|
|
Warning 1264 Out of range value for column 's1' at row 3
|
|
Warning 1264 Out of range value for column 's20' at row 3
|
|
Warning 1264 Out of range value for column 'm' at row 3
|
|
Warning 1264 Out of range value for column 'm0' at row 3
|
|
Warning 1264 Out of range value for column 'm1' at row 3
|
|
Warning 1264 Out of range value for column 'm20' at row 3
|
|
SELECT i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20 FROM t1;
|
|
i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20
|
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
|
2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807
|
|
4294967295 4294967295 4294967295 4294967295 255 255 255 255 65535 65535 65535 65535 16777215 16777215 16777215 16777215 18446744073709551615 18446744073709551615 18446744073709551615 18446744073709551615
|
|
4294967295 4294967295 4294967295 4294967295 255 255 255 255 65535 65535 65535 65535 16777215 16777215 16777215 16777215 18446744073709551615 18446744073709551615 18446744073709551615 18446744073709551615
|
|
4294967295 4294967295 4294967295 4294967295 255 255 255 255 65535 65535 65535 65535 16777215 16777215 16777215 16777215 18446744073709551615 18446744073709551615 18446744073709551615 18446744073709551615
|
|
4294967295 4294967295 4294967295 4294967295 255 255 255 255 65535 65535 65535 65535 16777215 16777215 16777215 16777215 18446744073709551615 18446744073709551615 18446744073709551615 18446744073709551615
|
|
4294967295 4294967295 4294967295 4294967295 255 255 255 255 65535 65535 65535 65535 16777215 16777215 16777215 16777215 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807
|
|
ALTER TABLE t1 ADD COLUMN i257 INT(257) UNSIGNED;
|
|
ERROR 42000: Display width out of range for column 'i257' (max = 255)
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (
|
|
t TINYINT UNSIGNED,
|
|
s SMALLINT UNSIGNED,
|
|
m MEDIUMINT UNSIGNED,
|
|
i INT UNSIGNED,
|
|
b BIGINT UNSIGNED,
|
|
PRIMARY KEY (b)
|
|
) ENGINE=xengine;
|
|
SHOW COLUMNS IN t1;
|
|
Field Type Null Key Default Extra
|
|
t tinyint(3) unsigned YES NULL
|
|
s smallint(5) unsigned YES NULL
|
|
m mediumint(8) unsigned YES NULL
|
|
i int(10) unsigned YES NULL
|
|
b bigint(20) unsigned NO PRI NULL
|
|
INSERT INTO t1 (t,s,m,i,b) VALUES (255,65535,16777215,4294967295,18446744073709551615);
|
|
INSERT INTO t1 (t,s,m,i,b) VALUES (-1,-1,-1,-1,-1);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 't' at row 1
|
|
Warning 1264 Out of range value for column 's' at row 1
|
|
Warning 1264 Out of range value for column 'm' at row 1
|
|
Warning 1264 Out of range value for column 'i' at row 1
|
|
Warning 1264 Out of range value for column 'b' at row 1
|
|
SELECT t,s,m,i,b FROM t1;
|
|
t s m i b
|
|
0 0 0 0 0
|
|
255 65535 16777215 4294967295 18446744073709551615
|
|
DROP TABLE t1;
|