This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang 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 b8252d50ad3 remove TransactionHolder.java (#20209)
b8252d50ad3 is described below
commit b8252d50ad3e287b5ceea58ce99c1419946db773
Author: Chuxin Chen <[email protected]>
AuthorDate: Tue Aug 16 10:00:38 2022 +0800
remove TransactionHolder.java (#20209)
---
.../driver/jdbc/core/statement/ShardingSphereStatement.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatement.java
b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatement.java
index bfbf283526f..f97612f5607 100644
---
a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatement.java
+++
b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatement.java
@@ -79,7 +79,6 @@ import
org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
import
org.apache.shardingsphere.sql.parser.sql.common.statement.dal.DALStatement;
import org.apache.shardingsphere.traffic.engine.TrafficEngine;
import org.apache.shardingsphere.traffic.rule.TrafficRule;
-import org.apache.shardingsphere.transaction.TransactionHolder;
import java.sql.Connection;
import java.sql.ResultSet;
@@ -464,7 +463,7 @@ public final class ShardingSphereStatement extends
AbstractStatementAdapter {
}
private void checkSameDatabaseNameInTransaction(final
SQLStatementContext<?> sqlStatementContext, final String
connectionDatabaseName) {
- if (!TransactionHolder.isTransaction()) {
+ if
(!connection.getConnectionContext().getTransactionConnectionContext().isInTransaction())
{
return;
}
if (sqlStatementContext instanceof TableAvailable) {