Skip to content

Decode zero DATETIME(n) text values as null - #1771

Open
sharanggupta wants to merge 1 commit into
eclipse-vertx:masterfrom
sharanggupta:mysql-zero-datetime-fraction
Open

sharanggupta wants to merge 1 commit into
eclipse-vertx:masterfrom
sharanggupta:mysql-zero-datetime-fraction

Conversation

@sharanggupta

Copy link
Copy Markdown

A simple query reading a zero DATETIME(n) or TIMESTAMP(n) value fails to parse 0000-00-00 00:00:00.000000, logs a DateTimeParseException and returns the result without that row. The text decoder now treats any zero datetime as null, like the binary protocol and the zero DATETIME without fractional seconds. The test runs against MySQL with an empty sql_mode so that the server returns the zero value.

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)
@vietj vietj added this to the 5.3.0 milestone Oct 29, 2026

This branch has not been deployed

No deployments
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