Commit f852f8c
authored
Add support for Presto - common classes (#884)
To implement support for Presto some changes in common
classes are required.
## Changes in common classes:
1. class sqlancer.MainOptions - added global parameters :
* canonicalizeString (boolean) - presto doesn't support JDBC
queries with ";" at the end of statement
* compareResultsContent (boolean) - comparing content of
VARBINARY columns fails
2. class sqlancer.ComparatorHelper - compare result based on parameter
```
boolean compare = state.getOptions().compareResultsContent();
if (compare && !firstHashSet.equals(secondHashSet)) {
```
3. sqlancer.common.query.SQLancerResultSet - added method:
```
public String getType(int i) throws SQLException {
return rs.getMetaData().getColumnTypeName(i);
}
```
4. sqlancer.common.query.SQLQueryAdapter : added constructor
```
public SQLQueryAdapter(String query, ExpectedErrors expectedErrors,
boolean couldAffectSchema, boolean canonicalizeString) {
```1 parent 706ac16 commit f852f8c
File tree
5 files changed
+54
-7
lines changed- src/sqlancer
- common/query
- test/sqlancer
5 files changed
+54
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
109 | | - | |
| 110 | + | |
| 111 | + | |
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
144 | 150 | | |
145 | 151 | | |
146 | 152 | | |
| |||
322 | 328 | | |
323 | 329 | | |
324 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
325 | 339 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
36 | 45 | | |
37 | 46 | | |
38 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
13 | 31 | | |
14 | 32 | | |
15 | 33 | | |
16 | 34 | | |
17 | | - | |
| 35 | + | |
18 | 36 | | |
19 | 37 | | |
20 | 38 | | |
| |||
26 | 44 | | |
27 | 45 | | |
28 | 46 | | |
29 | | - | |
| 47 | + | |
30 | 48 | | |
31 | 49 | | |
32 | 50 | | |
| |||
38 | 56 | | |
39 | 57 | | |
40 | 58 | | |
41 | | - | |
| 59 | + | |
42 | 60 | | |
43 | 61 | | |
44 | 62 | | |
45 | 63 | | |
46 | 64 | | |
47 | 65 | | |
48 | 66 | | |
49 | | - | |
| 67 | + | |
50 | 68 | | |
51 | 69 | | |
52 | 70 | | |
| |||
0 commit comments