| Age | Commit message (Collapse) | Author |
|
Preparation was in CL 134570043.
This CL contains only the effect of 'hg mv src/pkg/* src'.
For more about the move, see golang.org/s/go14nopkg.
|
|
A user reported heavy contention on fmt's printer cache. Avoid
fmt.Sprint. We have to do reflection anyway, and there was
already an asString function to use strconv, so use it.
This CL also eliminates a redundant allocation + copy when
scanning into *[]byte (avoiding the intermediate string)
and avoids an extra alloc when assigning to a caller's RawBytes
(trying to reuse the caller's memory).
Fixes #7086
R=golang-codereviews, nightlyone
CC=golang-codereviews
https://golang.org/cl/50240044
|
|
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
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7962044
|
|
E.g conversions from numeric types to RawBytes are missing, what makes RawBytes unusable in some cases.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7783046
|
|
The database/sql/driver docs make this promise:
"Conn is a connection to a database. It is not used
concurrently by multiple goroutines."
That promises exists as part of database/sql's overall
goal of making drivers relatively easy to write.
So far this promise has been kept without the use of locks by
being careful in the database/sql package, but sometimes too
careful. (cf. golang.org/issue/3857)
The CL associates a Mutex with each driver.Conn, and with the
interface value progeny thereof. (e.g. each driver.Tx,
driver.Stmt, driver.Rows, driver.Result, etc) Then whenever
those interface values are used, the Locker is locked.
This CL should be a no-op (aside from some new Lock/Unlock
pairs) and doesn't attempt to fix Issue 3857 or Issue 4459,
but should make it much easier in a subsequent CL.
Update #3857
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7803043
|
|
Return nice errors and don't panic.
Fixes #4859
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7383046
|
|
It was only being used for (*Stmt).Exec, not Query, and not for
the same two methods on *DB.
This unifies (*Stmt).Exec's old inline code into the old
subsetArgs function, renaming it in the process (changing the
old word "subset" to "driver", mostly converted earlier)
Fixes #3640
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6258045
|
|
-- add driver.Value type and documentation,
convert from interface{} to Value where
appropriate.
-- don't say "subset" anywhere,
-- SubsetValuer -> Valuer
-- SubsetValue -> Value
-- IsParameterSubsetType -> IsValue
-- IsScanSubsetType -> IsScanValue
Fixes #2842
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/5674084
|
|
Also fix a doc error.
Fixes #2843
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/5653050
|
|
- convert from nil pointers to the nil interface{}
- dereference non-nil pointers
- convert from nil interface{}s to nil pointers
- allocate pointers for non-nil interface{}s
- tests for all of the above
R=golang-dev, bradfitz, rsc, rogpeppe
CC=golang-dev
https://golang.org/cl/5630052
|
|
See thread http://goo.gl/7zzzU for background.
R=rsc
CC=golang-dev
https://golang.org/cl/5624051
|
|
Also allow string values to scan into []byte.
Fixes #2788.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5577054
|
|
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5536076
|