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

Issue 7962044: code review 7962044: database/sql: optimized []byte copy + []byte(nil) -> *i...

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

Description

database/sql: optimized []byte copy + []byte(nil) -> *interface fix Make the copy directly in the convert switch instead of an extra loop. Also stops converting nil-[]byte to zero-[]byte when assigning to *interface

Patch Set 1 #

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

Total comments: 2

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

Patch Set 4 : diff -r 07ed29a4f9f5 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -23 lines) Patch
M src/pkg/database/sql/convert.go View 1 2 3 3 chunks +18 lines, -4 lines 0 comments Download
M src/pkg/database/sql/convert_test.go View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M src/pkg/database/sql/sql.go View 1 1 chunk +0 lines, -18 lines 0 comments Download

Messages

Total messages: 8
julienschmidt
Hello golang-dev@googlegroups.com (cc: bradfitz@golang.org, golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
11 years ago (2013-03-23 02:56:27 UTC) #1
bradfitz
https://codereview.appspot.com/7962044/diff/14001/src/pkg/database/sql/convert.go File src/pkg/database/sql/convert.go (right): https://codereview.appspot.com/7962044/diff/14001/src/pkg/database/sql/convert.go#newcode115 src/pkg/database/sql/convert.go:115: if s != nil { shouldn't this still assign ...
11 years ago (2013-03-23 23:40:43 UTC) #2
julienschmidt
On Sunday, March 24, 2013 12:40:43 AM UTC+1, Brad Fitzpatrick wrote: > > https://codereview.appspot.com/7962044/diff/14001/src/pkg/database/sql/convert.go#newcode115 > ...
11 years ago (2013-03-24 03:10:13 UTC) #3
bradfitz
On Sat, Mar 23, 2013 at 8:10 PM, Julien Schmidt <google@julienschmidt.com>wrote: > > > On ...
11 years ago (2013-03-25 16:12:36 UTC) #4
julienschmidt
On 2013/03/25 16:12:36, bradfitz wrote: > The testcase is wrong. Copying a []byte(nil) to a ...
11 years ago (2013-03-25 17:57:45 UTC) #5
bradfitz
LGTM
11 years ago (2013-03-26 00:41:39 UTC) #6
bradfitz
*** Submitted as https://code.google.com/p/go/source/detail?r=450035404e2f *** database/sql: optimized []byte copy + []byte(nil) -> *interface fix Make ...
11 years ago (2013-03-26 00:43:34 UTC) #7
remyoudompheng
10 years, 8 months ago (2013-07-21 10:22:17 UTC) #8
R=close
Sign in to reply to this message.

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