<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/database/sql/sql_test.go, branch main</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=main</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2026-03-27T17:31:58Z</updated>
<entry>
<title>database/sql: don't try to synctest.Wait in benchmarks</title>
<updated>2026-03-27T17:31:58Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2026-03-27T17:04:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=703bb60bf19f5410402fed4c736b31f2f8ec9fba'/>
<id>urn:sha1:703bb60bf19f5410402fed4c736b31f2f8ec9fba</id>
<content type='text'>
Benchmarks shouldn't use synctest. Avoid a synctest.Wait in database
shutdown when in benchmarks.

Fixes #78373

Change-Id: I14755f8eefb3ab5c69cc660b1e884bbf6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/760400
Auto-Submit: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>database/sql: use synctest in tests</title>
<updated>2026-03-25T20:32:34Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2026-02-13T17:40:19Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=bfe4cc85e8f0187f3cdb7c80b9ff5a52be66e08b'/>
<id>urn:sha1:bfe4cc85e8f0187f3cdb7c80b9ff5a52be66e08b</id>
<content type='text'>
Replace various polling loops waiting for conditions to occur with
synctest-based synchronization. Replace fake time with synctest's
bubbled time.

Reduces time for "go test database/sql -count=10" from
~12s to ~0.5s on my M4 machine.

Change-Id: I7ea8d740d443e27c50df4d2f22aec6136a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/758065
Reviewed-by: Jonathan Amsterdam &lt;jba@google.com&gt;
Auto-Submit: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Neal Patel &lt;nealpatel@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>database/sql: avoid deadlock from reentrant RLock</title>
<updated>2026-03-25T20:28:25Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2026-03-15T02:54:47Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=cdfc8c771301c8c1f32e50e773d620a6b8767078'/>
<id>urn:sha1:cdfc8c771301c8c1f32e50e773d620a6b8767078</id>
<content type='text'>
RWMutex.RLock blocks until any pending Lock operations are satisfied.
This prohibits recursive read-locking.  Replace various RWMutexes
used to synchronize between reads and closes with a variant where
the reader side takes priority. Reads can starve out Close, but will
not deadlock.

Fixes #78304

Change-Id: Id36529bf86bed5dbf22f2af94283aeac6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/758064
Auto-Submit: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Neal Patel &lt;nealpatel@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>database/sql: ensure Null* types have Valid=false when Scan returns error</title>
<updated>2026-02-06T20:10:59Z</updated>
<author>
<name>Ravi Sastry Kadali</name>
<email>ravisastryk@gmail.com</email>
</author>
<published>2026-01-26T02:29:30Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=9263a71b92e84aa34d0e35887d5c23f5a0a21537'/>
<id>urn:sha1:9263a71b92e84aa34d0e35887d5c23f5a0a21537</id>
<content type='text'>
The Scan methods for NullString, NullInt64, NullInt32, NullFloat64,
NullBool, and NullTime set Valid=true before calling convertAssign.
If convertAssign returns an error, Valid remains true, which creates
an inconsistent state where Valid=true but err!=nil.

Fix by setting Valid only after successful conversion.

Fixes #45662

Change-Id: I855a20abbe517ed017f7c9b8f5603b17bd9d487d
Reviewed-on: https://go-review.googlesource.com/c/go/+/739160
Auto-Submit: Sean Liao &lt;sean@liao.dev&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Reviewed-by: Sean Liao &lt;sean@liao.dev&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>Revert "database/sql: allow drivers to override Scan behavior"</title>
<updated>2025-12-11T19:57:52Z</updated>
<author>
<name>Austin Clements</name>
<email>austin@google.com</email>
</author>
<published>2025-12-11T18:55:33Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=ae62a1bd365fca4c41d8b29d62cca240ab45b212'/>
<id>urn:sha1:ae62a1bd365fca4c41d8b29d62cca240ab45b212</id>
<content type='text'>
This reverts CL 588435.

This new API is difficult to use correctly, and in many cases cannot
be used efficiently. We're going to work on this problem a bit more.

The release notes are removed by CL 729340, since they were moved to
the x/website repository since the original CL was made.

Reopens #67546.

Change-Id: I2a2bd25f2fce5f02e4d28cd33a9cc651bf35ab50
Reviewed-on: https://go-review.googlesource.com/c/go/+/729360
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Sean Liao &lt;sean@liao.dev&gt;
</content>
</entry>
<entry>
<title>database/sql: don't ignore ColumnConverter for unknown input count</title>
<updated>2025-11-21T21:25:48Z</updated>
<author>
<name>Jonathan Hall</name>
<email>flimzy@flimzy.com</email>
</author>
<published>2024-07-08T16:14:43Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=6f16669e346038c983ae33025ca02dccd78b6f20'/>
<id>urn:sha1:6f16669e346038c983ae33025ca02dccd78b6f20</id>
<content type='text'>
In the case a sql driver implements the ColumnConverter interface and also
returns -1 for NumInputs, indicating an unknown number of input arguments to
a query, the previous implementation would ignore the column converter would
not be called, leading to unexpected or invalid arguments passed to the driver.

Fixes #68342

Change-Id: Ib2ddaf040fa9be669d593eacdaa1e88ba66d7bc2
Reviewed-on: https://go-review.googlesource.com/c/go/+/597115
Reviewed-by: Sean Liao &lt;sean@liao.dev&gt;
Reviewed-by: Mark Freeman &lt;markfreeman@google.com&gt;
Reviewed-by: Junyang Shao &lt;shaojunyang@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>all: remove unnecessary loop variable copies in tests</title>
<updated>2025-10-17T20:10:27Z</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2025-10-14T09:40:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=b5aefe07e5afe2fd5d49c6a4219cc826b3e4e34e'/>
<id>urn:sha1:b5aefe07e5afe2fd5d49c6a4219cc826b3e4e34e</id>
<content type='text'>
Copying the loop variable is no longer necessary since Go 1.22.

Change-Id: Iebb21dac44a20ec200567f1d786f105a4ee4999d
Reviewed-on: https://go-review.googlesource.com/c/go/+/711640
Reviewed-by: Florian Lehner &lt;lehner.florian86@gmail.com&gt;
Auto-Submit: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Auto-Submit: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>database/sql: allow drivers to override Scan behavior</title>
<updated>2025-08-11T21:27:36Z</updated>
<author>
<name>Jack Christensen</name>
<email>jack@jackchristensen.com</email>
</author>
<published>2025-05-31T15:27:15Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=3dbef65bf37f1b7ccd1f884761341a5a15456ffa'/>
<id>urn:sha1:3dbef65bf37f1b7ccd1f884761341a5a15456ffa</id>
<content type='text'>
Implementing RowsColumnScanner allows the driver
to completely control how values are scanned.

Fixes #67546

Change-Id: Id8e7c3a973479c9665e4476fe2d29e1255aee687
GitHub-Last-Rev: ed0cacaec4a4feead56b09c0d6eee86ed58fe1ee
GitHub-Pull-Request: golang/go#67648
Reviewed-on: https://go-review.googlesource.com/c/go/+/588435
Reviewed-by: David Chase &lt;drchase@google.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Reviewed-by: Sean Liao &lt;sean@liao.dev&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>database/sql: avoid closing Rows while scan is in progress</title>
<updated>2025-08-06T18:36:35Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2025-07-23T21:26:54Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=a3895fe9f18682d5055cb68283eba21d7255a67f'/>
<id>urn:sha1:a3895fe9f18682d5055cb68283eba21d7255a67f</id>
<content type='text'>
A database/sql/driver.Rows can return database-owned data
from Rows.Next. The driver.Rows documentation doesn't explicitly
document the lifetime guarantees for this data, but a reasonable
expectation is that the caller of Next should only access it
until the next call to Rows.Close or Rows.Next.

Avoid violating that constraint when a query is cancelled while
a call to database/sql.Rows.Scan (note the difference between
the two different Rows types!) is in progress. We previously
took care to avoid closing a driver.Rows while the user has
access to driver-owned memory via a RawData, but we could still
close a driver.Rows while a Scan call was in the process of
reading previously-returned driver-owned data.

Update the fake DB used in database/sql tests to invalidate
returned data to help catch other places we might be
incorrectly retaining it.

Fixes #74831.

Change-Id: Ice45b5fad51b679c38e3e1d21ef39156b56d6037
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/2540
Reviewed-by: Roland Shoemaker &lt;bracewell@google.com&gt;
Reviewed-by: Neal Patel &lt;nealpatel@google.com&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/693735
Auto-Submit: Dmitri Shuralyov &lt;dmitshur@google.com&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;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
</content>
</entry>
<entry>
<title>database/sql: use t.Context in tests</title>
<updated>2025-02-10T20:34:55Z</updated>
<author>
<name>apocelipes</name>
<email>seve3r@outlook.com</email>
</author>
<published>2025-02-08T01:15:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=7715ca32fcaad84059752c944f40768374796651'/>
<id>urn:sha1:7715ca32fcaad84059752c944f40768374796651</id>
<content type='text'>
Replace "context.WithCancel(context.Background())" with "t.Context()".

Updates #36532

Change-Id: I78a8ba422f076f4c697910922cf6dc35c628b1a7
GitHub-Last-Rev: 2eacdbe9ea97ac8d928704c2b605b276626d95dd
GitHub-Pull-Request: golang/go#71599
Reviewed-on: https://go-review.googlesource.com/c/go/+/647555
Reviewed-by: Jorropo &lt;jorropo.pgm@gmail.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
</content>
</entry>
</feed>
