Skip to content

Parsing time enabled silently ignores invalid dates and stops any subsequent rows reads #683

@datio

Description

@datio

Issue description

The time parse errors (out of range / cannot parse) are silently ignored.
Any subsequent results with rows.Next() are not returned.

Example code

Collumn object definition:
`Birthday` date NOT NULL DEFAULT '0000-00-00'

Affecting collumn contents:
1965-00-00

go vars:
var rows *sql.Rows
var birthday *time.Time

DSN parameters:
parseTime=true&autocommit=false

Configuration

Driver version (or git SHA): Can't say for sure, the FETCH_HEAD contents include:

a8b7ed4454a6a4f98f85d3ad558cd6d97cec6959	branch 'master' of https://github.com/go-sql-driver/mysql

Go version: go1.9.1 linux/amd64

Server version: mysql Ver 15.1 Distrib 10.2.8-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Server OS: Linux 3937cad50f1a 4.4.0-96-generic #119-Ubuntu SMP Tue Sep 12 14:59:54 UTC 2017 x86_64 GNU/Linux

The server runs inside a docker container BTW.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions