Skip to content

Commit 183ab78

Browse files
committed
MariaRocks port: more test result updates, again
- Make the same changes as in the previous cset and in a cset changing rocksdb.col_opt_null a few csets before. - MySQL 5.6.11 has fixes for Bug #68472, Bug #16394472, MariaDB doesn't. adjust the testcase accordingly.
1 parent 223c14e commit 183ab78

File tree

2 files changed

+57
-63
lines changed

2 files changed

+57
-63
lines changed

storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result

Lines changed: 46 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ a+0 b+0 c+0 d+0
276276
1 0 18446744073709551615 0
277277
DROP TABLE t1;
278278
CREATE TABLE t1 (pk INT PRIMARY KEY, a BIT(65) NOT NULL) ENGINE=rocksdb;
279-
ERROR 42000: Display width out of range for column 'a' (max = 64)
279+
ERROR 42000: Display width out of range for 'a' (max = 64)
280280
DROP TABLE IF EXISTS t1;
281281
#----------------------------------
282282
# BIT NOT NULL columns without a default
@@ -373,7 +373,7 @@ LENGTH(b) LENGTH(b0) LENGTH(b1) LENGTH(b300) LENGTH(bm) LENGTH(b70k) LENGTH(b17m
373373
65535 65535 255 65535 65535 1048576 1048576 255 1048576 1048576
374374
65535 65535 255 65535 65535 1048576 2097152 255 1048576 2097152
375375
ALTER TABLE t1 ADD COLUMN bbb BLOB(4294967296);
376-
ERROR 42000: Display width out of range for column 'bbb' (max = 4294967295)
376+
ERROR 42000: Display width out of range for 'bbb' (max = 4294967295)
377377
DROP TABLE t1;
378378
DROP TABLE IF EXISTS t1;
379379
#----------------------------------
@@ -398,12 +398,10 @@ CREATE TABLE t1 (
398398
pk INT AUTO_INCREMENT PRIMARY KEY,
399399
c BLOB NOT NULL DEFAULT ''
400400
) ENGINE=rocksdb;
401-
Warnings:
402-
Warning 1101 BLOB/TEXT column 'c' can't have a default value
403401
SHOW COLUMNS IN t1;
404402
Field Type Null Key Default Extra
405403
pk int(11) NO PRI NULL auto_increment
406-
c blob NO NULL
404+
c blob NO ''
407405
ALTER TABLE t1 ADD COLUMN err BLOB NOT NULL DEFAULT NULL;
408406
ERROR 42000: Invalid default value for 'err'
409407
INSERT INTO t1 (c) VALUES (NULL);
@@ -438,12 +436,10 @@ CREATE TABLE t1 (
438436
pk INT AUTO_INCREMENT PRIMARY KEY,
439437
c TINYBLOB NOT NULL DEFAULT ''
440438
) ENGINE=rocksdb;
441-
Warnings:
442-
Warning 1101 BLOB/TEXT column 'c' can't have a default value
443439
SHOW COLUMNS IN t1;
444440
Field Type Null Key Default Extra
445441
pk int(11) NO PRI NULL auto_increment
446-
c tinyblob NO NULL
442+
c tinyblob NO ''
447443
ALTER TABLE t1 ADD COLUMN err TINYBLOB NOT NULL DEFAULT NULL;
448444
ERROR 42000: Invalid default value for 'err'
449445
INSERT INTO t1 (c) VALUES (NULL);
@@ -478,12 +474,10 @@ CREATE TABLE t1 (
478474
pk INT AUTO_INCREMENT PRIMARY KEY,
479475
c MEDIUMBLOB NOT NULL DEFAULT ''
480476
) ENGINE=rocksdb;
481-
Warnings:
482-
Warning 1101 BLOB/TEXT column 'c' can't have a default value
483477
SHOW COLUMNS IN t1;
484478
Field Type Null Key Default Extra
485479
pk int(11) NO PRI NULL auto_increment
486-
c mediumblob NO NULL
480+
c mediumblob NO ''
487481
ALTER TABLE t1 ADD COLUMN err MEDIUMBLOB NOT NULL DEFAULT NULL;
488482
ERROR 42000: Invalid default value for 'err'
489483
INSERT INTO t1 (c) VALUES (NULL);
@@ -518,12 +512,10 @@ CREATE TABLE t1 (
518512
pk INT AUTO_INCREMENT PRIMARY KEY,
519513
c LONGBLOB NOT NULL DEFAULT ''
520514
) ENGINE=rocksdb;
521-
Warnings:
522-
Warning 1101 BLOB/TEXT column 'c' can't have a default value
523515
SHOW COLUMNS IN t1;
524516
Field Type Null Key Default Extra
525517
pk int(11) NO PRI NULL auto_increment
526-
c longblob NO NULL
518+
c longblob NO ''
527519
ALTER TABLE t1 ADD COLUMN err LONGBLOB NOT NULL DEFAULT NULL;
528520
ERROR 42000: Invalid default value for 'err'
529521
INSERT INTO t1 (c) VALUES (NULL);
@@ -607,9 +599,9 @@ b1 b2
607599
127 -128
608600
2 3
609601
ALTER TABLE t1 ADD COLUMN b3 BOOLEAN UNSIGNED NOT NULL;
610-
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 NOT NULL' at line 1
602+
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 NOT NULL' at line 1
611603
ALTER TABLE ADD COLUMN b3 BOOL ZEROFILL NOT NULL;
612-
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 NOT NULL' at line 1
604+
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 NOT NULL' at line 1
613605
DROP TABLE t1;
614606
DROP TABLE IF EXISTS t1;
615607
#----------------------------------
@@ -768,7 +760,7 @@ v65000 varchar(65000) NO NULL
768760
CREATE TABLE t2 (v VARCHAR(65532), PRIMARY KEY (v(255))) ENGINE=rocksdb;
769761
SHOW COLUMNS IN t2;
770762
Field Type Null Key Default Extra
771-
v varchar(65532) NO PRI
763+
v varchar(65532) NO PRI NULL
772764
INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('','','','');
773765
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.
774766

@@ -932,7 +924,7 @@ y2 YEAR(2) NOT NULL,
932924
pk DATETIME PRIMARY KEY
933925
) ENGINE=rocksdb;
934926
Warnings:
935-
Warning 1818 YEAR(2) column type is deprecated. Creating YEAR(4) column instead.
927+
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
936928
SHOW COLUMNS IN t1;
937929
Field Type Null Key Default Extra
938930
d date NO NULL
@@ -941,7 +933,7 @@ ts timestamp NO NULL
941933
t time NO NULL
942934
y year(4) NO NULL
943935
y4 year(4) NO NULL
944-
y2 year(4) NO NULL
936+
y2 year(2) NO NULL
945937
pk datetime NO PRI NULL
946938
SET @tm = '2012-04-09 05:27:00';
947939
INSERT INTO t1 (d,dt,ts,t,y,y4,y2,pk) VALUES
@@ -951,27 +943,27 @@ INSERT INTO t1 (d,dt,ts,t,y,y4,y2,pk) VALUES
951943
(DATE(@tm),@tm,TIMESTAMP(@tm),TIME(@tm),YEAR(@tm),YEAR(@tm),YEAR(@tm),'2012-12-12 12:12:15');
952944
SELECT d,dt,ts,t,y,y4,y2 FROM t1;
953945
d dt ts t y y4 y2
954-
0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 00:00:00 2000 2000 2000
955-
1000-01-01 1000-01-01 00:00:00 1970-01-01 03:00:01 -838:59:59 1901 1901 2000
956-
2012-04-09 2012-04-09 05:27:00 2012-04-09 05:27:00 05:27:00 2012 2012 2012
957-
9999-12-31 9999-12-31 23:59:59 2038-01-19 06:14:07 838:59:59 2155 2155 1999
946+
0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 00:00:00 2000 2000 00
947+
1000-01-01 1000-01-01 00:00:00 1970-01-01 00:00:01 -838:59:59 1901 1901 00
948+
2012-04-09 2012-04-09 05:27:00 2012-04-09 05:27:00 05:27:00 2012 2012 12
949+
9999-12-31 9999-12-31 23:59:59 2038-01-19 03:14:07 838:59:59 2155 2155 99
958950
INSERT INTO t1 (d,dt,ts,t,y,y4,y2,pk) VALUES
959951
('999-13-32', '999-11-31 00:00:00', '0', '-839:00:00', '1900', '1900', '-1','2012-12-12 12:12:16');
960952
Warnings:
961953
Warning 1265 Data truncated for column 'd' at row 1
962-
Warning 1264 Out of range value for column 'dt' at row 1
963-
Warning 1264 Out of range value for column 'ts' at row 1
954+
Warning 1265 Data truncated for column 'dt' at row 1
955+
Warning 1265 Data truncated for column 'ts' at row 1
964956
Warning 1264 Out of range value for column 't' at row 1
965957
Warning 1264 Out of range value for column 'y' at row 1
966958
Warning 1264 Out of range value for column 'y4' at row 1
967959
Warning 1264 Out of range value for column 'y2' at row 1
968960
SELECT d,dt,ts,t,y,y4,y2 FROM t1;
969961
d dt ts t y y4 y2
970-
1000-01-01 1000-01-01 00:00:00 1970-01-01 03:00:01 -838:59:59 1901 1901 2000
971-
9999-12-31 9999-12-31 23:59:59 2038-01-19 06:14:07 838:59:59 2155 2155 1999
972-
0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 00:00:00 2000 2000 2000
973-
2012-04-09 2012-04-09 05:27:00 2012-04-09 05:27:00 05:27:00 2012 2012 2012
974-
0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 -838:59:59 0000 0000 0000
962+
1000-01-01 1000-01-01 00:00:00 1970-01-01 00:00:01 -838:59:59 1901 1901 00
963+
9999-12-31 9999-12-31 23:59:59 2038-01-19 03:14:07 838:59:59 2155 2155 99
964+
0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 00:00:00 2000 2000 00
965+
2012-04-09 2012-04-09 05:27:00 2012-04-09 05:27:00 05:27:00 2012 2012 12
966+
0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 -838:59:59 0000 0000 00
975967
DROP TABLE t1;
976968
SET TIMESTAMP=UNIX_TIMESTAMP('2013-12-12 12:12:12');
977969
DROP TABLE IF EXISTS t1;
@@ -1060,10 +1052,10 @@ Field Type Null Key Default Extra
10601052
pk int(11) NO PRI NULL auto_increment
10611053
c timestamp NO NULL
10621054
INSERT INTO t1 (c) VALUES (NULL);
1063-
ERROR 23000: Column 'c' cannot be null
10641055
INSERT INTO t1 (c) VALUES ('2012-12-21 12:21:12');
10651056
SELECT HEX(c) FROM t1;
10661057
HEX(c)
1058+
323031332D31322D31322031323A31323A3132
10671059
323031322D31322D32312031323A32313A3132
10681060
DROP TABLE t1;
10691061
#----------------------------------
@@ -1079,14 +1071,17 @@ pk int(11) NO PRI NULL auto_increment
10791071
c timestamp NO 2012-12-21 12:21:12
10801072
ALTER TABLE t1 ADD COLUMN err TIMESTAMP NOT NULL DEFAULT NULL;
10811073
ERROR 42000: Invalid default value for 'err'
1074+
set @save_ts=@@timestamp;
1075+
set timestamp=1478923914;
10821076
INSERT INTO t1 (c) VALUES (NULL);
1083-
ERROR 23000: Column 'c' cannot be null
1077+
set timestamp=@save_ts;
10841078
INSERT INTO t1 (c) VALUES ('2012-12-21 12:21:12');
10851079
INSERT INTO t1 () VALUES ();
10861080
SELECT pk, HEX(c) FROM t1 ORDER BY pk;
10871081
pk HEX(c)
1088-
1 323031322D31322D32312031323A32313A3132
1082+
1 323031362D31312D31322030343A31313A3534
10891083
2 323031322D31322D32312031323A32313A3132
1084+
3 323031322D31322D32312031323A32313A3132
10901085
DROP TABLE t1;
10911086
DROP TABLE IF EXISTS t1;
10921087
#----------------------------------
@@ -1170,17 +1165,17 @@ DROP TABLE IF EXISTS t1;
11701165
#----------------------------------
11711166
CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY, c YEAR(2) NOT NULL) ENGINE=rocksdb;
11721167
Warnings:
1173-
Warning 1818 YEAR(2) column type is deprecated. Creating YEAR(4) column instead.
1168+
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
11741169
SHOW COLUMNS IN t1;
11751170
Field Type Null Key Default Extra
11761171
pk int(11) NO PRI NULL auto_increment
1177-
c year(4) NO NULL
1172+
c year(2) NO NULL
11781173
INSERT INTO t1 (c) VALUES (NULL);
11791174
ERROR 23000: Column 'c' cannot be null
11801175
INSERT INTO t1 (c) VALUES ('12');
11811176
SELECT HEX(c) FROM t1;
11821177
HEX(c)
1183-
7DC
1178+
C
11841179
DROP TABLE t1;
11851180
#----------------------------------
11861181
# YEAR(2) NOT NULL columns with a default
@@ -1190,11 +1185,11 @@ pk INT AUTO_INCREMENT PRIMARY KEY,
11901185
c YEAR(2) NOT NULL DEFAULT '12'
11911186
) ENGINE=rocksdb;
11921187
Warnings:
1193-
Warning 1818 YEAR(2) column type is deprecated. Creating YEAR(4) column instead.
1188+
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
11941189
SHOW COLUMNS IN t1;
11951190
Field Type Null Key Default Extra
11961191
pk int(11) NO PRI NULL auto_increment
1197-
c year(4) NO 2012
1192+
c year(2) NO 12
11981193
ALTER TABLE t1 ADD COLUMN err YEAR(2) NOT NULL DEFAULT NULL;
11991194
ERROR 42000: Invalid default value for 'err'
12001195
INSERT INTO t1 (c) VALUES (NULL);
@@ -1203,8 +1198,8 @@ INSERT INTO t1 (c) VALUES ('12');
12031198
INSERT INTO t1 () VALUES ();
12041199
SELECT pk, HEX(c) FROM t1 ORDER BY pk;
12051200
pk HEX(c)
1206-
1 7DC
1207-
2 7DC
1201+
1 C
1202+
2 C
12081203
DROP TABLE t1;
12091204
########################
12101205
# ENUM columns
@@ -1422,11 +1417,11 @@ d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4
14221417
9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999
14231418
9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999
14241419
ALTER TABLE t1 ADD COLUMN n66 NUMERIC(66) NOT NULL;
1425-
ERROR 42000: Too big precision 66 specified for column 'n66'. Maximum is 65.
1420+
ERROR 42000: Too big precision 66 specified for 'n66'. Maximum is 65
14261421
ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(66,6) NOT NULL;
1427-
ERROR 42000: Too big precision 66 specified for column 'n66_6'. Maximum is 65.
1422+
ERROR 42000: Too big precision 66 specified for 'n66_6'. Maximum is 65
14281423
ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(66,66) NOT NULL;
1429-
ERROR 42000: Too big scale 66 specified for column 'n66_66'. Maximum is 30.
1424+
ERROR 42000: Too big scale 66 specified for 'n66_66'. Maximum is 38
14301425
DROP TABLE t1;
14311426
DROP TABLE IF EXISTS t1;
14321427
#----------------------------------
@@ -1741,7 +1736,7 @@ INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (
17411736
6
17421737
);
17431738
Warnings:
1744-
Warning 1292 Truncated incorrect DECIMAL value: ''
1739+
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
17451740
Warning 1264 Out of range value for column 'f' at row 1
17461741
Warning 1264 Out of range value for column 'f0' at row 1
17471742
Warning 1264 Out of range value for column 'r1_1' at row 1
@@ -1813,11 +1808,9 @@ r1_1 0.9
18131808
r1_1 0.9
18141809
r1_1 0.9
18151810
ALTER TABLE t1 ADD COLUMN d0_0 DOUBLE(0,0) NOT NULL;
1816-
ERROR 42000: Display width out of range for column 'd0_0' (max = 255)
18171811
ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(256,1) NOT NULL;
1818-
ERROR 42000: Too big precision 256 specified for column 'n66_6'. Maximum is 65.
1812+
ERROR 42000: Too big precision 256 specified for 'n66_6'. Maximum is 65
18191813
ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(40,35) NOT NULL;
1820-
ERROR 42000: Too big scale 35 specified for column 'n66_66'. Maximum is 30.
18211814
DROP TABLE t1;
18221815
DROP TABLE IF EXISTS t1;
18231816
#----------------------------------
@@ -2108,7 +2101,7 @@ i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20
21082101
2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807
21092102
2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807
21102103
ALTER TABLE t1 ADD COLUMN i257 INT(257) NOT NULL;
2111-
ERROR 42000: Display width out of range for column 'i257' (max = 255)
2104+
ERROR 42000: Display width out of range for 'i257' (max = 255)
21122105
DROP TABLE t1;
21132106
DROP TABLE IF EXISTS t1;
21142107
#----------------------------------
@@ -2448,7 +2441,7 @@ LENGTH(t) LENGTH(t0) LENGTH(t1) LENGTH(t300) LENGTH(tm) LENGTH(t70k) LENGTH(t17m
24482441
65535 65535 255 65535 65535 1048576 1048576 255 1048576 1048576
24492442
65535 65535 255 65535 65535 1048576 1048576 255 1048576 1048576
24502443
ALTER TABLE t1 ADD COLUMN ttt TEXT(4294967296) NOT NULL;
2451-
ERROR 42000: Display width out of range for column 'ttt' (max = 4294967295)
2444+
ERROR 42000: Display width out of range for 'ttt' (max = 4294967295)
24522445
DROP TABLE t1;
24532446
DROP TABLE IF EXISTS t1;
24542447
#----------------------------------
@@ -2473,12 +2466,10 @@ CREATE TABLE t1 (
24732466
pk INT AUTO_INCREMENT PRIMARY KEY,
24742467
c TEXT NOT NULL DEFAULT ''
24752468
) ENGINE=rocksdb;
2476-
Warnings:
2477-
Warning 1101 BLOB/TEXT column 'c' can't have a default value
24782469
SHOW COLUMNS IN t1;
24792470
Field Type Null Key Default Extra
24802471
pk int(11) NO PRI NULL auto_increment
2481-
c text NO NULL
2472+
c text NO ''
24822473
ALTER TABLE t1 ADD COLUMN err TEXT NOT NULL DEFAULT NULL;
24832474
ERROR 42000: Invalid default value for 'err'
24842475
INSERT INTO t1 (c) VALUES (NULL);
@@ -2513,12 +2504,10 @@ CREATE TABLE t1 (
25132504
pk INT AUTO_INCREMENT PRIMARY KEY,
25142505
c TINYTEXT NOT NULL DEFAULT ''
25152506
) ENGINE=rocksdb;
2516-
Warnings:
2517-
Warning 1101 BLOB/TEXT column 'c' can't have a default value
25182507
SHOW COLUMNS IN t1;
25192508
Field Type Null Key Default Extra
25202509
pk int(11) NO PRI NULL auto_increment
2521-
c tinytext NO NULL
2510+
c tinytext NO ''
25222511
ALTER TABLE t1 ADD COLUMN err TINYTEXT NOT NULL DEFAULT NULL;
25232512
ERROR 42000: Invalid default value for 'err'
25242513
INSERT INTO t1 (c) VALUES (NULL);
@@ -2553,12 +2542,10 @@ CREATE TABLE t1 (
25532542
pk INT AUTO_INCREMENT PRIMARY KEY,
25542543
c MEDIUMTEXT NOT NULL DEFAULT ''
25552544
) ENGINE=rocksdb;
2556-
Warnings:
2557-
Warning 1101 BLOB/TEXT column 'c' can't have a default value
25582545
SHOW COLUMNS IN t1;
25592546
Field Type Null Key Default Extra
25602547
pk int(11) NO PRI NULL auto_increment
2561-
c mediumtext NO NULL
2548+
c mediumtext NO ''
25622549
ALTER TABLE t1 ADD COLUMN err MEDIUMTEXT NOT NULL DEFAULT NULL;
25632550
ERROR 42000: Invalid default value for 'err'
25642551
INSERT INTO t1 (c) VALUES (NULL);
@@ -2593,12 +2580,10 @@ CREATE TABLE t1 (
25932580
pk INT AUTO_INCREMENT PRIMARY KEY,
25942581
c LONGTEXT NOT NULL DEFAULT ''
25952582
) ENGINE=rocksdb;
2596-
Warnings:
2597-
Warning 1101 BLOB/TEXT column 'c' can't have a default value
25982583
SHOW COLUMNS IN t1;
25992584
Field Type Null Key Default Extra
26002585
pk int(11) NO PRI NULL auto_increment
2601-
c longtext NO NULL
2586+
c longtext NO ''
26022587
ALTER TABLE t1 ADD COLUMN err LONGTEXT NOT NULL DEFAULT NULL;
26032588
ERROR 42000: Invalid default value for 'err'
26042589
INSERT INTO t1 (c) VALUES (NULL);

storage/rocksdb/mysql-test/rocksdb/t/col_not_null_timestamp.inc

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ SHOW COLUMNS IN t1;
2222
# instead of an error we are getting the current timestamp
2323

2424
# As of mysql-5.6.11, this no longer works, and we get an error:
25-
--error ER_BAD_NULL_ERROR
25+
# (MariaDB doesn't have this patch, so it doesnt produce an error):
26+
# --error ER_BAD_NULL_ERROR
2627
INSERT INTO t1 (c) VALUES (NULL);
2728
eval INSERT INTO t1 (c) VALUES ($col_default);
2829
SELECT HEX(c) FROM t1;
@@ -47,8 +48,16 @@ eval ALTER TABLE t1 ADD COLUMN err $col_type NOT NULL DEFAULT NULL;
4748
# instead of an error we are getting the current timestamp
4849

4950
# As of mysql-5.6.11, this no longer works, and we get an error:
50-
--error ER_BAD_NULL_ERROR
51+
# (MariaDB doesn't have this patch, so it doesnt produce an error):
52+
# --error ER_BAD_NULL_ERROR
53+
54+
# Since we don't produce an error, the row will get inserted. Make it
55+
# deterministic:
56+
set @save_ts=@@timestamp;
57+
set timestamp=1478923914;
58+
5159
INSERT INTO t1 (c) VALUES (NULL);
60+
set timestamp=@save_ts;
5261

5362
eval INSERT INTO t1 (c) VALUES ($col_default);
5463
eval INSERT INTO t1 () VALUES ();

0 commit comments

Comments
 (0)