• Marko Tiikkaja's avatar
    database/sql: Check errors in QueryRow.Scan · 1f20ab11
    Marko Tiikkaja authored
    The previous coding did not correctly check for errors from the driver's
    Next() or Close(), which could mask genuine errors from the database, as
    witnessed in issue #6651.
    
    Even after this change errors from Close() will be ignored if the query
    returned no rows (as Rows.Next will have closed the handle already), but it
    is a lot easier for the drivers to guard against that.
    
    Fixes #6651.
    
    R=golang-dev, bradfitz
    CC=golang-dev
    https://golang.org/cl/41590043
    1f20ab11
Name
Last commit
Last update
..
driver Loading commit data...
convert.go Loading commit data...
convert_test.go Loading commit data...
doc.txt Loading commit data...
example_test.go Loading commit data...
fakedb_test.go Loading commit data...
sql.go Loading commit data...
sql_test.go Loading commit data...