<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/database/sql/convert_test.go, branch makepkg</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=makepkg</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=makepkg'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2024-10-28T21:04:51Z</updated>
<entry>
<title>all: skip and fix various tests with -asan and -msan</title>
<updated>2024-10-28T21:04:51Z</updated>
<author>
<name>Michael Anthony Knyszek</name>
<email>mknyszek@google.com</email>
</author>
<published>2024-10-28T17:23:40Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=579eb79f62d92db872d730f5fe954ca2b7dce8ae'/>
<id>urn:sha1:579eb79f62d92db872d730f5fe954ca2b7dce8ae</id>
<content type='text'>
First, skip all the allocation count tests.

In some cases this aligns with existing skips for -race, but in others
we've got new issues. These are debug modes, so some performance loss is
expected, and this is clearly no worse than today where the tests fail.

Next, skip internal linking and static linking tests for msan and asan.

With asan we get an explicit failure that neither are supported by the C
and/or Go compilers. With msan, we only get the Go compiler telling us
internal linking is unavailable. With static linking, we segfault
instead. Filed #70080 to track that.

Next, skip some malloc tests with asan that don't quite work because of
the redzone.

This is because of some sizeclass assumptions that get broken with the
redzone and the fact that the tiny allocator is effectively disabled
(again, due to the redzone).

Next, skip some runtime/pprof tests with asan, because of extra
allocations.

Next, skip some malloc tests with asan that also fail because of extra
allocations.

Next, fix up memstats accounting for arenas when asan is enabled. There
is a bug where more is added to the stats than subtracted. This also
simplifies the accounting a little.

Next, skip race tests with msan or asan enabled; they're mutually
incompatible.

Fixes #70054.
Fixes #64256.
Fixes #64257.
For #70079.
For #70080.

Change-Id: I99c02a0b9d621e44f1f918b307aa4a4944c3ec60
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-asan-clang15,gotip-linux-amd64-msan-clang15
Reviewed-on: https://go-review.googlesource.com/c/go/+/622855
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
TryBot-Bypass: Michael Knyszek &lt;mknyszek@google.com&gt;
</content>
</entry>
<entry>
<title>database/sql: avoid clobbering driver-owned memory in RawBytes</title>
<updated>2024-04-10T20:23:22Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2024-01-23T23:59:47Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=c23579f031ecd09bf37c644723b33736dffa8b92'/>
<id>urn:sha1:c23579f031ecd09bf37c644723b33736dffa8b92</id>
<content type='text'>
Depending on the query, a RawBytes can contain memory owned by the
driver or by database/sql:

If the driver provides the column as a []byte,
RawBytes aliases that []byte.

If the driver provides the column as any other type,
RawBytes contains memory allocated by database/sql.
Prior to this CL, Rows.Scan will reuse existing capacity in a
RawBytes to permit a single allocation to be reused across rows.

When a RawBytes is reused across queries, this can result
in database/sql writing to driver-owned memory.

Add a buffer to Rows to store RawBytes data, and reuse this
buffer across calls to Rows.Scan.

Fixes #65201

Change-Id: Iac640174c7afa97eeb39496f47dec202501b2483
Reviewed-on: https://go-review.googlesource.com/c/go/+/557917
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
Reviewed-by: Roland Shoemaker &lt;roland@golang.org&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>all: gofmt -w -r 'interface{} -&gt; any' src</title>
<updated>2021-12-13T18:45:54Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2021-12-01T17:15:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=2580d0e08d5e9f979b943758d3c49877fb2324cb'/>
<id>urn:sha1:2580d0e08d5e9f979b943758d3c49877fb2324cb</id>
<content type='text'>
And then revert the bootstrap cmd directories and certain testdata.
And adjust tests as needed.

Not reverting the changes in std that are bootstrapped,
because some of those changes would appear in API docs,
and we want to use any consistently.
Instead, rewrite 'any' to 'interface{}' in cmd/dist for those directories
when preparing the bootstrap copy.

A few files changed as a result of running gofmt -w
not because of interface{} -&gt; any but because they
hadn't been updated for the new //go:build lines.

Fixes #49884.

Change-Id: Ie8045cba995f65bd79c694ec77a1b3d1fe01bb09
Reviewed-on: https://go-review.googlesource.com/c/go/+/368254
Trust: Russ Cox &lt;rsc@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>all: remove some unused code</title>
<updated>2021-09-14T00:49:39Z</updated>
<author>
<name>Alexander Melentyev</name>
<email>alexander@melentyev.org</email>
</author>
<published>2021-09-11T06:59:17Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=4a4221e8187189adcc6463d2d96fe2e8da290132'/>
<id>urn:sha1:4a4221e8187189adcc6463d2d96fe2e8da290132</id>
<content type='text'>
Change-Id: I519b8021fa79dccc5c0ee79134547491116fc4cc
GitHub-Last-Rev: 48869f5434c1255d33c3a14714747509235c94df
GitHub-Pull-Request: golang/go#48071
Reviewed-on: https://go-review.googlesource.com/c/go/+/346231
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Trust: Keith Randall &lt;khr@golang.org&gt;
</content>
</entry>
<entry>
<title>all: fix typos</title>
<updated>2019-09-08T17:28:20Z</updated>
<author>
<name>Ainar Garipov</name>
<email>gugl.zadolbal@gmail.com</email>
</author>
<published>2019-09-08T16:36:13Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=0efbd1015774a2d894138519f1efcf7704bb2d95'/>
<id>urn:sha1:0efbd1015774a2d894138519f1efcf7704bb2d95</id>
<content type='text'>
Use the following (suboptimal) script to obtain a list of possible
typos:

  #!/usr/bin/env sh

  set -x

  git ls-files |\
    grep -e '\.\(c\|cc\|go\)$' |\
    xargs -n 1\
    awk\
    '/\/\// { gsub(/.*\/\//, ""); print; } /\/\*/, /\*\// { gsub(/.*\/\*/, ""); gsub(/\*\/.*/, ""); }' |\
    hunspell -d en_US -l |\
    grep '^[[:upper:]]\{0,1\}[[:lower:]]\{1,\}$' |\
    grep -v -e '^.\{1,4\}$' -e '^.\{16,\}$' |\
    sort -f |\
    uniq -c |\
    awk '$1 == 1 { print $2; }'

Then, go through the results manually and fix the most obvious typos in
the non-vendored code.

Change-Id: I3cb5830a176850e1a0584b8a40b47bde7b260eae
Reviewed-on: https://go-review.googlesource.com/c/go/+/193848
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
</content>
</entry>
<entry>
<title>database/sql: add support for decimal interface</title>
<updated>2019-06-13T16:59:01Z</updated>
<author>
<name>Daniel Theophanes</name>
<email>kardianos@gmail.com</email>
</author>
<published>2019-04-26T19:49:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=683ffe09f66f0834baf039deeabe16eec6b09daa'/>
<id>urn:sha1:683ffe09f66f0834baf039deeabe16eec6b09daa</id>
<content type='text'>
Add support for scanning decimal types into values. If the dest
supports the decimal composer interface and the src supports
the decimal decomposer, set the value of the decimal when Scanning.

Add support for sending decimal decomposer interface values
as parameters.

For #30870

Change-Id: Ic5dbf9069df8d56405852b17542a9188d55c2947
Reviewed-on: https://go-review.googlesource.com/c/go/+/174181
Run-TryBot: Daniel Theophanes &lt;kardianos@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
<entry>
<title>all: simplify code using "gofmt -s -w"</title>
<updated>2019-05-06T22:19:22Z</updated>
<author>
<name>Shulhan</name>
<email>m.shulhan@gmail.com</email>
</author>
<published>2019-03-09T04:36:37Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=ed7f323c8f4f6bc61a75146bf34f5b8f73063a17'/>
<id>urn:sha1:ed7f323c8f4f6bc61a75146bf34f5b8f73063a17</id>
<content type='text'>
Most changes are removing redundant declaration of type when direct
instantiating value of map or slice, e.g. []T{T{}} become []T{{}}.

Small changes are removing the high order of subslice if its value
is the length of slice itself, e.g. T[:len(T)] become T[:].

The following file is excluded due to incompatibility with go1.4,

- src/cmd/compile/internal/gc/ssa.go

Change-Id: Id3abb09401795ce1e6da591a89749cba8502fb26
Reviewed-on: https://go-review.googlesource.com/c/go/+/166437
Run-TryBot: Dave Cheney &lt;dave@cheney.net&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
<entry>
<title>database/sql: fix TestConversions when count &gt; 1</title>
<updated>2018-01-25T03:39:24Z</updated>
<author>
<name>Daniel Theophanes</name>
<email>kardianos@gmail.com</email>
</author>
<published>2018-01-24T20:27:59Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=1b69d19a422830a5a2c043df36330f30b3df445e'/>
<id>urn:sha1:1b69d19a422830a5a2c043df36330f30b3df445e</id>
<content type='text'>
Provide a fresh conversion table for TestConversions as it gets
modified on each test.

Change-Id: I6e2240d0c3455451271a6879e994b82222c3d44c
Reviewed-on: https://go-review.googlesource.com/89595
Run-TryBot: Daniel Theophanes &lt;kardianos@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</content>
</entry>
<entry>
<title>all: change github.com issue links to golang.org</title>
<updated>2017-11-04T04:13:41Z</updated>
<author>
<name>Leigh McCulloch</name>
<email>leighmcc@gmail.com</email>
</author>
<published>2017-11-03T05:48:43Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=8db19a496640db4c7c318007c82eaa5d65c85b93'/>
<id>urn:sha1:8db19a496640db4c7c318007c82eaa5d65c85b93</id>
<content type='text'>
The go repository contains a mix of github.com/golang/go/issues/xxxxx
and golang.org/issues/xxxxx URLs for references to issues in the issue
tracker. We should use one for consistency, and golang.org is preferred
in case the project moves the issue tracker in the future.

This reasoning is taken from a comment Sam Whited left on a CL I
recently opened: https://go-review.googlesource.com/c/go/+/73890.

In that CL I referenced an issue using its github.com URL, because other
tests in the file I was changing contained references to issues using
their github.com URL. Sam Whited left a comment on the CL stating I
should change it to the golang.org URL.

If new code is intended to reference issues via golang.org and not
github.com, existing code should be updated so that precedence exists
for contributors who are looking at the existing code as a guide for the
code they should write.

Change-Id: I3b9053fe38a1c56fc101a8b7fd7b8f310ba29724
Reviewed-on: https://go-review.googlesource.com/75673
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
</entry>
<entry>
<title>database/sql: ensure all driver interfaces are called under single lock</title>
<updated>2017-10-25T17:21:58Z</updated>
<author>
<name>Daniel Theophanes</name>
<email>kardianos@gmail.com</email>
</author>
<published>2017-10-17T22:59:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=1126d1483f0397648905fcd4590ae45352cabd69'/>
<id>urn:sha1:1126d1483f0397648905fcd4590ae45352cabd69</id>
<content type='text'>
Russ pointed out in a previous CL golang.org/cl/65731 that not only
was the locking incomplete, previous changes did not correctly
lock driver calls in other sections. After inspecting
driverConn, driverStmt, driverResult, Tx, and Rows structs
where driver interfaces are stored, I discovered a few more places
that failed to lock driver calls. The largest of these
was the parameter type converter "driverArgs".

driverArgs was typically called right before another call to the
driver in a locked region, so I made the entire driverArgs expect
a locked driver mutex and combined the region. This should not
be a problem because the connection is pulled out of the connection
pool either way so there shouldn't be contention.

Fixes #21117

Change-Id: I88d46f74dca25fb11a30f0bf8e79785a73133d23
Reviewed-on: https://go-review.googlesource.com/71433
Run-TryBot: Daniel Theophanes &lt;kardianos@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</content>
</entry>
</feed>
