Skip to content

[5.2] [MySQL] Decode zero DATETIME(n) text values as null - #1800

Merged
tsegismont merged 1 commit into
5.2from
backport/1771-to-5.2
Nov 13, 2026
Merged

tsegismont merged 1 commit into
5.2from
backport/1771-to-5.2

Conversation

@tsegismont

Copy link
Copy Markdown
Member

Backport of #1771 to 5.2
Cherry-picked commit: af6936f

* Decode zero DATETIME(n) text values as null

A simple query reading a zero DATETIME or TIMESTAMP with fractional
seconds failed to parse '0000-00-00 00:00:00.000000' and dropped the
row. The binary protocol already returns null for it.

Signed-off-by: Sharang Gupta <sharang@sharanggupta.dev>
Assisted-by: Anthropic Claude (claude-opus-5-5)

* Compare zero dates as strings

Declare the decoded text as a String in both zero-date checks, so no
conversion call is needed.

Signed-off-by: Sharang Gupta <sharang@sharanggupta.dev>
Assisted-by: Anthropic Claude (claude-fable-5-2)

---------

Signed-off-by: Sharang Gupta <sharang@sharanggupta.dev>
(cherry picked from commit af6936f)
Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
@tsegismont
tsegismont merged commit dd5dc64 into 5.2 Nov 13, 2026
18 checks passed
@tsegismont
tsegismont deleted the backport/1771-to-5.2 branch November 13, 2026 10:12
@tsegismont tsegismont added this to the 5.2.4 milestone Nov 13, 2026
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