This is an automated email from the ASF dual-hosted git repository.
zhaojinchao95 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 4fb8af4d98f Refactor isNeedImplicitCommit in
DriverJDBCPushDownExecuteExecutor to reduce getDialectDatabaseMetaData call
(#38706)
4fb8af4d98f is described below
commit 4fb8af4d98fb447e9b5208d3763fd48c92c8af9a
Author: Zhengqiang Duan <[email protected]>
AuthorDate: Wed May 20 18:43:59 2026 +0800
Refactor isNeedImplicitCommit in DriverJDBCPushDownExecuteExecutor to
reduce getDialectDatabaseMetaData call (#38706)
---
.../engine/pushdown/jdbc/DriverJDBCPushDownExecuteExecutor.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git
a/jdbc/src/main/java/org/apache/shardingsphere/driver/executor/engine/pushdown/jdbc/DriverJDBCPushDownExecuteExecutor.java
b/jdbc/src/main/java/org/apache/shardingsphere/driver/executor/engine/pushdown/jdbc/DriverJDBCPushDownExecuteExecutor.java
index 1397284475a..4d1f0cf1c60 100644
---
a/jdbc/src/main/java/org/apache/shardingsphere/driver/executor/engine/pushdown/jdbc/DriverJDBCPushDownExecuteExecutor.java
+++
b/jdbc/src/main/java/org/apache/shardingsphere/driver/executor/engine/pushdown/jdbc/DriverJDBCPushDownExecuteExecutor.java
@@ -18,7 +18,6 @@
package org.apache.shardingsphere.driver.executor.engine.pushdown.jdbc;
import lombok.RequiredArgsConstructor;
-import
org.apache.shardingsphere.database.connector.core.metadata.database.metadata.option.transaction.DialectTransactionOption;
import
org.apache.shardingsphere.database.connector.core.type.DatabaseTypeRegistry;
import
org.apache.shardingsphere.driver.executor.callback.add.StatementAddCallback;
import
org.apache.shardingsphere.driver.executor.callback.execute.ExecuteCallbackFactory;
@@ -137,8 +136,8 @@ public final class DriverJDBCPushDownExecuteExecutor {
}
private boolean isNeedImplicitCommit(final SQLStatement sqlStatement) {
- DialectTransactionOption transactionOption = new
DatabaseTypeRegistry(sqlStatement.getDatabaseType()).getDialectDatabaseMetaData().getTransactionOption();
- return !connection.getAutoCommit() && sqlStatement instanceof
DDLStatement && transactionOption.isDDLNeedImplicitCommit();
+ return !connection.getAutoCommit() && sqlStatement instanceof
DDLStatement
+ && new
DatabaseTypeRegistry(sqlStatement.getDatabaseType()).getDialectDatabaseMetaData().getTransactionOption().isDDLNeedImplicitCommit();
}
/**