Skip to content

Driver should not round time #1121

Closed
@methane

Description

@methane

Issue

See this comment:
https://github.com/go-sql-driver/mysql/pull/1118/files#r433293822

MySQL rounds the received datetime. (ref). So the time may be rounded twice.

Example:

  1. Assume time = 1.444_999_5, and the column type has 2 digit fraction (e.g. TIME(2), DATETIME(2), or TIMESTAMP(2))
  2. The driver rounds the time to 1.445_000
  3. MySQL rounds the time to 1.45

Proposal

I just want to drop the rounding behavior in the driver.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions