1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-3929 Add system variable explicit_defaults_for_timestamp for compatibility with MySQL

This commit is contained in:
Alexander Barkov
2015-09-22 14:01:54 +04:00
parent 89af0f11a8
commit 5c9c8ef1ea
111 changed files with 844 additions and 219 deletions

View File

@ -457,7 +457,8 @@ drop table t1;
# Test of opening table twice and timestamps
#
set @a:=now();
CREATE TABLE t1 (a int not null, b timestamp not null, primary key (a)) engine=innodb;
CREATE TABLE t1 (a int not null, b timestamp not null default
current_timestamp on update current_timestamp, primary key (a)) engine=innodb;
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;