-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add docs for MySQL timestamptz handling #19231
Add docs for MySQL timestamptz handling #19231
Conversation
To preserve time instants, Trino's use of the MySQL JDBC driver sets the JVM | ||
time zone as the session zone and forces the server's time zone to match the | ||
JVM time zone. Because of this, users may experience an issue if the JVM time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a native English speaker, but the order of this sentence makes it hard to understand. How about this?
To preserve time instants, Trino's use of the MySQL JDBC driver sets the JVM | |
time zone as the session zone and forces the server's time zone to match the | |
JVM time zone. Because of this, users may experience an issue if the JVM time | |
To preserve time instants, Trino sets the session time zone | |
of the MySQL connection to match the JVM time zone. | |
Because of this, users may experience an issue if the JVM time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is much more clear, thank you.
f120e18
to
73d3a9f
Compare
@@ -276,6 +276,22 @@ this table: | |||
|
|||
No other types are supported. | |||
|
|||
### Timestamp type handling | |||
|
|||
MySQL `TIMESTAMP` types with are mapped to a Trino `TIMESTAMP WITH TIME ZONE`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MySQL `TIMESTAMP` types with are mapped to a Trino `TIMESTAMP WITH TIME ZONE`. | |
MySQL `TIMESTAMP` types are mapped to Trino `TIMESTAMP WITH TIME ZONE`. |
MySQL `TIMESTAMP` types with are mapped to a Trino `TIMESTAMP WITH TIME ZONE`. | ||
To preserve time instants, Trino sets the session time zone | ||
of the MySQL connection to match the JVM time zone. | ||
Because of this, users may experience an issue if the JVM time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of this, users may experience an issue if the JVM time | |
As a result, error messages similar to the following example occur when a timezone from the JVM does not exist on the MySQL server: |
To preserve time instants, Trino sets the session time zone | ||
of the MySQL connection to match the JVM time zone. | ||
Because of this, users may experience an issue if the JVM time | ||
zone does not exist on the MySQL server, receiving an error similar to: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line
com.mysql.cj.exceptions.CJException: Unknown or incorrect time zone: 'UTC' | ||
``` | ||
|
||
Users will need to use a time zone that is known to both the JVM and MySQL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replacement paragraph.
To avoid the errors, you must use a time zone that is known on both systems, or [install the missing time zone on the MySQL server](https://dev.mysql.com/doc/refman/8.0/en/time-zone-support.html#time-zone-installation).
73d3a9f
to
cece6f7
Compare
This adds a note in the MySQL connector documentation about an error users may experience when using timestamptz types due to mismatches between JVM time zone and what is installed on the MySQL server.
cece6f7
to
6c455da
Compare
Description
This adds a note in the MySQL connector documentation about an error users may experience when using timestamptz types due to mismatches between JVM/time zone and what is installed on the MySQL server.
Additional context and related issues
Relates to #18470
Release notes
(X) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: