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

CLOB and BLOB data was not immediately removed after a rollback.

上级 84472cbd
......@@ -18,7 +18,8 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>There is a new Aggregate API that supports the internal H2 data types
<ul><li>CLOB and BLOB data was not immediately removed after a rollback.
</li><li>There is a new Aggregate API that supports the internal H2 data types
(GEOMETRY for example). Thanks a lot to Nicolas Fortin for the patch!
</li><li>Referential integrity constraints sometimes used the wrong index,
such that updating a row in the referenced table incorrectly failed with
......
......@@ -522,6 +522,16 @@ public class Session extends SessionWithState {
autoCommitAtTransactionEnd = false;
}
}
endTransaction();
}
private void checkCommitRollback() {
if (commitOrRollbackDisabled && locks.size() > 0) {
throw DbException.get(ErrorCode.COMMIT_ROLLBACK_NOT_ALLOWED);
}
}
private void endTransaction() {
if (unlinkLobMap != null && unlinkLobMap.size() > 0) {
// need to flush the transaction log, because we can't unlink lobs if the
// commit record is not written
......@@ -535,12 +545,6 @@ public class Session extends SessionWithState {
unlockAll();
}
private void checkCommitRollback() {
if (commitOrRollbackDisabled && locks.size() > 0) {
throw DbException.get(ErrorCode.COMMIT_ROLLBACK_NOT_ALLOWED);
}
}
/**
* Fully roll back the current transaction.
*/
......@@ -564,11 +568,11 @@ public class Session extends SessionWithState {
database.commit(this);
}
cleanTempTables(false);
unlockAll();
if (autoCommitAtTransactionEnd) {
autoCommit = true;
autoCommitAtTransactionEnd = false;
}
endTransaction();
}
/**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论