mirror of
https://github.com/actiontech/dble.git
synced 2026-05-12 09:29:11 -05:00
fix:'begin',the sql that follows commits implicitly(inner 867)
This commit is contained in:
@@ -11,6 +11,7 @@ import com.actiontech.dble.server.variables.MysqlVariable;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
public abstract class BusinessService extends FrontEndService {
|
||||
protected volatile boolean txChainBegin;
|
||||
protected volatile boolean txStarted;
|
||||
protected final AtomicLong queriesCounter = new AtomicLong(0);
|
||||
protected final AtomicLong transactionsCounter = new AtomicLong(0);
|
||||
@@ -25,7 +26,11 @@ public abstract class BusinessService extends FrontEndService {
|
||||
}
|
||||
|
||||
public void setTxStart(boolean txStart) {
|
||||
this.txStarted = txStart;
|
||||
if (!txStart && txChainBegin) {
|
||||
txChainBegin = false;
|
||||
} else {
|
||||
this.txStarted = txStart;
|
||||
}
|
||||
}
|
||||
|
||||
public void queryCount() {
|
||||
|
||||
@@ -72,7 +72,6 @@ public class ShardingService extends BusinessService {
|
||||
private final MySQLShardingSQLHandler shardingSQLHandler;
|
||||
|
||||
protected String executeSql;
|
||||
private volatile boolean txChainBegin;
|
||||
private volatile boolean txInterrupted;
|
||||
private volatile String txInterruptMsg = "";
|
||||
|
||||
@@ -615,14 +614,6 @@ public class ShardingService extends BusinessService {
|
||||
TraceManager.sessionStart(this, "sharding-server-start");
|
||||
}
|
||||
|
||||
public boolean isTxChainBegin() {
|
||||
return txChainBegin;
|
||||
}
|
||||
|
||||
public void setTxChainBegin(boolean txChainBegin) {
|
||||
this.txChainBegin = txChainBegin;
|
||||
}
|
||||
|
||||
public boolean isTxInterrupted() {
|
||||
return txInterrupted;
|
||||
}
|
||||
|
||||
@@ -261,6 +261,11 @@ public class RWSplitService extends BusinessService {
|
||||
return expectedDest;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTxStart(boolean txStart) {
|
||||
this.txStarted = txStart;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void killAndClose(String reason) {
|
||||
session.close(reason);
|
||||
|
||||
Reference in New Issue
Block a user