-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fix default collation of tables when creating in JDBC DBs, make them be consistent with others. #336
Conversation
… fix-case-sensitive-jdbc-tables
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.
Thank you for finding this issue! I left one question about the sqlserver part. I think the MySQL part is fine. Thanks.
@@ -78,7 +78,7 @@ | |||
ImmutableMap.<DataType, String>builder() | |||
.put(DataType.INT, "INT") | |||
.put(DataType.BIGINT, "BIGINT") | |||
.put(DataType.TEXT, "VARCHAR(8000)") | |||
.put(DataType.TEXT, "VARCHAR(8000) COLLATE Latin1_General_BIN") |
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.
Can we use utf8
encoding instead of latin1
?
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 couldn't found the collation in SQL Server that contains both utf8, and bin posfix for binary comparison sort.
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.
Here is the list of all collations with binary sort order in SQL Server I found. https://docs.google.com/spreadsheets/d/1j7-5lM6tRR8O-YJErc4b3iyfk3HogNj_qNlPqFrN7os/edit?usp=sharing
Summary after discussing with Microsoft Support Team:
|
@thongdk8 Thank you for summarizing the discussion with Microsoft Support Team! So it seems like it's better to make the SQLServer collation configurable so that users can select it. And I think we can do that in another PR. I think we can merge this PR for now. Thanks. |
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.
LGTM! Thank you!
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.
Thank you for the investigation! LGTM!
…be consistent with others. (#336)
…be consistent with others. (#336)
Currently in MySQL, SQLServer the default collation is not followed binary code point comparison sort which is inconsistent with other JDBC DBs and other storage as well. This PR was made for fixing it. PTAL! Thank you!