提交 6e4dcce6 authored 作者: Noel Grandin's avatar Noel Grandin

Reset transaction start timestamp on ROLLBACK

上级 64d5d907
...@@ -21,6 +21,8 @@ Change Log ...@@ -21,6 +21,8 @@ Change Log
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul> <ul>
<li>Reset transaction start timestamp on ROLLBACK
</li>
<li>Issue #632: CREATE OR REPLACE VIEW creates incorrect columns names <li>Issue #632: CREATE OR REPLACE VIEW creates incorrect columns names
</li> </li>
<li>Issue #630: Integer overflow in CacheLRU can cause unrestricted cache growth <li>Issue #630: Integer overflow in CacheLRU can cause unrestricted cache growth
......
...@@ -735,6 +735,7 @@ public class Session extends SessionWithState { ...@@ -735,6 +735,7 @@ public class Session extends SessionWithState {
public void rollback() { public void rollback() {
checkCommitRollback(); checkCommitRollback();
currentTransactionName = null; currentTransactionName = null;
transactionStart = 0;
boolean needCommit = false; boolean needCommit = false;
if (undoLog.size() > 0) { if (undoLog.size() > 0) {
rollbackTo(null, false); rollbackTo(null, false);
...@@ -1101,6 +1102,8 @@ public class Session extends SessionWithState { ...@@ -1101,6 +1102,8 @@ public class Session extends SessionWithState {
*/ */
public void rollbackToSavepoint(String name) { public void rollbackToSavepoint(String name) {
checkCommitRollback(); checkCommitRollback();
currentTransactionName = null;
transactionStart = 0;
if (savepoints == null) { if (savepoints == null) {
throw DbException.get(ErrorCode.SAVEPOINT_IS_INVALID_1, name); throw DbException.get(ErrorCode.SAVEPOINT_IS_INVALID_1, name);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论