tidb: add insert with empty paren

This commit is contained in:
siddontang
2015-09-22 10:33:17 +08:00
parent 1485ed490b
commit 9228766098

View File

@ -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)
}