danhuawang commented on issue #3047: URL: https://github.com/apache/gravitino/issues/3047#issuecomment-2268318559
> Why are you set `lower_case_table_names=1`? > > The process of renaming a table is to first alter and then load. Currently, **jdbc-mysql-catalog assumes that the underlying MySQL is case-sensitive in table name**, but your MySQL service is configured with `lower_case_table_names=1`. This results in using uppercase names during loading, causing an error indicating that the table does not exist, when in fact the table has been successfully modified to lowercase. > > In most cases, [MySQL document](https://dev.mysql.com/doc/refman/8.3/en/identifier-case-sensitivity.html) recommends using the default configuration(0 on Unix, 1 on Windows, 2 on macOS): > > > If you are using MySQL on only one platform, you do not normally have to use a [lower_case_table_names](https://dev.mysql.com/doc/refman/8.3/en/server-system-variables.html#sysvar_lower_case_table_names) setting other than the default. > > Although [MySQL document](https://dev.mysql.com/doc/refman/8.3/en/identifier-case-sensitivity.html) says: > > > [lower_case_table_names](https://dev.mysql.com/doc/refman/8.3/en/server-system-variables.html#sysvar_lower_case_table_names) can only be configured when initializing the server. Changing the [lower_case_table_names](https://dev.mysql.com/doc/refman/8.3/en/server-system-variables.html#sysvar_lower_case_table_names) setting after the server is initialized is prohibited. > > and we can make case-sensitivity a configurable option for the catalog to solve this problem, it will make the code more complex and is not necessary in most cases. Therefore, I suggest setting `lower_case_table_names` to `0` in your tests and do the code changes when encountered in a production environment. WDYT? @danhuawang @jerryshao Sure. I will apply changes on testing and create an issue to track [Improvement] Add --lower_case_table_names=0 parameter for mysql db instance in testing environment. #147 Reopen it if it is required in a production environment -- 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]
