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

MVTableEngine: support MVCC (work in progress)

上级 7cecf07c
......@@ -468,6 +468,17 @@ public class Session extends SessionWithState {
currentTransactionName = null;
transactionStart = 0;
if (transaction != null) {
// increment the data mod count, so that other sessions
// see the changes
// TODO should not rely on locking
if (locks.size() > 0) {
for (int i = 0, size = locks.size(); i < size; i++) {
Table t = locks.get(i);
if (t instanceof MVTable) {
((MVTable) t).commit();
}
}
}
transaction.commit();
transaction = null;
}
......
......@@ -700,4 +700,10 @@ public class MVTable extends TableBase {
return true;
}
public void commit() {
if (database != null) {
lastModificationId = database.getNextModificationDataId();
}
}
}
......@@ -63,7 +63,6 @@ public class TestMvcc3 extends TestBase {
// expected
}
ResultSet rs = s1.executeQuery("select * from test order by id");
assertTrue(rs.next());
assertEquals(1, rs.getInt(1));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论