Skip to content

Commit 07db8b1

Browse files
authored
fix: ahere to max number of queries in QPG (#767)
1 parent 354b953 commit 07db8b1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/sqlancer/ProviderAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public void generateAndTestDatabaseWithQueryPlanGuidance(G globalState) throws E
125125
while (executedQueryCount < globalState.getOptions().getNrQueries()) {
126126
int numOfNoNewQueryPlans = 0;
127127
TestOracle<G> oracle = getTestOracle(globalState);
128-
while (true) {
128+
while (executedQueryCount < globalState.getOptions().getNrQueries()) {
129129
try (OracleRunReproductionState localState = globalState.getState().createLocalState()) {
130130
assert localState != null;
131131
try {

src/sqlancer/common/query/SQLQueryAdapter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ public String getUnterminatedQueryString() {
9292
Main.nrUnsuccessfulActions.addAndGet(1);
9393
checkException(e);
9494
return false;
95+
} finally {
96+
s.close();
9597
}
9698
}
9799

0 commit comments

Comments
 (0)