Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3276)

Issue 8016044: code review 8016044: database/sql: don't close a driver.Conn until its Stmts... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 1 month ago by bradfitz
Modified:
11 years, 1 month ago
Reviewers:
brainman
CC:
golang-dev, r
Visibility:
Public.

Description

database/sql: don't close a driver.Conn until its Stmts are closed Fixes issue 5046

Patch Set 1 #

Patch Set 2 : diff -r 2334cbe0190b https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 2334cbe0190b https://go.googlecode.com/hg/ #

Total comments: 4

Patch Set 4 : diff -r 892655b57e28 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+137 lines, -20 lines) Patch
M src/pkg/database/sql/fakedb_test.go View 1 1 chunk +20 lines, -1 line 0 comments Download
M src/pkg/database/sql/sql.go View 1 2 3 11 chunks +63 lines, -19 lines 0 comments Download
M src/pkg/database/sql/sql_test.go View 1 2 3 2 chunks +54 lines, -0 lines 0 comments Download

Messages

Total messages: 6
bradfitz
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 1 month ago (2013-03-25 19:07:44 UTC) #1
r
seems messy. https://codereview.appspot.com/8016044/diff/5001/src/pkg/database/sql/sql.go File src/pkg/database/sql/sql.go (right): https://codereview.appspot.com/8016044/diff/5001/src/pkg/database/sql/sql.go#newcode216 src/pkg/database/sql/sql.go:216: dc.Lock() why not defer dc.Unlock()? https://codereview.appspot.com/8016044/diff/5001/src/pkg/database/sql/sql.go#newcode227 src/pkg/database/sql/sql.go:227: ...
11 years, 1 month ago (2013-03-25 20:26:37 UTC) #2
bradfitz
It's messy because the dependency graph between all these types is messy. At least there ...
11 years, 1 month ago (2013-03-25 20:38:08 UTC) #3
r
LGTM but please explain in a comment why you don't use defer
11 years, 1 month ago (2013-03-25 21:03:45 UTC) #4
bradfitz
*** Submitted as https://code.google.com/p/go/source/detail?r=5922a8c0ab67 *** database/sql: don't close a driver.Conn until its Stmts are closed ...
11 years, 1 month ago (2013-03-25 23:50:29 UTC) #5
brainman
11 years, 1 month ago (2013-03-27 06:45:50 UTC) #6
Message was sent while issue was closed.
Thank you.

Alex
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b