Skip to content

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.

mhw added 2 commits October 26, 2021 10:56
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