diff options
author | Daniel Theophanes <kardianos@gmail.com> | 2018-01-25 10:50:02 -0800 |
---|---|---|
committer | Daniel Theophanes <kardianos@gmail.com> | 2018-01-25 19:14:14 +0000 |
commit | 651ddbdb5056ded455f47f9c494c67b389622a47 (patch) | |
tree | 5dba249d72c82a175e85ea71b95824348566c70f /doc/go1.10.html | |
parent | 7350297eb61e71c901504d132b1d9077a11f57f6 (diff) | |
download | go-git-651ddbdb5056ded455f47f9c494c67b389622a47.tar.gz |
database/sql: buffers provided to Rows.Next should not be modified by drivers
Previously we allowed drivers to modify the row buffer used to scan
values when closing Rows. This is no longer acceptable and can lead
to data races.
Fixes #23519
Change-Id: I91820a6266ffe52f95f40bb47307d375727715af
Reviewed-on: https://go-review.googlesource.com/89936
Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'doc/go1.10.html')
-rw-r--r-- | doc/go1.10.html | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/go1.10.html b/doc/go1.10.html index fba4dcf190..9ea7325891 100644 --- a/doc/go1.10.html +++ b/doc/go1.10.html @@ -814,6 +814,13 @@ formats the X.509 distinguished name in the standard RFC 2253 format. <dl id="database/sql/driver"><dt><a href="/pkg/database/sql/driver/">database/sql/driver</a></dt> <dd> <p> +Drivers that currently hold on to the destination buffer provdied by +<a href="/pkg/database/sql/driver/#Rows.Next"><code>driver.Rows.Next</code></a> should ensure they no longer +write to a buffer assignedd to the destination array outside of that call. +Drivers must be careful that underlying buffers are not modified when closing +<a href="/pkg/database/sql/driver/#Rows"><code>driver.Rows</code></a>. +</p> +<p> Drivers that want to construct a <a href="/pkg/database/sql/#DB"><code>sql.DB</code></a> for their clients can now implement the <a href="/pkg/database/sql/driver/#Connector"><code>Connector</code></a> interface and call the new <a href="/pkg/database/sql/#OpenDB"><code>sql.OpenDB</code></a> function, |