mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-3929 Add system variable explicit_defaults_for_timestamp for compatibility with MySQL
This commit is contained in:
@ -500,7 +500,7 @@ drop table t1;
|
||||
# Test of opening table twice and timestamps
|
||||
#
|
||||
set @a:=now();
|
||||
eval CREATE TABLE t1 (a int not null, b timestamp not null, primary key (a)) engine=$engine_type;
|
||||
eval CREATE TABLE t1 (a int not null, b timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, primary key (a)) engine=$engine_type;
|
||||
insert into t1 (a) values(1),(2),(3);
|
||||
select t1.a from t1 natural join t1 as t2 where t1.b >= @a order by t1.a;
|
||||
select a from t1 natural join t1 as t2 where b >= @a order by a;
|
||||
@ -727,9 +727,9 @@ eval CREATE TABLE t1 (
|
||||
cname char(15) NOT NULL default '',
|
||||
carrier_id smallint(6) NOT NULL default '0',
|
||||
privacy tinyint(4) NOT NULL default '0',
|
||||
last_mod_date timestamp NOT NULL,
|
||||
last_mod_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
last_mod_id smallint(6) NOT NULL default '0',
|
||||
last_app_date timestamp NOT NULL,
|
||||
last_app_date timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
last_app_id smallint(6) default '-1',
|
||||
version smallint(6) NOT NULL default '0',
|
||||
assigned_scps int(11) default '0',
|
||||
@ -746,9 +746,9 @@ eval CREATE TABLE t2 (
|
||||
cname char(15) NOT NULL default '',
|
||||
carrier_id smallint(6) NOT NULL default '0',
|
||||
privacy tinyint(4) NOT NULL default '0',
|
||||
last_mod_date timestamp NOT NULL,
|
||||
last_mod_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
last_mod_id smallint(6) NOT NULL default '0',
|
||||
last_app_date timestamp NOT NULL,
|
||||
last_app_date timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
last_app_id smallint(6) default '-1',
|
||||
version smallint(6) NOT NULL default '0',
|
||||
assigned_scps int(11) default '0',
|
||||
|
Reference in New Issue
Block a user