提交 756c6fa4 authored 作者: Thomas Mueller's avatar Thomas Mueller

When enabling autocommit, the transaction is now committed (as required by the JDBC API).

上级 a05844d0
......@@ -64,13 +64,20 @@ public class TestTransaction extends TestBase {
// should have no effect
conn.setAutoCommit(false);
assertThrows(ErrorCode.LOCK_TIMEOUT_1, stat2).
executeQuery("select count(*) from test");
ResultSet rs;
if (config.mvcc) {
rs = stat2.executeQuery("select count(*) from test");
rs.next();
assertEquals(0, rs.getInt(1));
} else {
assertThrows(ErrorCode.LOCK_TIMEOUT_1, stat2).
executeQuery("select count(*) from test");
}
// should commit
conn.setAutoCommit(true);
ResultSet rs = stat2.executeQuery("select * from test");
rs = stat2.executeQuery("select * from test");
assertTrue(rs.next());
stat.execute("drop table test");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论