forked from sqlancer/sqlancer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCnosDBOtherQuery.java
More file actions
30 lines (26 loc) · 865 Bytes
/
CnosDBOtherQuery.java
File metadata and controls
30 lines (26 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package sqlancer.cnosdb.query;
import sqlancer.GlobalState;
import sqlancer.IgnoreMeException;
import sqlancer.cnosdb.client.CnosDBConnection;
import sqlancer.common.query.ExpectedErrors;
public class CnosDBOtherQuery extends CnosDBQueryAdapter {
public CnosDBOtherQuery(String query, ExpectedErrors errors) {
super(query, errors);
}
@Override
public boolean couldAffectSchema() {
return true;
}
@Override
public <G extends GlobalState<?, ?, CnosDBConnection>> boolean execute(G globalState, String... fills)
throws Exception {
try {
globalState.getConnection().getClient().execute(query);
} catch (Exception e) {
if (this.errors.errorIsExpected(e.getMessage())) {
throw new IgnoreMeException();
}
}
return true;
}
}