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

Issue 6845094: code review 6845094: database/sql: Alter *DB.begin to return driver.ErrB... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by chalfant
Modified:
11 years, 4 months ago
Reviewers:
CC:
golang-dev, bradfitz
Visibility:
Public.

Description

database/sql: Alter *DB.begin to return driver.ErrBadConn when driver.Conn.Begin returns driver.ErrBadConn Fixes issue 4433

Patch Set 1 #

Patch Set 2 : diff -r cda840e2befc https://code.google.com/p/go #

Patch Set 3 : diff -r 8b89b6326704 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M src/pkg/database/sql/sql.go View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4
chalfant
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
11 years, 4 months ago (2012-12-13 00:26:25 UTC) #1
bradfitz
LGTM I'd prefer a test, but this is "obviously correct" from local inspection and all ...
11 years, 4 months ago (2012-12-13 05:58:13 UTC) #2
bradfitz
*** Submitted as https://code.google.com/p/go/source/detail?r=22be5b0e2f1e *** database/sql: Alter *DB.begin to return driver.ErrBadConn when driver.Conn.Begin returns driver.ErrBadConn ...
11 years, 4 months ago (2012-12-13 06:05:03 UTC) #3
chalfant
11 years, 4 months ago (2012-12-14 08:18:59 UTC) #4
As requested, here's a change with a test that now passes which would have
failed.

https://codereview.appspot.com/6942050

Thanks,
-James

On Dec 12, 2012, at 9:58 PM, Brad Fitzpatrick <bradfitz@golang.org> wrote:

> LGTM
> 
> I'd prefer a test, but this is "obviously correct" from local inspection and
all the existing tests pass.
> 
> Bonus points if you come back with a test that would've failed before this and
now passes.
> 
> On Wed, Dec 12, 2012 at 4:26 PM, <james.chalfant@gmail.com> wrote:
> Reviewers: golang-dev_googlegroups.com,
> 
> Message:
> Hello golang-dev@googlegroups.com,
> 
> I'd like you to review this change to
> https://code.google.com/p/go
> 
> 
> Description:
>     database/sql: Alter *DB.begin to return driver.ErrBadConn when
> driver.Conn.Begin returns driver.ErrBadConn
> Fixes issue 4433
> 
> Please review this at https://codereview.appspot.com/6845094/
> 
> Affected files:
>   M src/pkg/database/sql/sql.go
> 
> 
> Index: src/pkg/database/sql/sql.go
> ===================================================================
> --- a/src/pkg/database/sql/sql.go
> +++ b/src/pkg/database/sql/sql.go
> @@ -426,7 +426,7 @@
>         txi, err := ci.Begin()
>         if err != nil {
>                 db.putConn(ci, err)
> -               return nil, fmt.Errorf("sql: failed to Begin transaction: %v",
err)
> +               return nil, err
>         }
>         return &Tx{
>                 db:  db,
> 
> 
> 

Sign in to reply to this message.

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