SammyXue opened a new issue #9800: URL: https://github.com/apache/shardingsphere/issues/9800
## Bug Report **For English only**, other languages will not accept. Before report a bug, make sure you have: - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues). - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview). Please pay attention on issues you submitted, because we maybe need more details. If no response anymore and we cannot reproduce it on current information, we will **close it**. Please answer these questions before submitting your issue. Thanks! ### Which version of ShardingSphere did you use? 4.0.1 ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? ShardingSphere-JDBC ### Expected behavior don't create indexes repeatedly ### Actual behavior i use hibernate and set `hibernate.hbm2ddl.auto = update` ,the program will create indexes repeatedly when the program restart. ### Reason analyze (If you can) org.apache.shardingsphere.shardingjdbc.jdbc.core.datasource.metadata.ResultSetReturnedDatabaseMetaData#getIndexInfo ```java @Override public final ResultSet getIndexInfo(final String catalog, final String schema, final String table, final boolean unique, final boolean approximate) throws SQLException { //i think the function "getActualTable" should have another param "catalog" to find the true actualTable . //String actualTable = getActualTable(table); String actualTable = getActualTable(catalog, table); try (Connection connection = getConnection()) { return new DatabaseMetaDataResultSet(connection.getMetaData().getIndexInfo(catalog, schema, actualTable, unique, approximate), shardingRule); } } ``` ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc. Get the github link and run the program pls. ### Example codes for reproduce this issue (such as a github link). https://github.com/SammyXue/sharding-hibernate-demo -- 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. For queries about this service, please contact Infrastructure at: [email protected]
