Skip to content

Conversation

crazycs520
Copy link
Contributor

Signed-off-by: crazycs520 crazycs520@gmail.com

Description

Please explain the changes you made here.

	rows, err := db.Query( "SELECT cast(? as TIME)", time.Time{})

the related SQL is:

before this PR:

SELECT cast("0000-00-00" as TIME)

this PR:

SELECT cast("0000-00-00 00:00:00" as TIME)

Checklist

  • Code compiles correctly
  • Created tests which fail without the change (if possible)
  • All tests passing
  • Extended the README / documentation, if necessary
  • Added myself / the copyright holder to the AUTHORS file

Signed-off-by: crazycs520 <crazycs520@gmail.com>
@crazycs520
Copy link
Contributor Author

@methane PTAL

@methane
Copy link
Member

methane commented Jun 10, 2022

This is not a bug.
And zero datetime is bad practice. Try avoid using it instead of changing the driver.

@methane methane closed this Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants