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 10:07:34 UTC

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

zjcnb 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_r347127759
 
 

 ##########
 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:
   emmm, That's true. the schemaName is allow Null, I didn't think about it  may be different with catalog. And this problem is fix. I will close this pr

----------------------------------------------------------------
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