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

zykkk pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new e9e0c38f60a [fix](jdbc catalog) fix be crash when create jdbc catalog 
without driver jar #42948 (#42971)
e9e0c38f60a is described below

commit e9e0c38f60aa61140a8bbdbd9bc86c062b283bad
Author: Mingyu Chen (Rayner) <morning...@163.com>
AuthorDate: Thu Oct 31 14:32:49 2024 +0800

    [fix](jdbc catalog) fix be crash when create jdbc catalog without driver 
jar #42948 (#42971)
    
    cherry pick from #42948
    
    Co-authored-by: zy-kkk <zhongy...@gmail.com>
---
 be/src/vec/exec/vjdbc_connector.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/be/src/vec/exec/vjdbc_connector.cpp 
b/be/src/vec/exec/vjdbc_connector.cpp
index 20660a4cbe6..cc7cb487232 100644
--- a/be/src/vec/exec/vjdbc_connector.cpp
+++ b/be/src/vec/exec/vjdbc_connector.cpp
@@ -194,6 +194,9 @@ Status JdbcConnector::test_connection() {
 }
 
 Status JdbcConnector::clean_datasource() {
+    if (!_is_open) {
+        return Status::OK();
+    }
     JNIEnv* env = nullptr;
     RETURN_IF_ERROR(JniUtil::GetJNIEnv(&env));
     env->CallNonvirtualVoidMethod(_executor_obj, _executor_clazz, 
_executor_clean_datasource_id);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to