database/sql: add a disabled broken test

Update #6081

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/12810043
This commit is contained in:
Brad Fitzpatrick 2013-08-13 14:56:40 -07:00
parent c7d352c941
commit ca3ed9f352
2 changed files with 52 additions and 0 deletions

View file

@ -1372,6 +1372,8 @@ func (rs *Rows) Scan(dest ...interface{}) error {
return nil
}
var rowsCloseHook func(*Rows, *error)
// Close closes the Rows, preventing further enumeration. If the
// end is encountered, the Rows are closed automatically. Close
// is idempotent.
@ -1381,6 +1383,9 @@ func (rs *Rows) Close() error {
}
rs.closed = true
err := rs.rowsi.Close()
if fn := rowsCloseHook; fn != nil {
fn(rs, &err)
}
if rs.closeStmt != nil {
rs.closeStmt.Close()
}