From 121cb2bf197eae7dac7e381d825441a4b88411d8 Mon Sep 17 00:00:00 2001 From: hanchuanchuan Date: Fri, 19 Jul 2019 15:49:25 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E8=B0=83=E6=95=B4enable=5Ftimestamp=5F?= =?UTF-8?q?type=E5=8F=82=E6=95=B0=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- session/session_inception_test.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/session/session_inception_test.go b/session/session_inception_test.go index 1b846812..c17b8e56 100644 --- a/session/session_inception_test.go +++ b/session/session_inception_test.go @@ -2178,9 +2178,9 @@ func (s *testSessionIncSuite) TestZeroDate(c *C) { defer func() { config.GetGlobalConfig().Inc = saved }() - + sql := "" - + config.GetGlobalConfig().Inc.EnableZeroDate = false sql = `create table t4 (id int unsigned not null auto_increment primary key comment 'primary key', a datetime not null default 0 comment 'a') comment 'test';` s.testErrorCode(c, sql, @@ -2193,11 +2193,12 @@ func (s *testSessionIncSuite) TestTimestampType(c *C) { defer func() { config.GetGlobalConfig().Inc = saved }() - + sql := "" - + config.GetGlobalConfig().Inc.EnableTimeStampType = false - sql = `create table t4 (id int unsigned not null auto_increment primary key comment 'primary key', a timestamp not null default 0 comment 'a') comment 'test';` + // sql = `create table t4 (id int unsigned not null auto_increment primary key comment 'primary key', a timestamp not null default 0 comment 'a') comment 'test';` + sql = `create table t4 (id int unsigned not null auto_increment primary key comment 'primary key', a timestamp not null comment 'a') comment 'test';` s.testErrorCode(c, sql, session.NewErr(session.ER_INVALID_DATA_TYPE, "a")) config.GetGlobalConfig().Inc.EnableTimeStampType = true