diff --git a/expression/integration_test.go b/expression/integration_test.go index 5bd7dcf3f4812..bc300fbbf95f2 100644 --- a/expression/integration_test.go +++ b/expression/integration_test.go @@ -3564,14 +3564,12 @@ func (s *testIntegrationSuite) TestTimeLiteral(c *C) { c.Assert(terror.ErrorEqual(err, types.ErrIncorrectDatetimeValue.GenWithStackByArgs("20171231235959.999999")), IsTrue) _, err = tk.Exec("select ADDDATE('2008-01-34', -1);") - c.Assert(err, NotNil) - - c.Assert(terror.ErrorEqual(err, types.ErrIncorrectDatetimeValue.GenWithStackByArgs("2008-01-34")), IsTrue) + tk.MustQuery("Show warnings;").Check(testutil.RowsWithSep("|", + "Warning|1292|Incorrect datetime value: '2008-1-34'")) } func (s *testIntegrationSuite) TestTimestampLiteral(c *C) { defer s.cleanEnv(c) - tk := testkit.NewTestKit(c, s.store) r := tk.MustQuery("select timestamp '2017-01-01 00:00:00';")