mysql_fdw
mysql_fdw copied to clipboard
Make IMPORT FOREIGN SCHEMA behave consistently with mixed-case table names
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.
This is very usefully PR. Some years ago there were the same problems in firebird_fdw and sqlite_fdw.
@jeevanchalke, what about this IMPORT FOREIGN SCHEMA ISO SQL behaviour? Tests are also added.