From 651ddbdb5056ded455f47f9c494c67b389622a47 Mon Sep 17 00:00:00 2001 From: Daniel Theophanes Date: Thu, 25 Jan 2018 10:50:02 -0800 Subject: 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 TryBot-Result: Gobot Gobot Reviewed-by: Russ Cox --- doc/go1.10.html | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc/go1.10.html') 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.
database/sql/driver

+Drivers that currently hold on to the destination buffer provdied by +driver.Rows.Next 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 +driver.Rows. +

+

Drivers that want to construct a sql.DB for their clients can now implement the Connector interface and call the new sql.OpenDB function, -- cgit v1.2.1