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

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


The following commit(s) were added to refs/heads/master by this push:
     new 9042ce6  fix storage-jdbc isExists not set dbname (#5786)
9042ce6 is described below

commit 9042ce6fe225a5c68fd00185e7dec9dff14b9eee
Author: Jared Tan <jian....@daocloud.io>
AuthorDate: Wed Nov 4 11:37:54 2020 +0800

    fix storage-jdbc isExists not set dbname (#5786)
    
    * fix null catalog
    
    * update CHANGES.md
---
 CHANGES.md                                                              | 1 +
 .../oap/server/storage/plugin/jdbc/mysql/MySQLTableInstaller.java       | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGES.md b/CHANGES.md
index b446b0c..15e23b6 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -26,6 +26,7 @@ Release Notes.
 * Improve the queryable tags generation. Remove the duplicated tags to reduce 
the storage payload.
 * Fix the excessive timeout period set by the kubernetes-client.
 * Fix deadlock problem when using elasticsearch-client-7.0.0.
+* Fix storage-jdbc isExists not set dbname.
 
 #### UI
 
diff --git 
a/oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/mysql/MySQLTableInstaller.java
 
b/oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/mysql/MySQLTableInstaller.java
index 62f615f..978098b 100644
--- 
a/oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/mysql/MySQLTableInstaller.java
+++ 
b/oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/mysql/MySQLTableInstaller.java
@@ -58,7 +58,7 @@ public class MySQLTableInstaller extends H2TableInstaller {
         TableMetaInfo.addModel(model);
         JDBCHikariCPClient h2Client = (JDBCHikariCPClient) client;
         try (Connection conn = h2Client.getConnection()) {
-            try (ResultSet rset = conn.getMetaData().getTables(null, null, 
model.getName(), null)) {
+            try (ResultSet rset = 
conn.getMetaData().getTables(conn.getCatalog(), null, model.getName(), null)) {
                 if (rset.next()) {
                     return true;
                 }

Reply via email to