From 0d53849aa5a4bd643e947bc4fb5e3f11ebda5ad2 Mon Sep 17 00:00:00 2001 From: siddontang Date: Tue, 8 Sep 2015 10:47:36 +0800 Subject: [PATCH] tidb: add String() test after committed. --- tidb_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) 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)