Closed
Description
Issue description
I tried to use Rows.Scan to read fields of an sql result row into variables of type interface{}
I expected integer sql types to be read as go type int64
, or at least, the go type to be the same whatever the query looks like.
However:
SELECT 123 WHERE ? = 1
returnsint64: 123
SELECT 123 WHERE 1 = 1
returns[]uint8: []byte{0x31, 0x32, 0x33}
Example code
See https://github.com/ComaVN/gosqltypespoc for a PoC, and golang/go#27828 (comment) for why it's probably a mysql driver issue.
Error log
n/a
Configuration
No idea how to determine the driver version, see the PoC: I just download the latest version from github, I think.
go version go1.11 linux/amd64
mysql:8.0.12, mariadb:10.1
Debian GNU/Linux 9 (stretch)