fsk119 commented on PR #19741: URL: https://github.com/apache/flink/pull/19741#issuecomment-1141602620
Hi. Thanks for your update. I produce the problem in my local environment after I using the MySql 8.0.16. Let me summarize the problem here: in the MySql 5.7, JDBC uses the scheam as the synonym of the database but in the MySql 8.0 it uses the catalog as the synonym of the database[1]. In the MySql 8.0, it uses the following sql to fetch pks ``` SELECT TABLE_SCHEMA AS TABLE_CAT, NULL AS TABLE_SCHEM, TABLE_NAME, COLUMN_NAME, SEQ_IN_INDEX AS KEY_SEQ, 'PRIMARY' AS PK_NAME FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_NAME = 'user' AND INDEX_NAME='PRIMARY' ORDER BY TABLE_SCHEMA, TABLE_NAME, INDEX_NAME, SEQ_IN_INDEX ``` We can notice `TABLE_CAT` is `NULL` in the SQL. So I think the fix is on the correct way. WDYT, @RocMarshal ? [1] https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-connp-props-connection.html#cj-conn-prop_databaseTerm -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
