MariaRocks port: update results for rocksdb.col_opt_null test.

The differences are due:
- MariaDB 10.1+ assigns different DEFAULT values
  = in some cases, MariaDB's table has no default value, while
    MySQL's has '' as default.
  = BLOB/TEXT can have a default value.
- MariaDB's MTR runs tests with diffferent timezone (affects result of
  FROM_UNIXTIME())
- MySQL has removed YEAR(2). MariaDB produces warning but still creates
  the column of this type.
- Different wording in warning/error messages.
This commit is contained in:
Sergei Petrunia 2016-11-10 20:36:24 +00:00
parent ce9aeb888e
commit 8014a942b7

View file

@ -91,12 +91,12 @@ SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
v0 varbinary(0) YES NULL
v1 varbinary(1) YES NULL
v64 varbinary(64) NO PRI
v64 varbinary(64) NO PRI NULL
v65000 varbinary(65000) YES NULL
CREATE TABLE t2 (v VARBINARY(65532) NULL, PRIMARY KEY(v(255))) ENGINE=rocksdb;
SHOW COLUMNS IN t2;
Field Type Null Key Default Extra
v varbinary(65532) NO PRI
v varbinary(65532) NO PRI NULL
INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('','','','');
INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('','y','Once there, double check that an article doesn\'t already exist','Here is a list of recommended books on MariaDB and MySQL. We\'ve provided links to Amazon.com here for convenience, but they can be found at many other bookstores, both online and off.
@ -168,7 +168,7 @@ SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
v0 varbinary(0) YES NULL
v1 varbinary(1) YES NULL
v64 varbinary(64) NO PRI
v64 varbinary(64) NO PRI NULL
v65000 varbinary(65000) YES NULL
v65536 mediumblob YES NULL
DROP TABLE t1, t2;
@ -214,7 +214,7 @@ SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
a bit(1) YES NULL
b bit(20) YES NULL
c bit(64) NO PRI b'0'
c bit(64) NO PRI NULL
d bit(1) YES NULL
ALTER TABLE t1 DROP COLUMN d;
ALTER TABLE t1 ADD COLUMN d BIT(0) NULL;
@ -222,7 +222,7 @@ SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
a bit(1) YES NULL
b bit(20) YES NULL
c bit(64) NO PRI b'0'
c bit(64) NO PRI NULL
d bit(1) YES NULL
INSERT INTO t1 (a,b,c,d) VALUES (0,POW(2,20)-1,b'1111111111111111111111111111111111111111111111111111111111111111',1);
SELECT BIN(a), HEX(b), c+0 FROM t1 WHERE d>0;
@ -349,13 +349,11 @@ c1 BLOB NULL DEFAULT NULL,
c2 BLOB NULL DEFAULT '',
pk INT AUTO_INCREMENT PRIMARY KEY
) ENGINE=rocksdb;
Warnings:
Warning 1101 BLOB/TEXT column 'c2' can't have a default value
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
c blob YES NULL
c1 blob YES NULL
c2 blob YES NULL
c2 blob YES ''
pk int(11) NO PRI NULL auto_increment
INSERT INTO t1 (c,c1,c2) VALUES (NULL,NULL,NULL);
INSERT INTO t1 (c,c1,c2) VALUES ('','','');
@ -364,12 +362,12 @@ SELECT pk, HEX(c), HEX(c1), HEX(c2) FROM t1 ORDER BY pk;
pk HEX(c) HEX(c1) HEX(c2)
1 NULL NULL NULL
2
3 NULL NULL NULL
3 NULL NULL
SELECT pk, HEX(c2) FROM t1 ORDER BY pk;
pk HEX(c2)
1 NULL
2
3 NULL
3
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@ -378,13 +376,11 @@ c1 TINYBLOB NULL DEFAULT NULL,
c2 TINYBLOB NULL DEFAULT '',
pk INT AUTO_INCREMENT PRIMARY KEY
) ENGINE=rocksdb;
Warnings:
Warning 1101 BLOB/TEXT column 'c2' can't have a default value
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
c tinyblob YES NULL
c1 tinyblob YES NULL
c2 tinyblob YES NULL
c2 tinyblob YES ''
pk int(11) NO PRI NULL auto_increment
INSERT INTO t1 (c,c1,c2) VALUES (NULL,NULL,NULL);
INSERT INTO t1 (c,c1,c2) VALUES ('','','');
@ -393,12 +389,12 @@ SELECT pk, HEX(c), HEX(c1), HEX(c2) FROM t1 ORDER BY pk;
pk HEX(c) HEX(c1) HEX(c2)
1 NULL NULL NULL
2
3 NULL NULL NULL
3 NULL NULL
SELECT pk, HEX(c2) FROM t1 ORDER BY pk;
pk HEX(c2)
1 NULL
2
3 NULL
3
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@ -407,13 +403,11 @@ c1 MEDIUMBLOB NULL DEFAULT NULL,
c2 MEDIUMBLOB NULL DEFAULT '',
pk INT AUTO_INCREMENT PRIMARY KEY
) ENGINE=rocksdb;
Warnings:
Warning 1101 BLOB/TEXT column 'c2' can't have a default value
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
c mediumblob YES NULL
c1 mediumblob YES NULL
c2 mediumblob YES NULL
c2 mediumblob YES ''
pk int(11) NO PRI NULL auto_increment
INSERT INTO t1 (c,c1,c2) VALUES (NULL,NULL,NULL);
INSERT INTO t1 (c,c1,c2) VALUES ('','','');
@ -422,12 +416,12 @@ SELECT pk, HEX(c), HEX(c1), HEX(c2) FROM t1 ORDER BY pk;
pk HEX(c) HEX(c1) HEX(c2)
1 NULL NULL NULL
2
3 NULL NULL NULL
3 NULL NULL
SELECT pk, HEX(c2) FROM t1 ORDER BY pk;
pk HEX(c2)
1 NULL
2
3 NULL
3
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@ -436,13 +430,11 @@ c1 LONGBLOB NULL DEFAULT NULL,
c2 LONGBLOB NULL DEFAULT '',
pk INT AUTO_INCREMENT PRIMARY KEY
) ENGINE=rocksdb;
Warnings:
Warning 1101 BLOB/TEXT column 'c2' can't have a default value
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
c longblob YES NULL
c1 longblob YES NULL
c2 longblob YES NULL
c2 longblob YES ''
pk int(11) NO PRI NULL auto_increment
INSERT INTO t1 (c,c1,c2) VALUES (NULL,NULL,NULL);
INSERT INTO t1 (c,c1,c2) VALUES ('','','');
@ -451,12 +443,12 @@ SELECT pk, HEX(c), HEX(c1), HEX(c2) FROM t1 ORDER BY pk;
pk HEX(c) HEX(c1) HEX(c2)
1 NULL NULL NULL
2
3 NULL NULL NULL
3 NULL NULL
SELECT pk, HEX(c2) FROM t1 ORDER BY pk;
pk HEX(c2)
1 NULL
2
3 NULL
3
DROP TABLE t1;
########################
# BOOL columns
@ -530,9 +522,9 @@ b1 b2
127 -128
2 3
ALTER TABLE t1 ADD COLUMN b3 BOOLEAN UNSIGNED NULL;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNSIGNED NULL' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNSIGNED NULL' at line 1
ALTER TABLE ADD COLUMN b3 BOOL ZEROFILL NULL;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ADD COLUMN b3 BOOL ZEROFILL NULL' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ADD COLUMN b3 BOOL ZEROFILL NULL' at line 1
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@ -579,7 +571,7 @@ c char(1) YES NULL
c0 char(0) YES NULL
c1 char(1) YES NULL
c20 char(20) YES NULL
c255 char(255) NO PRI
c255 char(255) NO PRI NULL
INSERT INTO t1 (c,c0,c1,c20,c255) VALUES ('','','','','');
INSERT INTO t1 (c,c0,c1,c20,c255) VALUES ('a','','b','abcdefghi klmnopqrst', 'Creating an article for the Knowledgebase is similar to asking questions. First, navigate to the category where you feel the article should be. Once there, double check that an article doesn\'t already exist which would work.');
SELECT c,c0,c1,c20,c255 FROM t1;
@ -664,12 +656,12 @@ SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
v0 varchar(0) YES NULL
v1 varchar(1) YES NULL
v64 varchar(64) NO PRI
v64 varchar(64) NO PRI NULL
v65000 varchar(65000) YES NULL
CREATE TABLE t2 (v VARCHAR(65532), PRIMARY KEY (v(255))) ENGINE=rocksdb;
SHOW COLUMNS IN t2;
Field Type Null Key Default Extra
v varchar(65532) NO PRI
v varchar(65532) NO PRI NULL
INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('','','','');
INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('','y','Once there, double check that an article doesn\'t already exist','Here is a list of recommended books on MariaDB and MySQL. We\'ve provided links to Amazon.com here for convenience, but they can be found at many other bookstores, both online and off.
@ -776,7 +768,7 @@ SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
v0 varchar(0) YES NULL
v1 varchar(1) YES NULL
v64 varchar(64) NO PRI
v64 varchar(64) NO PRI NULL
v65000 varchar(65000) YES NULL
v65536 mediumtext YES NULL
DROP TABLE t1, t2;
@ -822,7 +814,7 @@ y2 YEAR(2) NULL,
pk DATETIME PRIMARY KEY
) ENGINE=rocksdb;
Warnings:
Warning 1818 YEAR(2) column type is deprecated. Creating YEAR(4) column instead.
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
d date YES NULL
@ -831,7 +823,7 @@ ts timestamp YES NULL
t time YES NULL
y year(4) YES NULL
y4 year(4) YES NULL
y2 year(4) YES NULL
y2 year(2) YES NULL
pk datetime NO PRI NULL
SET @tm = '2012-04-09 05:27:00';
INSERT INTO t1 (d,dt,ts,t,y,y4,y2,pk) VALUES
@ -841,27 +833,27 @@ INSERT INTO t1 (d,dt,ts,t,y,y4,y2,pk) VALUES
(DATE(@tm),@tm,TIMESTAMP(@tm),TIME(@tm),YEAR(@tm),YEAR(@tm),YEAR(@tm),'2012-12-12 12:12:15');
SELECT d,dt,ts,t,y,y4,y2 FROM t1;
d dt ts t y y4 y2
0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 00:00:00 2000 2000 2000
1000-01-01 1000-01-01 00:00:00 1970-01-01 03:00:01 -838:59:59 1901 1901 2000
2012-04-09 2012-04-09 05:27:00 2012-04-09 05:27:00 05:27:00 2012 2012 2012
9999-12-31 9999-12-31 23:59:59 2038-01-19 06:14:07 838:59:59 2155 2155 1999
0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 00:00:00 2000 2000 00
1000-01-01 1000-01-01 00:00:00 1970-01-01 00:00:01 -838:59:59 1901 1901 00
2012-04-09 2012-04-09 05:27:00 2012-04-09 05:27:00 05:27:00 2012 2012 12
9999-12-31 9999-12-31 23:59:59 2038-01-19 03:14:07 838:59:59 2155 2155 99
INSERT INTO t1 (d,dt,ts,t,y,y4,y2,pk) VALUES
('999-13-32', '999-11-31 00:00:00', '0', '-839:00:00', '1900', '1900', '-1','2012-12-12 12:12:16');
Warnings:
Warning 1265 Data truncated for column 'd' at row 1
Warning 1264 Out of range value for column 'dt' at row 1
Warning 1264 Out of range value for column 'ts' at row 1
Warning 1265 Data truncated for column 'dt' at row 1
Warning 1265 Data truncated for column 'ts' at row 1
Warning 1264 Out of range value for column 't' at row 1
Warning 1264 Out of range value for column 'y' at row 1
Warning 1264 Out of range value for column 'y4' at row 1
Warning 1264 Out of range value for column 'y2' at row 1
SELECT d,dt,ts,t,y,y4,y2 FROM t1;
d dt ts t y y4 y2
1000-01-01 1000-01-01 00:00:00 1970-01-01 03:00:01 -838:59:59 1901 1901 2000
9999-12-31 9999-12-31 23:59:59 2038-01-19 06:14:07 838:59:59 2155 2155 1999
0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 00:00:00 2000 2000 2000
2012-04-09 2012-04-09 05:27:00 2012-04-09 05:27:00 05:27:00 2012 2012 2012
0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 -838:59:59 0000 0000 0000
1000-01-01 1000-01-01 00:00:00 1970-01-01 00:00:01 -838:59:59 1901 1901 00
9999-12-31 9999-12-31 23:59:59 2038-01-19 03:14:07 838:59:59 2155 2155 99
0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 00:00:00 2000 2000 00
2012-04-09 2012-04-09 05:27:00 2012-04-09 05:27:00 05:27:00 2012 2012 12
0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 -838:59:59 0000 0000 00
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@ -1006,14 +998,14 @@ c2 YEAR(2) NULL DEFAULT '12',
pk INT AUTO_INCREMENT PRIMARY KEY
) ENGINE=rocksdb;
Warnings:
Warning 1818 YEAR(2) column type is deprecated. Creating YEAR(4) column instead.
Warning 1818 YEAR(2) column type is deprecated. Creating YEAR(4) column instead.
Warning 1818 YEAR(2) column type is deprecated. Creating YEAR(4) column instead.
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
c year(4) YES NULL
c1 year(4) YES NULL
c2 year(4) YES 2012
c year(2) YES NULL
c1 year(2) YES NULL
c2 year(2) YES 12
pk int(11) NO PRI NULL auto_increment
INSERT INTO t1 (c,c1,c2) VALUES (NULL,NULL,NULL);
INSERT INTO t1 (c,c1,c2) VALUES ('12','12','12');
@ -1021,13 +1013,13 @@ INSERT INTO t1 () VALUES ();
SELECT pk, HEX(c), HEX(c1), HEX(c2) FROM t1 ORDER BY pk;
pk HEX(c) HEX(c1) HEX(c2)
1 NULL NULL NULL
2 7DC 7DC 7DC
3 NULL NULL 7DC
2 C C C
3 NULL NULL C
SELECT pk, HEX(c2) FROM t1 ORDER BY pk;
pk HEX(c2)
1 NULL
2 7DC
3 7DC
2 C
3 C
DROP TABLE t1;
########################
# ENUM columns
@ -1042,7 +1034,7 @@ PRIMARY KEY (b)
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
a enum('') YES NULL
b enum('test1','test2','test3','test4','test5') NO PRI test1
b enum('test1','test2','test3','test4','test5') NO PRI NULL
c enum('1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','','11','12','13','14','15','16','17','18','19','1a','1b','1c','1d','1e','1f','1g','1h','1i','1j','1k','1l','1m','1n','1o','1p','1q','1r','1s','1t','1u','1v','1w','1x','1y','1z','20','21','22','23','24','25','26','27','28','29','2a','2b','2c','2d','2e','2f','2g','2h','2i','2j','2k','2l','2m','2n','2o','2p','2q','2r','2s','2t','2u','2v','2w','2x','2y','2z','30','31','32','33','34','35','36','37','38','39','3a','3b','3c','3d','3e','3f','3g','3h','3i','3j','3k','3l','3m','3n','3o','3p','3q','3r','3s','3t','3u','3v','3w','3x','3y','3z','40','41','42','43','44','45','46','47','48','49','4a','4b','4c','4d','4e','4f','4g','4h','4i','4j','4k','4l','4m','4n','4o','4p','4q','4r','4s','4t','4u','4v','4w','4x','4y','4z','50','51','52','53','54','55','56','57','58','59','5a','5b','5c','5d','5e','5f','5g','5h','5i','5j','5k','5l','5m','5n','5o','5p','5q','5r','5s','5t','5u','5v','5w','5x','5y','5z','60','61','62','63','64','65','66','67','68','69','6a','6b','6c','6d','6e','6f','6g','6h','6i','6j','6k','6l','6m','6n','6o','6p','6q','6r','6s','6t','6u','6v','6w','6x','6y','6z','70','71','72','73','74','75') YES NULL
INSERT INTO t1 (a,b,c) VALUES ('','test2','4'),('',5,2);
SELECT a,b,c FROM t1;
@ -1065,7 +1057,7 @@ Note 1291 Column 'e' has duplicated value 'a' in ENUM
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
a enum('') YES NULL
b enum('test1','test2','test3','test4','test5') NO PRI test1
b enum('test1','test2','test3','test4','test5') NO PRI NULL
c enum('1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','','11','12','13','14','15','16','17','18','19','1a','1b','1c','1d','1e','1f','1g','1h','1i','1j','1k','1l','1m','1n','1o','1p','1q','1r','1s','1t','1u','1v','1w','1x','1y','1z','20','21','22','23','24','25','26','27','28','29','2a','2b','2c','2d','2e','2f','2g','2h','2i','2j','2k','2l','2m','2n','2o','2p','2q','2r','2s','2t','2u','2v','2w','2x','2y','2z','30','31','32','33','34','35','36','37','38','39','3a','3b','3c','3d','3e','3f','3g','3h','3i','3j','3k','3l','3m','3n','3o','3p','3q','3r','3s','3t','3u','3v','3w','3x','3y','3z','40','41','42','43','44','45','46','47','48','49','4a','4b','4c','4d','4e','4f','4g','4h','4i','4j','4k','4l','4m','4n','4o','4p','4q','4r','4s','4t','4u','4v','4w','4x','4y','4z','50','51','52','53','54','55','56','57','58','59','5a','5b','5c','5d','5e','5f','5g','5h','5i','5j','5k','5l','5m','5n','5o','5p','5q','5r','5s','5t','5u','5v','5w','5x','5y','5z','60','61','62','63','64','65','66','67','68','69','6a','6b','6c','6d','6e','6f','6g','6h','6i','6j','6k','6l','6m','6n','6o','6p','6q','6r','6s','6t','6u','6v','6w','6x','6y','6z','70','71','72','73','74','75') YES NULL
e enum('a','A') YES NULL
INSERT INTO t1 (a,b,c,e) VALUES ('','test3','75','A');
@ -1234,11 +1226,11 @@ d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4
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) NULL;
ERROR 42000: Too big precision 66 specified for column 'n66'. Maximum is 65.
ERROR 42000: Too big precision 66 specified for 'n66'. Maximum is 65
ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(66,6) NULL;
ERROR 42000: Too big precision 66 specified for column 'n66_6'. Maximum is 65.
ERROR 42000: Too big precision 66 specified for 'n66_6'. Maximum is 65
ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(66,66) NULL;
ERROR 42000: Too big scale 66 specified for column 'n66_66'. Maximum is 30.
ERROR 42000: Too big scale 66 specified for 'n66_66'. Maximum is 38
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@ -1531,7 +1523,7 @@ INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (
6
);
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: ''
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
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
@ -1603,11 +1595,9 @@ r1_1 0.9
r1_1 0.9
r1_1 0.9
ALTER TABLE t1 ADD COLUMN d0_0 DOUBLE(0,0) NULL;
ERROR 42000: Display width out of range for column 'd0_0' (max = 255)
ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(256,1) NULL;
ERROR 42000: Too big precision 256 specified for column 'n66_6'. Maximum is 65.
ERROR 42000: Too big precision 256 specified for 'n66_6'. Maximum is 65
ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(40,35) NULL;
ERROR 42000: Too big scale 35 specified for column 'n66_66'. Maximum is 30.
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@ -1876,7 +1866,7 @@ i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20
2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807
2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807
ALTER TABLE t1 ADD COLUMN i257 INT(257) NULL;
ERROR 42000: Display width out of range for column 'i257' (max = 255)
ERROR 42000: Display width out of range for 'i257' (max = 255)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@ -2027,7 +2017,7 @@ SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
a set('') YES NULL
b set('test1','test2','test3','test4','test5') YES NULL
c set('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50''51','52','53','54','55','56','57','58','59','60','61','62','63','64') NO PRI
c set('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50''51','52','53','54','55','56','57','58','59','60','61','62','63','64') NO PRI NULL
INSERT INTO t1 (a,b,c) VALUES
('','test2,test3','01,34,44,,23'),
('',5,2),
@ -2056,7 +2046,7 @@ SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
a set('') YES NULL
b set('test1','test2','test3','test4','test5') YES NULL
c set('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50''51','52','53','54','55','56','57','58','59','60','61','62','63','64') NO PRI
c set('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50''51','52','53','54','55','56','57','58','59','60','61','62','63','64') NO PRI NULL
e set('a','A') YES NULL
ALTER TABLE t1 ADD COLUMN f SET('1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',' ','11','12','13','14','15','16','17','18','19','1a','1b','1c','1d','1e','1f','1g','1h','1i','1j','1k','1l','1m','1n','1o','1p','1q','1r','1s','1t','1u','1v','1w','1x','1y','1z','20','21','22','23','24','25','26','27','28','29','2a','2b','2c','2d','2e','2f','2g','2h','2i','2j','2k','2l','2m','2n','2o','2p','2q','2r','2s','2t','2u','2v','2w','2x','2y','2z','30','31','32','33','34','35','36','37','38','39','3a','3b','3c','3d','3e','3f','3g','3h','3i') NULL;
ERROR HY000: Too many strings for column f and SET
@ -2150,7 +2140,7 @@ LENGTH(t) LENGTH(t0) LENGTH(t1) LENGTH(t300) LENGTH(tm) LENGTH(t70k) LENGTH(t17m
65535 65535 255 65535 65535 1048576 1048576 255 1048576 1048576
65535 65535 255 65535 65535 1048576 1048576 255 1048576 1048576
ALTER TABLE t1 ADD COLUMN ttt TEXT(4294967296) NULL;
ERROR 42000: Display width out of range for column 'ttt' (max = 4294967295)
ERROR 42000: Display width out of range for 'ttt' (max = 4294967295)
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@ -2159,13 +2149,11 @@ c1 TEXT NULL DEFAULT NULL,
c2 TEXT NULL DEFAULT '',
pk INT AUTO_INCREMENT PRIMARY KEY
) ENGINE=rocksdb;
Warnings:
Warning 1101 BLOB/TEXT column 'c2' can't have a default value
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
c text YES NULL
c1 text YES NULL
c2 text YES NULL
c2 text YES ''
pk int(11) NO PRI NULL auto_increment
INSERT INTO t1 (c,c1,c2) VALUES (NULL,NULL,NULL);
INSERT INTO t1 (c,c1,c2) VALUES ('','','');
@ -2174,12 +2162,12 @@ SELECT pk, HEX(c), HEX(c1), HEX(c2) FROM t1 ORDER BY pk;
pk HEX(c) HEX(c1) HEX(c2)
1 NULL NULL NULL
2
3 NULL NULL NULL
3 NULL NULL
SELECT pk, HEX(c2) FROM t1 ORDER BY pk;
pk HEX(c2)
1 NULL
2
3 NULL
3
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@ -2188,13 +2176,11 @@ c1 TINYTEXT NULL DEFAULT NULL,
c2 TINYTEXT NULL DEFAULT '',
pk INT AUTO_INCREMENT PRIMARY KEY
) ENGINE=rocksdb;
Warnings:
Warning 1101 BLOB/TEXT column 'c2' can't have a default value
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
c tinytext YES NULL
c1 tinytext YES NULL
c2 tinytext YES NULL
c2 tinytext YES ''
pk int(11) NO PRI NULL auto_increment
INSERT INTO t1 (c,c1,c2) VALUES (NULL,NULL,NULL);
INSERT INTO t1 (c,c1,c2) VALUES ('','','');
@ -2203,12 +2189,12 @@ SELECT pk, HEX(c), HEX(c1), HEX(c2) FROM t1 ORDER BY pk;
pk HEX(c) HEX(c1) HEX(c2)
1 NULL NULL NULL
2
3 NULL NULL NULL
3 NULL NULL
SELECT pk, HEX(c2) FROM t1 ORDER BY pk;
pk HEX(c2)
1 NULL
2
3 NULL
3
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@ -2217,13 +2203,11 @@ c1 MEDIUMTEXT NULL DEFAULT NULL,
c2 MEDIUMTEXT NULL DEFAULT '',
pk INT AUTO_INCREMENT PRIMARY KEY
) ENGINE=rocksdb;
Warnings:
Warning 1101 BLOB/TEXT column 'c2' can't have a default value
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
c mediumtext YES NULL
c1 mediumtext YES NULL
c2 mediumtext YES NULL
c2 mediumtext YES ''
pk int(11) NO PRI NULL auto_increment
INSERT INTO t1 (c,c1,c2) VALUES (NULL,NULL,NULL);
INSERT INTO t1 (c,c1,c2) VALUES ('','','');
@ -2232,12 +2216,12 @@ SELECT pk, HEX(c), HEX(c1), HEX(c2) FROM t1 ORDER BY pk;
pk HEX(c) HEX(c1) HEX(c2)
1 NULL NULL NULL
2
3 NULL NULL NULL
3 NULL NULL
SELECT pk, HEX(c2) FROM t1 ORDER BY pk;
pk HEX(c2)
1 NULL
2
3 NULL
3
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
@ -2246,13 +2230,11 @@ c1 LONGTEXT NULL DEFAULT NULL,
c2 LONGTEXT NULL DEFAULT '',
pk INT AUTO_INCREMENT PRIMARY KEY
) ENGINE=rocksdb;
Warnings:
Warning 1101 BLOB/TEXT column 'c2' can't have a default value
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
c longtext YES NULL
c1 longtext YES NULL
c2 longtext YES NULL
c2 longtext YES ''
pk int(11) NO PRI NULL auto_increment
INSERT INTO t1 (c,c1,c2) VALUES (NULL,NULL,NULL);
INSERT INTO t1 (c,c1,c2) VALUES ('','','');
@ -2261,10 +2243,10 @@ SELECT pk, HEX(c), HEX(c1), HEX(c2) FROM t1 ORDER BY pk;
pk HEX(c) HEX(c1) HEX(c2)
1 NULL NULL NULL
2
3 NULL NULL NULL
3 NULL NULL
SELECT pk, HEX(c2) FROM t1 ORDER BY pk;
pk HEX(c2)
1 NULL
2
3 NULL
3
DROP TABLE t1;