提交 04279048 authored 作者: Thomas Mueller's avatar Thomas Mueller

Undo changes.

上级 d85db4df
...@@ -488,7 +488,6 @@ public class Session extends SessionWithState { ...@@ -488,7 +488,6 @@ public class Session extends SessionWithState {
unlinkLobMap = null; unlinkLobMap = null;
} }
unlockAll(); unlockAll();
transactionStart = 0;
} }
private void checkCommitRollback() { private void checkCommitRollback() {
...@@ -517,7 +516,6 @@ public class Session extends SessionWithState { ...@@ -517,7 +516,6 @@ public class Session extends SessionWithState {
autoCommit = true; autoCommit = true;
autoCommitAtTransactionEnd = false; autoCommitAtTransactionEnd = false;
} }
transactionStart = 0;
} }
/** /**
...@@ -836,6 +834,9 @@ public class Session extends SessionWithState { ...@@ -836,6 +834,9 @@ public class Session extends SessionWithState {
* Wait for some time if this session is throttled (slowed down). * Wait for some time if this session is throttled (slowed down).
*/ */
public void throttle() { public void throttle() {
if (currentCommandStart == 0) {
currentCommandStart = System.currentTimeMillis();
}
if (throttle == 0) { if (throttle == 0) {
return; return;
} }
...@@ -859,15 +860,11 @@ public class Session extends SessionWithState { ...@@ -859,15 +860,11 @@ public class Session extends SessionWithState {
*/ */
public void setCurrentCommand(Command command) { public void setCurrentCommand(Command command) {
this.currentCommand = command; this.currentCommand = command;
if (command != null) { if (queryTimeout > 0 && command != null) {
long now = System.currentTimeMillis(); long now = System.currentTimeMillis();
currentCommandStart = now; currentCommandStart = now;
if (queryTimeout > 0) {
cancelAt = now + queryTimeout; cancelAt = now + queryTimeout;
} }
} else {
currentCommandStart = 0;
}
} }
/** /**
...@@ -1057,7 +1054,6 @@ public class Session extends SessionWithState { ...@@ -1057,7 +1054,6 @@ public class Session extends SessionWithState {
public void begin() { public void begin() {
autoCommitAtTransactionEnd = true; autoCommitAtTransactionEnd = true;
autoCommit = false; autoCommit = false;
transactionStart = System.currentTimeMillis();
} }
public long getSessionStart() { public long getSessionStart() {
...@@ -1065,6 +1061,9 @@ public class Session extends SessionWithState { ...@@ -1065,6 +1061,9 @@ public class Session extends SessionWithState {
} }
public long getTransactionStart() { public long getTransactionStart() {
if (transactionStart == 0) {
transactionStart = System.currentTimeMillis();
}
return transactionStart; return transactionStart;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论