Commit e85016f8 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

database/sql: remove an unused field from Rows

Found while debugging memory usage. Nobody accesses this field
anymore.

R=golang-dev, i.caught.air, adg, r
CC=golang-dev
https://golang.org/cl/9108043
parent 61dbc340
...@@ -735,7 +735,6 @@ func (db *DB) queryConn(dc *driverConn, releaseConn func(error), query string, a ...@@ -735,7 +735,6 @@ func (db *DB) queryConn(dc *driverConn, releaseConn func(error), query string, a
// Note: ownership of dc passes to the *Rows, to be freed // Note: ownership of dc passes to the *Rows, to be freed
// with releaseConn. // with releaseConn.
rows := &Rows{ rows := &Rows{
db: db,
dc: dc, dc: dc,
releaseConn: releaseConn, releaseConn: releaseConn,
rowsi: rowsi, rowsi: rowsi,
...@@ -765,7 +764,6 @@ func (db *DB) queryConn(dc *driverConn, releaseConn func(error), query string, a ...@@ -765,7 +764,6 @@ func (db *DB) queryConn(dc *driverConn, releaseConn func(error), query string, a
// Note: ownership of ci passes to the *Rows, to be freed // Note: ownership of ci passes to the *Rows, to be freed
// with releaseConn. // with releaseConn.
rows := &Rows{ rows := &Rows{
db: db,
dc: dc, dc: dc,
releaseConn: releaseConn, releaseConn: releaseConn,
rowsi: rowsi, rowsi: rowsi,
...@@ -1181,7 +1179,6 @@ func (s *Stmt) Query(args ...interface{}) (*Rows, error) { ...@@ -1181,7 +1179,6 @@ func (s *Stmt) Query(args ...interface{}) (*Rows, error) {
// Note: ownership of ci passes to the *Rows, to be freed // Note: ownership of ci passes to the *Rows, to be freed
// with releaseConn. // with releaseConn.
rows := &Rows{ rows := &Rows{
db: s.db,
dc: dc, dc: dc,
rowsi: rowsi, rowsi: rowsi,
// releaseConn set below // releaseConn set below
...@@ -1286,7 +1283,6 @@ func (s *Stmt) finalClose() error { ...@@ -1286,7 +1283,6 @@ func (s *Stmt) finalClose() error {
// err = rows.Err() // get any error encountered during iteration // err = rows.Err() // get any error encountered during iteration
// ... // ...
type Rows struct { type Rows struct {
db *DB
dc *driverConn // owned; must call releaseConn when closed to release dc *driverConn // owned; must call releaseConn when closed to release
releaseConn func(error) releaseConn func(error)
rowsi driver.Rows rowsi driver.Rows
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment