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

MULTI_THREADED did not work correctly.

上级 a2485214
...@@ -102,18 +102,14 @@ public class TestMultiThreadedKernel extends TestBase { ...@@ -102,18 +102,14 @@ public class TestMultiThreadedKernel extends TestBase {
+ "as select x, space(3000) from system_range(1, " + count + ")"); + "as select x, space(3000) from system_range(1, " + count + ")");
} }
final Random random = new Random(i); final Random random = new Random(i);
final int x = i;
Thread t = new Thread() { Thread t = new Thread() {
public void run() { public void run() {
try { try {
PreparedStatement prep = conn.prepareStatement( PreparedStatement prep = conn.prepareStatement(
"select * from test where id = ?"); "select * from test where id = ?");
Statement stat = conn.createStatement();
while (!stopped[0]) { while (!stopped[0]) {
prep.setInt(1, random.nextInt(count)); prep.setInt(1, random.nextInt(count));
prep.execute(); prep.execute();
stat.execute("create table test" + x + "(id int)");
stat.execute("drop table test" + x);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论