Skip to content

Commit f010e04

Browse files
committed
[SQLite] Do not test the dbstats extension by default and remove old print db method
1 parent e6ca503 commit f010e04

File tree

2 files changed

+1
-32
lines changed

2 files changed

+1
-32
lines changed

src/sqlancer/sqlite3/SQLite3Options.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class SQLite3Options {
3232

3333
@Parameter(names = {
3434
"--test-dbstats" }, description = "Test the DBSTAT Virtual Table (see https://www.sqlite.org/dbstat.html)", arity = 1)
35-
public boolean testDBStats = true;
35+
public boolean testDBStats = false;
3636

3737
@Parameter(names = { "--test-generated-columns" }, description = "Test generated columns", arity = 1)
3838
public boolean testGeneratedColumns = true;

src/sqlancer/sqlite3/SQLite3Provider.java

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import java.util.ArrayList;
1212
import java.util.Arrays;
1313
import java.util.List;
14-
import java.util.stream.Collectors;
1514

1615
import sqlancer.DatabaseProvider;
1716
import sqlancer.GlobalState;
@@ -463,36 +462,6 @@ public String toString() {
463462

464463
@Override
465464
public void printDatabaseSpecificState(FileWriter writer, StateToReproduce state) {
466-
StringBuilder sb = new StringBuilder();
467-
SQLite3StateToReproduce specificState = (SQLite3StateToReproduce) state;
468-
if (specificState.getRandomRowValues() != null) {
469-
List<SQLite3Column> columnList = specificState.getRandomRowValues().keySet().stream()
470-
.collect(Collectors.toList());
471-
List<SQLite3Table> tableList = columnList.stream().map(c -> c.getTable()).distinct().sorted()
472-
.collect(Collectors.toList());
473-
for (SQLite3Table t : tableList) {
474-
sb.append("-- " + t.getName() + "\n");
475-
List<SQLite3Column> columnsForTable = columnList.stream().filter(c -> c.getTable().equals(t))
476-
.collect(Collectors.toList());
477-
for (SQLite3Column c : columnsForTable) {
478-
sb.append("--\t");
479-
sb.append(c);
480-
sb.append("=");
481-
sb.append(specificState.getRandomRowValues().get(c));
482-
sb.append("\n");
483-
}
484-
}
485-
sb.append("-- expected values: \n");
486-
String asExpectedValues = "-- "
487-
+ SQLite3Visitor.asExpectedValues(specificState.getWhereClause()).replace("\n", "\n-- ");
488-
sb.append(asExpectedValues);
489-
}
490-
try {
491-
writer.write(sb.toString());
492-
writer.flush();
493-
} catch (IOException e) {
494-
throw new AssertionError();
495-
}
496465
}
497466

498467
@Override

0 commit comments

Comments
 (0)