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

Make IMPORT FOREIGN SCHEMA behave consistently with mixed-case table names #206

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mhw
Copy link

@mhw mhw commented Sep 9, 2020

The case of the table names returned by information_schema queries depends on MySQL's lower_case_table_names setting: on systems where the value is non-zero the table name will be forced to lowercase. Importing tables with mixed-case names requires different SQL depending on the MySQL server's settings as explained in #202.

This PR fixes the issue by forcing a suitable collation so that the information_schema query is case insensitive when matching table names and preserves case in the results.

Fixes #202.

The case of the table names returned by information_schema queries
depends on MySQL's `lower_case_table_names` setting.
https://dev.mysql.com/doc/refman/5.7/en/charset-collation-information-schema.html
suggests forcing a suitable collation to work around the issue.

Fixes EnterpriseDB#202.
@mkgrgis
Copy link

mkgrgis commented Feb 10, 2023

This is very usefully PR. Some years ago there were the same problems in firebird_fdw and sqlite_fdw.

@mkgrgis
Copy link

mkgrgis commented Feb 15, 2023

@jeevanchalke, what about this IMPORT FOREIGN SCHEMA ISO SQL behaviour? Tests are also added.

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.

IMPORT FOREIGN SCHEMA behaves differently depending on mysql server's lower_case_table_names setting
2 participants