Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(source): use forceConnectionTimeZoneToSession for mysql-cdc #12710

Closed
xiangjinwu opened this issue Oct 9, 2023 · 0 comments · Fixed by #12729
Closed

feat(source): use forceConnectionTimeZoneToSession for mysql-cdc #12710

xiangjinwu opened this issue Oct 9, 2023 · 0 comments · Fixed by #12729
Assignees
Milestone

Comments

@xiangjinwu
Copy link
Contributor

xiangjinwu commented Oct 9, 2023

Is your feature request related to a problem? Please describe.

https://debezium.io/documentation/reference/2.4/connectors/mysql.html#mysql-temporal-types

Such columns are converted into an equivalent io.debezium.time.ZonedTimestamp in UTC based on the server (or session’s) current time zone. The time zone will be queried from the server by default.

However, the queried time zone may be an ambiguous one (allowed by MySQL). For example, "CST" can mean China Standard Time, Cuba Standard Time and Central Standard Time (ref). This leads to wrong instant values.

Describe the solution you'd like

Rather than relying on the user to use unambiguous time zone names in their upstream MySQL, we could set the session timezone when our connector node (debezium) connects to MySQL.

https://debezium.io/documentation/faq/#why_do_change_event_values_for_mysql_timestamp_columns_differ_between_snapshotting_and_streaming
https://dev.mysql.com/doc/connector-j/8.1/en/connector-j-connp-props-datetime-types-processing.html

Describe alternatives you've considered

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants