提交 c01e16d6 authored 作者: Owner's avatar Owner

Trying less restrictive lazy eval case

上级 c4ddebe6
...@@ -665,15 +665,21 @@ public class Select extends Query { ...@@ -665,15 +665,21 @@ public class Select extends Query {
} }
private boolean hasRecursiveTableView() { private boolean hasRecursiveTableView() {
// go through the table filters to see if we have a recursive table query // // go through the table filters to see if we have a recursive table query
for (TableFilter f : filters) { // for (TableFilter f : filters) {
if(f.getTable().isTableExpression()){ // if(f.getTable().isTableExpression()){
TableView v = (TableView)f.getTable(); // TableView v = (TableView)f.getTable();
// if(v.isRecursive()){
// return true;
// }
// }
// }
if(this.topTableFilter.getTable().isTableExpression()){
TableView v = (TableView)this.topTableFilter.getTable();
if(v.isRecursive()){ if(v.isRecursive()){
return true; return true;
} }
} }
}
return false; return false;
} }
......
...@@ -76,18 +76,19 @@ public class TestMvccMultiThreaded2 extends TestBase { ...@@ -76,18 +76,19 @@ public class TestMvccMultiThreaded2 extends TestBase {
// give any of the 100 threads a chance to start by yielding the processor to them // give any of the 100 threads a chance to start by yielding the processor to them
Thread.yield(); Thread.yield();
// make sure all threads have stopped by joining with them // gather stats on threads after they finished
@SuppressWarnings("unused") @SuppressWarnings("unused")
int minProcessed=Integer.MAX_VALUE, maxProcessed=0, totalProcessed=0; int minProcessed=Integer.MAX_VALUE, maxProcessed=0, totalProcessed=0;
for (SelectForUpdate sfu : threads) { for (SelectForUpdate sfu : threads) {
// make sure all threads have stopped by joining with them
sfu.join(); sfu.join();
totalProcessed+=sfu.interationsProcessed; totalProcessed+=sfu.iterationsProcessed;
if(sfu.interationsProcessed>maxProcessed){ if(sfu.iterationsProcessed>maxProcessed){
maxProcessed = sfu.interationsProcessed; maxProcessed = sfu.iterationsProcessed;
} }
if(sfu.interationsProcessed<minProcessed){ if(sfu.iterationsProcessed<minProcessed){
minProcessed = sfu.interationsProcessed; minProcessed = sfu.iterationsProcessed;
} }
} }
...@@ -104,7 +105,7 @@ public class TestMvccMultiThreaded2 extends TestBase { ...@@ -104,7 +105,7 @@ public class TestMvccMultiThreaded2 extends TestBase {
private class SelectForUpdate extends Thread { private class SelectForUpdate extends Thread {
public int interationsProcessed = 0; public int iterationsProcessed = 0;
@Override @Override
public void run() { public void run() {
...@@ -129,7 +130,7 @@ public class TestMvccMultiThreaded2 extends TestBase { ...@@ -129,7 +130,7 @@ public class TestMvccMultiThreaded2 extends TestBase {
assertTrue(rs.getInt(2) == 100); assertTrue(rs.getInt(2) == 100);
conn.commit(); conn.commit();
interationsProcessed++; iterationsProcessed++;
long now = System.currentTimeMillis(); long now = System.currentTimeMillis();
if (now - start > 1000 * TEST_TIME_SECONDS){ if (now - start > 1000 * TEST_TIME_SECONDS){
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论