<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/database/sql/sql_test.go, branch json-isValidNumber</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=json-isValidNumber</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=json-isValidNumber'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2022-07-11T17:14:33Z</updated>
<entry>
<title>database/sql: make TestTxContextWaitNoDiscard test more robust</title>
<updated>2022-07-11T17:14:33Z</updated>
<author>
<name>Dmitri Goutnik</name>
<email>dgoutnik@gmail.com</email>
</author>
<published>2022-07-09T12:36:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=398dcd1cf00a1536dad98cf87c16f8ad0c8913fc'/>
<id>urn:sha1:398dcd1cf00a1536dad98cf87c16f8ad0c8913fc</id>
<content type='text'>
Similar to CL 385934, rely on waiter trigger instead of the WAIT query
prefix and factor out the common test code.

Fixes #53222

Change-Id: I46efc85ca102b350bb4dbe8e514921e016870ffb
Reviewed-on: https://go-review.googlesource.com/c/go/+/416655
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Dmitri Goutnik &lt;dgoutnik@gmail.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
</content>
</entry>
<entry>
<title>database/sql: fix close rows error ignored in Next</title>
<updated>2022-05-19T20:21:12Z</updated>
<author>
<name>Jinzhu</name>
<email>wosmvp@gmail.com</email>
</author>
<published>2022-05-19T02:44:00Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=29057b707d468bd690e6eadfebe89c4ff737867c'/>
<id>urn:sha1:29057b707d468bd690e6eadfebe89c4ff737867c</id>
<content type='text'>
Change-Id: I19f0d764e2a6122307f3f26a6dd3be7b1155c73b
GitHub-Last-Rev: 9f1f883c452201679a2d2af2cc29de0f09a43f28
GitHub-Pull-Request: golang/go#52756
Reviewed-on: https://go-review.googlesource.com/c/go/+/404794
Reviewed-by: Daniel Theophanes &lt;kardianos@gmail.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
Run-TryBot: Daniel Theophanes &lt;kardianos@gmail.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>all: fix spelling</title>
<updated>2022-05-17T19:51:29Z</updated>
<author>
<name>John Bampton</name>
<email>jbampton@gmail.com</email>
</author>
<published>2022-05-17T17:09:28Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=a6f3f8d97306dc77144b6d3be8cf706c11e2de8f'/>
<id>urn:sha1:a6f3f8d97306dc77144b6d3be8cf706c11e2de8f</id>
<content type='text'>
Change-Id: I68538a50c22b02cdb5aa2a889f9440fed7b94c54
GitHub-Last-Rev: aaac9e78340ac482e9cd1b506a035f271c29648c
GitHub-Pull-Request: golang/go#52944
Reviewed-on: https://go-review.googlesource.com/c/go/+/406835
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Robert Griesemer &lt;gri@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
</content>
</entry>
<entry>
<title>database/sql: make WAIT tests more robust, rely on waiter trigger</title>
<updated>2022-02-16T18:05:27Z</updated>
<author>
<name>Daniel Theophanes</name>
<email>kardianos@gmail.com</email>
</author>
<published>2022-02-15T16:19:16Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=a289e9ce7514a34cd930469322395bf0e89b59ea'/>
<id>urn:sha1:a289e9ce7514a34cd930469322395bf0e89b59ea</id>
<content type='text'>
Replace the WAIT query prefix with a function callback.
This fixes timing issues when the testing on loaded servers.

Fixes #51208

Change-Id: I5151b397b7066c27ce6bc02c160dde0b584934bc
Reviewed-on: https://go-review.googlesource.com/c/go/+/385934
Run-TryBot: Daniel Theophanes &lt;kardianos@gmail.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Trust: Daniel Theophanes &lt;kardianos@gmail.com&gt;
</content>
</entry>
<entry>
<title>database/sql: consolidate test polling loops</title>
<updated>2022-01-13T20:43:56Z</updated>
<author>
<name>Bryan C. Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2022-01-13T18:57:47Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=6891d07ee6a34f1c8d0326f3f7dd941bddf524f1'/>
<id>urn:sha1:6891d07ee6a34f1c8d0326f3f7dd941bddf524f1</id>
<content type='text'>
Also eliminate some arbitrary deadlines and sleeps.

Fixes #49958

Change-Id: I999b39a896e430e3bb93aa8b8c9444f28bbaa9d0
Reviewed-on: https://go-review.googlesource.com/c/go/+/378395
Trust: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Daniel Theophanes &lt;kardianos@gmail.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>database/sql: prevent closes slices from assigning to free conn</title>
<updated>2021-11-11T19:46:03Z</updated>
<author>
<name>Pavel</name>
<email>kositsyn.pa@phystech.edu</email>
</author>
<published>2021-11-08T14:29:16Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=48f1cde942959e2fc3c56973a2986c24d554c82c'/>
<id>urn:sha1:48f1cde942959e2fc3c56973a2986c24d554c82c</id>
<content type='text'>
In function connectionCleanerRunLocked append to closing slice affects db.freeConns and vise versa. Sometimes valid connections are closed and some invalid not.

Change-Id: I5282f15be3e549533b7d994b17b2060db3c0e7da
GitHub-Last-Rev: b3eb3ab6f49c036519f777fc7189e9507010c166
GitHub-Pull-Request: golang/go#49429
Reviewed-on: https://go-review.googlesource.com/c/go/+/362214
Reviewed-by: Daniel Theophanes &lt;kardianos@gmail.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
<entry>
<title>database/sql: use errors.Is when checking ErrBadConn</title>
<updated>2021-11-03T22:51:09Z</updated>
<author>
<name>Daniel Theophanes</name>
<email>kardianos@gmail.com</email>
</author>
<published>2021-07-12T14:25:04Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=1f368d5b860b178bcbd55dfeb64474295263516b'/>
<id>urn:sha1:1f368d5b860b178bcbd55dfeb64474295263516b</id>
<content type='text'>
When drivers return driver.ErrBadConn, no meaningful
information about what the cause of the problem is
returned. Ideally the driver.ErrBadConn would be
always caught with the retry loop, but this is not
always the case. Drivers today must choose between
returning a useful error and use the rety logic.
This allows supporting both.

Fixes #47142

Change-Id: I454573028f041dfdf874eed6c254fb194ccf6d96
Reviewed-on: https://go-review.googlesource.com/c/go/+/333949
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
Trust: Ian Lance Taylor &lt;iant@golang.org&gt;
Trust: Daniel Theophanes &lt;kardianos@gmail.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
<entry>
<title>database/sql: Fix idle connection reuse</title>
<updated>2021-11-03T19:32:33Z</updated>
<author>
<name>Steven Hartland</name>
<email>steven.hartland@multiplay.co.uk</email>
</author>
<published>2020-06-09T07:58:08Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=74f99d0933d5c201fc17d90ab612cd1a9c7d425f'/>
<id>urn:sha1:74f99d0933d5c201fc17d90ab612cd1a9c7d425f</id>
<content type='text'>
Fix idle connection reuse so that ConnMaxIdleTime clears down excessive
idle connections.

This now ensures that db.freeConn is ordered by returnedAt and that
connections that have been idle for the shortest period are reused
first.

In addition connectionCleanerRunLocked updates the next check deadline
based on idle and maximum life time information so that we avoid waiting
up to double MaxIdleTime to close connections.

Corrected the calling timer of connectionCleaner.

Fixes #39471

Change-Id: I6d26b3542179ef35aa13e5265a89bc0f08ba7fa1
Reviewed-on: https://go-review.googlesource.com/c/go/+/237337
Reviewed-by: Tamás Gulácsi &lt;tgulacsi78@gmail.com&gt;
Reviewed-by: Daniel Theophanes &lt;kardianos@gmail.com&gt;
Trust: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
<entry>
<title>database/sql: fix deadlock test in prepare statement</title>
<updated>2021-06-21T17:37:23Z</updated>
<author>
<name>Daniel Theophanes</name>
<email>kardianos@gmail.com</email>
</author>
<published>2021-06-21T16:11:20Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=44f9a3566ce564f9a21b1b92940a520ea241e065'/>
<id>urn:sha1:44f9a3566ce564f9a21b1b92940a520ea241e065</id>
<content type='text'>
The issue go#46783 correctly diagnosed the context timeout
caused an intermittent failure when the context was canceled
prior to the BeginTx call. However due to the asynchronous nature
of canceling a Tx through a context on fast systems, the tx.Prepare
also succeeded. On slower systems or if a time.Sleep was inserted
between the BeginTx and Prepare, the Prepare would fail.

Resolve this by moving the context cancel after the Prepare.
This will still trigger the deadlock which I tested locally.
In addition, I interspersed multiple time.Sleep calls and the
test still functioned.

Fixes #46852

Change-Id: I9cbf90d3c12b2555493a37799738772b615ae39d
Reviewed-on: https://go-review.googlesource.com/c/go/+/329830
Run-TryBot: Daniel Theophanes &lt;kardianos@gmail.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Trust: Bryan C. Mills &lt;bcmills@google.com&gt;
</content>
</entry>
</feed>
