diff --git a/driver.go b/driver.go index 55f907579c..3afa1fc07e 100644 --- a/driver.go +++ b/driver.go @@ -366,6 +366,10 @@ func newdriverRows(rs rset.Recordset) *driverRows { } r.wg.Add(1) go func() { + // We may change the whole implementation later, so here just using WaitGroup + // to solve issue https://github.com/pingcap/tidb/issues/57 + // But if we forget close rows and do commit later, we may still meet this panic + // with very little probability. defer r.wg.Done() err := io.EOF if e := r.rs.Do(func(data []interface{}) (bool, error) {