You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/11/17 09:40:03 UTC

[GitHub] [incubator-shardingsphere] tristaZero commented on a change in pull request #3539: the fix present table not exist when start application

tristaZero commented on a change in pull request #3539: the fix present table not exist when start application
URL: https://github.com/apache/incubator-shardingsphere/pull/3539#discussion_r347126610
 
 

 ##########
 File path: sharding-core/sharding-core-execute/src/main/java/org/apache/shardingsphere/core/execute/metadata/TableMetaDataLoader.java
 ##########
 @@ -205,9 +207,9 @@ private boolean isTableExist(final Connection connection, final String catalog,
         return Optional.of(new ColumnMetaData(columnName, columnType, isPrimaryKey, isNotNull, isAutoIncrement));
     }
     
-    private Collection<String> getLogicIndexes(final Connection connection, final String catalog, final String actualTableName) throws SQLException {
+    private Collection<String> getLogicIndexes(final Connection connection, final String catalog, final String actualTableName, final String dataSourceName) throws SQLException {
         Collection<String> result = new HashSet<>();
-        try (ResultSet resultSet = connection.getMetaData().getIndexInfo(catalog, catalog, actualTableName, false, false)) {
+        try (ResultSet resultSet = connection.getMetaData().getIndexInfo(catalog, dataSourceName, actualTableName, false, false)) {
 
 Review comment:
   Hi, why do you use datasource instead of catalog?
   dataSourceName, which is configured by user, may be different with catalog.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services