Skip to content

Commit c61d9a9

Browse files
authored
Merge pull request #376 from gfphoenix78/fix-typos
Fix typos for dbmsSpecificOptions
2 parents 2986ade + 8c15ec8 commit c61d9a9

35 files changed

Lines changed: 88 additions & 88 deletions

src/sqlancer/GlobalState.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public abstract class GlobalState<O extends DBMSSpecificOptions<?>, S extends Ab
1010
protected C databaseConnection;
1111
private Randomly r;
1212
private MainOptions options;
13-
private O dmbsSpecificOptions;
13+
private O dbmsSpecificOptions;
1414
private S schema;
1515
private Main.StateLogger logger;
1616
private StateToReproduce state;
@@ -26,12 +26,12 @@ public C getConnection() {
2626
}
2727

2828
@SuppressWarnings("unchecked")
29-
public void setDmbsSpecificOptions(Object dmbsSpecificOptions) {
30-
this.dmbsSpecificOptions = (O) dmbsSpecificOptions;
29+
public void setDbmsSpecificOptions(Object dbmsSpecificOptions) {
30+
this.dbmsSpecificOptions = (O) dbmsSpecificOptions;
3131
}
3232

33-
public O getDmbsSpecificOptions() {
34-
return dmbsSpecificOptions;
33+
public O getDbmsSpecificOptions() {
34+
return dbmsSpecificOptions;
3535
}
3636

3737
public void setRandomly(Randomly r) {

src/sqlancer/Main.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public void run() throws Exception {
309309
state.setRandomly(r);
310310
state.setDatabaseName(databaseName);
311311
state.setMainOptions(options);
312-
state.setDmbsSpecificOptions(command);
312+
state.setDbmsSpecificOptions(command);
313313
try (C con = provider.createDatabase(state)) {
314314
QueryManager<C> manager = new QueryManager<>(state);
315315
try {
@@ -343,7 +343,7 @@ private G getInitializedGlobalState(long seed) {
343343
state.setRandomly(r);
344344
state.setDatabaseName(databaseName);
345345
state.setMainOptions(options);
346-
state.setDmbsSpecificOptions(command);
346+
state.setDbmsSpecificOptions(command);
347347
return state;
348348
}
349349

src/sqlancer/ProviderAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void generateAndTestDatabase(G globalState) throws Exception {
6363
protected abstract void checkViewsAreValid(G globalState);
6464

6565
protected TestOracle getTestOracle(G globalState) throws Exception {
66-
List<? extends OracleFactory<G>> testOracleFactory = globalState.getDmbsSpecificOptions()
66+
List<? extends OracleFactory<G>> testOracleFactory = globalState.getDbmsSpecificOptions()
6767
.getTestOracleFactory();
6868
boolean testOracleRequiresMoreThanZeroRows = testOracleFactory.stream()
6969
.anyMatch(p -> p.requiresAllTablesToContainRows());

src/sqlancer/arangodb/ArangoDBProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private static int mapActions(ArangoDBGlobalState globalState, Action a) {
4747
case INSERT:
4848
return r.getInteger(0, globalState.getOptions().getMaxNumberInserts());
4949
case CREATE_INDEX:
50-
return r.getInteger(0, globalState.getDmbsSpecificOptions().maxNumberIndexes);
50+
return r.getInteger(0, globalState.getDbmsSpecificOptions().maxNumberIndexes);
5151
default:
5252
throw new AssertionError(a);
5353
}

src/sqlancer/arangodb/gen/ArangoDBInsertGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ private ArangoDBQueryAdapter generate() {
2626
ArangoDBConstantGenerator constantGenerator = new ArangoDBConstantGenerator(globalState);
2727

2828
for (int i = 0; i < table.getColumns().size(); i++) {
29-
if (!globalState.getDmbsSpecificOptions().testRandomTypeInserts) {
29+
if (!globalState.getDbmsSpecificOptions().testRandomTypeInserts) {
3030
constantGenerator.addRandomConstantWithType(result, table.getColumns().get(i).getName(),
3131
table.getColumns().get(i).getType());
3232
} else {

src/sqlancer/arangodb/test/ArangoDBQueryPartitioningWhereTester.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void check() throws Exception {
3535
thirdResultSet.addAll(secondResultSet);
3636
assumeResultSetsAreEqual(firstResultSet, thirdResultSet, query);
3737

38-
if (state.getDmbsSpecificOptions().withOptimizerRuleTests) {
38+
if (state.getDbmsSpecificOptions().withOptimizerRuleTests) {
3939
select.setFilterClause(predicate);
4040
query = ArangoDBVisitor.asSelectQuery(select);
4141
query.excludeRandomOptRules();

src/sqlancer/citus/CitusProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ public void generateDatabase(PostgresGlobalState globalState) throws Exception {
300300

301301
@Override
302302
protected TestOracle getTestOracle(PostgresGlobalState globalState) throws SQLException {
303-
List<TestOracle> oracles = ((CitusOptions) globalState.getDmbsSpecificOptions()).citusOracle.stream().map(o -> {
303+
List<TestOracle> oracles = ((CitusOptions) globalState.getDbmsSpecificOptions()).citusOracle.stream().map(o -> {
304304
try {
305305
return o.create(globalState);
306306
} catch (Exception e1) {
@@ -415,7 +415,7 @@ public SQLConnection createDatabase(PostgresGlobalState globalState) throws SQLE
415415
// reconnect to coordinator node, test database
416416
con = new SQLConnection(DriverManager.getConnection("jdbc:" + testURL, username, password));
417417
((CitusGlobalState) globalState)
418-
.setRepartition(((CitusOptions) globalState.getDmbsSpecificOptions()).repartition);
418+
.setRepartition(((CitusOptions) globalState.getDbmsSpecificOptions()).repartition);
419419
globalState.getState().commentStatements();
420420
return con;
421421
}

src/sqlancer/clickhouse/ClickHouseProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public SQLConnection createDatabase(ClickHouseGlobalState globalState) throws SQ
112112
port = ClickHouseOptions.DEFAULT_PORT;
113113
}
114114

115-
ClickHouseOptions clickHouseOptions = globalState.getDmbsSpecificOptions();
115+
ClickHouseOptions clickHouseOptions = globalState.getDbmsSpecificOptions();
116116
globalState.setClickHouseOptions(clickHouseOptions);
117117
String url = String.format("jdbc:clickhouse://%s:%d/default", host, port);
118118
String databaseName = globalState.getDatabaseName();

src/sqlancer/clickhouse/gen/ClickHouseExpressionGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ protected ClickHouseLancerDataType getRandomType() {
9191
public List<ClickHouseExpression.ClickHouseJoin> getRandomJoinClauses(
9292
List<ClickHouseSchema.ClickHouseTable> tables) {
9393
List<ClickHouseExpression.ClickHouseJoin> joinStatements = new ArrayList<>();
94-
if (!globalState.getDmbsSpecificOptions().testJoins) {
94+
if (!globalState.getDbmsSpecificOptions().testJoins) {
9595
return joinStatements;
9696
}
9797
if (Randomly.getBoolean() && tables.size() > 1) {

src/sqlancer/cockroachdb/CockroachDBProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ public void generateDatabase(CockroachDBGlobalState globalState) throws Exceptio
135135
standardSettings.add("SET CLUSTER SETTING sql.stats.automatic_collection.enabled = 'off'");
136136
standardSettings.add("SET CLUSTER SETTING timeseries.storage.enabled = 'off'");
137137

138-
if (globalState.getDmbsSpecificOptions().testHashIndexes) {
138+
if (globalState.getDbmsSpecificOptions().testHashIndexes) {
139139
standardSettings.add("set experimental_enable_hash_sharded_indexes='on';");
140140
}
141-
if (globalState.getDmbsSpecificOptions().testTempTables) {
141+
if (globalState.getDbmsSpecificOptions().testTempTables) {
142142
standardSettings.add("SET experimental_enable_temp_tables = 'on'");
143143
}
144144
for (String s : standardSettings) {
@@ -241,7 +241,7 @@ public void generateDatabase(CockroachDBGlobalState globalState) throws Exceptio
241241
}
242242
total--;
243243
}
244-
if (globalState.getDmbsSpecificOptions().makeVectorizationMoreLikely && Randomly.getBoolean()) {
244+
if (globalState.getDbmsSpecificOptions().makeVectorizationMoreLikely && Randomly.getBoolean()) {
245245
manager.execute(new SQLQueryAdapter("SET vectorize=on;"));
246246
}
247247
}

0 commit comments

Comments
 (0)