mirror of
https://github.com/MariaDB/server.git
synced 2026-05-17 20:37:12 +02:00
MDEV-28632 Change default of explicit_defaults_for_timestamp to ON
This commit is contained in:
parent
c38b8f49b8
commit
45e0373a78
125 changed files with 876 additions and 887 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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`)
|
||||
|
|
|
|||
|
|
@ -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`),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue