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

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


The following commit(s) were added to refs/heads/master by this push:
     new 0191563f172 fix(jdbc): when catalog is "Apache IoTDB", ignore it 
(#12166)
0191563f172 is described below

commit 0191563f1724c988ee686a14e41d155199344132
Author: CritasWang <[email protected]>
AuthorDate: Wed Mar 13 15:03:18 2024 +0800

    fix(jdbc): when catalog is "Apache IoTDB", ignore it (#12166)
---
 .../src/main/java/org/apache/iotdb/jdbc/IoTDBDatabaseMetadata.java    | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDatabaseMetadata.java
 
b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDatabaseMetadata.java
index 21e9b9c8300..6bd5b23b7e3 100644
--- 
a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDatabaseMetadata.java
+++ 
b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDatabaseMetadata.java
@@ -2221,6 +2221,10 @@ public class IoTDBDatabaseMetadata implements 
DatabaseMetaData {
       throws SQLException {
     Statement stmt = this.connection.createStatement();
 
+    if (this.connection.getCatalog().equals(catalog)) {
+      catalog = null;
+    }
+
     String sql = "SHOW TIMESERIES";
     if (StringUtils.isNotEmpty(catalog)) {
       if (catalog.contains("%")) {

Reply via email to