From 92287660983dfbcacb192045e4e4b0ff0abc4a10 Mon Sep 17 00:00:00 2001 From: siddontang Date: Tue, 22 Sep 2015 10:33:17 +0800 Subject: [PATCH] tidb: add insert with empty paren --- tidb_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tidb_test.go b/tidb_test.go index 5b6439005d..724074b212 100644 --- a/tidb_test.go +++ b/tidb_test.go @@ -488,7 +488,10 @@ func (s *testSessionSuite) TestAutoincrementID(c *C) { se.Execute("drop table if exists t;") mustExecSQL(c, se, "create table t (id BIGINT PRIMARY KEY AUTO_INCREMENT NOT NULL)") mustExecSQL(c, se, "insert t values ()") - c.Assert(se.LastInsertID(), Less, uint64(4)) + lastID := se.LastInsertID() + c.Assert(lastID, Less, uint64(4)) + mustExecSQL(c, se, "insert t () values ()") + c.Assert(se.LastInsertID(), Greater, lastID) mustExecSQL(c, se, s.dropDBSQL) }