MDEV-28632 Change default of explicit_defaults_for_timestamp to ON

This commit is contained in:
Sergei Golubchik 2022-06-12 22:01:56 +02:00 committed by Oleksandr Byelkin
commit 45e0373a78
125 changed files with 876 additions and 887 deletions

View file

@ -64,7 +64,7 @@ drop table t1;
create table t1 (c1 timestamp);
desc t1;
Field Type Null Key Default Extra
c1 timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
c1 timestamp YES NULL
drop table t1;
create table t1 (c1 datetime);
desc t1;

View file

@ -63,7 +63,7 @@ drop table t1;
create table t1 (c1 timestamp primary key) COMMENT = 'engine "innodb"';
desc t1;
Field Type Null Key Default Extra
c1 timestamp NO PRI CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
c1 timestamp NO PRI NULL
drop table t1;
create table t1 (c1 datetime primary key) COMMENT = 'engine "innodb"';
desc t1;

View file

@ -8,7 +8,7 @@ PRIMARY KEY (date, title)
SHOW CREATE TABLE diaries;
Table Create Table
diaries CREATE TABLE `diaries` (
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`date` timestamp NOT NULL,
`title` varchar(100) NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`date`,`title`)

View file

@ -10,7 +10,7 @@ SHOW CREATE TABLE diaries;
Table Create Table
diaries CREATE TABLE `diaries` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`date` timestamp NOT NULL,
`title` varchar(100) NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`id`),