diff --git a/tidb_test.go b/tidb_test.go index 5cdae49caa..56fc4c8985 100644 --- a/tidb_test.go +++ b/tidb_test.go @@ -348,6 +348,14 @@ func (s *testSessionSuite) TestAffectedRows(c *C) { } +func (s *testSessionSuite) TestString(c *C) { + store := newStore(c, s.dbName) + se := newSession(c, store, s.dbName) + sessionExec(c, se, "select 1") + // here to check the panic bug in String() when txn is nil after committed. + c.Log(se.String()) +} + func (s *testSessionSuite) TestResultField(c *C) { store := newStore(c, s.dbName) se := newSession(c, store, s.dbName)