Skip to content

Commit 32c7ee8

Browse files
committed
Make IMPORT FOREIGN SCHEMA behave consistently
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 #202.
1 parent 3af96b1 commit 32c7ee8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mysql_fdw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1699,7 +1699,7 @@ mysqlImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid)
16991699
{
17001700
bool first_item = true;
17011701

1702-
appendStringInfoString(&buf, " AND t.TABLE_NAME ");
1702+
appendStringInfoString(&buf, " AND t.TABLE_NAME COLLATE UTF8_GENERAL_CI ");
17031703
if (stmt->list_type == FDW_IMPORT_SCHEMA_EXCEPT)
17041704
appendStringInfoString(&buf, "NOT ");
17051705
appendStringInfoString(&buf, "IN (");

0 commit comments

Comments
 (0)