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

Mysql Connector Not Handling Table Names with Upper Case #340

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ private QualifiedName(
@Nullable final String viewName
) {
this.catalogName = standardizeRequired("catalogName", catalogName);
this.databaseName = standardizeOptional(databaseName, true);
this.tableName = standardizeOptional(tableName, true);
// Database and table names are case sensitive in MySQL. Hence its best to leave them
// without standardize them
this.databaseName = standardizeOptional(databaseName, false);
this.tableName = standardizeOptional(tableName, false);
this.partitionName = standardizeOptional(partitionName, false);
this.viewName = standardizeOptional(viewName, true);
this.viewName = standardizeOptional(viewName, false);

if (this.databaseName.isEmpty() && (!this.tableName.isEmpty() || !this.partitionName.isEmpty())) {
throw new IllegalStateException("databaseName is not present but tableName or partitionName are present");
Expand Down