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

MVStore: statement processing

上级 9e57e479
......@@ -16,9 +16,9 @@ import java.util.List;
import java.util.Random;
import org.h2.mvstore.MVStore;
import org.h2.mvstore.db.TransactionStore;
import org.h2.mvstore.db.TransactionStore.Transaction;
import org.h2.mvstore.db.TransactionStore.TransactionMap;
import org.h2.mvstore.db.TransactionStore2;
import org.h2.mvstore.db.TransactionStore2.Transaction;
import org.h2.mvstore.db.TransactionStore2.TransactionMap;
import org.h2.store.fs.FileUtils;
import org.h2.test.TestBase;
import org.h2.util.New;
......@@ -60,7 +60,7 @@ public class TestTransactionStore extends TestBase {
*/
private void testMultiStatement() {
MVStore s = MVStore.open(null);
TransactionStore ts = new TransactionStore(s);
TransactionStore2 ts = new TransactionStore2(s);
Transaction tx;
TransactionMap<String, String> m;
long startUpdate;
......@@ -146,14 +146,14 @@ public class TestTransactionStore extends TestBase {
FileUtils.delete(fileName);
MVStore s;
TransactionStore ts;
TransactionStore2 ts;
Transaction tx;
Transaction txOld;
TransactionMap<String, String> m;
List<Transaction> list;
s = MVStore.open(fileName);
ts = new TransactionStore(s);
ts = new TransactionStore2(s);
tx = ts.begin();
assertEquals(null, tx.getName());
tx.setName("first transaction");
......@@ -171,7 +171,7 @@ public class TestTransactionStore extends TestBase {
s.close();
s = MVStore.open(fileName);
ts = new TransactionStore(s);
ts = new TransactionStore2(s);
tx = ts.begin();
assertEquals(1, tx.getId());
m = tx.openMap("test");
......@@ -189,7 +189,7 @@ public class TestTransactionStore extends TestBase {
s.close();
s = MVStore.open(fileName);
ts = new TransactionStore(s);
ts = new TransactionStore2(s);
tx = ts.begin();
m = tx.openMap("test");
// TransactionStore was not closed, so we lost some ids
......@@ -214,7 +214,7 @@ public class TestTransactionStore extends TestBase {
private void testSavepoint() throws Exception {
MVStore s = MVStore.open(null);
TransactionStore ts = new TransactionStore(s);
TransactionStore2 ts = new TransactionStore2(s);
Transaction tx;
TransactionMap<String, String> m;
......@@ -267,7 +267,7 @@ public class TestTransactionStore extends TestBase {
"create table test(id int primary key, name varchar(255))");
MVStore s = MVStore.open(null);
TransactionStore ts = new TransactionStore(s);
TransactionStore2 ts = new TransactionStore2(s);
for (int i = 0; i < connectionCount; i++) {
Statement stat = statements.get(i);
// 100 ms to avoid blocking (the test is single threaded)
......@@ -400,7 +400,7 @@ public class TestTransactionStore extends TestBase {
private void testConcurrentTransactionsReadCommitted() {
MVStore s = MVStore.open(null);
TransactionStore ts = new TransactionStore(s);
TransactionStore2 ts = new TransactionStore2(s);
Transaction tx1, tx2;
TransactionMap<String, String> m1, m2;
......@@ -472,7 +472,7 @@ public class TestTransactionStore extends TestBase {
private void testSingleConnection() {
MVStore s = MVStore.open(null);
TransactionStore ts = new TransactionStore(s);
TransactionStore2 ts = new TransactionStore2(s);
Transaction tx;
TransactionMap<String, String> m;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论