You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2021/05/26 10:18:50 UTC

[shardingsphere] branch master updated: Fix the bug 'Exceeded the maximum number of open cursors' (#10449) (#10471)

This is an automated email from the ASF dual-hosted git repository.

panjuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 71a503d  Fix the bug 'Exceeded the maximum number of open cursors' (#10449) (#10471)
71a503d is described below

commit 71a503d0fc58be7a8dee31ab7b6329ece15b2f25
Author: charles.chen <82...@qq.com>
AuthorDate: Wed May 26 18:18:16 2021 +0800

    Fix the bug 'Exceeded the maximum number of open cursors' (#10449) (#10471)
    
    * Fix the bug 'Exceeded the maximum number of open cursors'
    Issues :10449
    
    * Fix the bug Exceeded the maximum number of open cursors (#10449)
    
    Co-authored-by: charles.chen <ch...@meorient.com>
---
 .../infra/metadata/schema/builder/loader/ColumnMetaDataLoader.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/builder/loader/ColumnMetaDataLoader.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/builder/loader/ColumnMetaDataLoader.java
index f5f3a41..9d961c8 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/builder/loader/ColumnMetaDataLoader.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/schema/builder/loader/ColumnMetaDataLoader.java
@@ -25,6 +25,7 @@ import org.apache.shardingsphere.infra.metadata.schema.model.ColumnMetaData;
 import java.sql.Connection;
 import java.sql.ResultSet;
 import java.sql.SQLException;
+import java.sql.Statement;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashSet;
@@ -75,7 +76,7 @@ public final class ColumnMetaDataLoader {
                 }
             }
         }
-        try (ResultSet resultSet = connection.createStatement().executeQuery(generateEmptyResultSQL(tableNamePattern, databaseType))) {
+        try (Statement statement = connection.createStatement(); ResultSet resultSet = statement.executeQuery(generateEmptyResultSQL(tableNamePattern, databaseType))) {
             for (String each : columnNames) {
                 isCaseSensitives.add(resultSet.getMetaData().isCaseSensitive(resultSet.findColumn(each)));
             }