forked from sqlancer/sqlancer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStoneDBErrors.java
More file actions
63 lines (56 loc) · 3 KB
/
Copy pathStoneDBErrors.java
File metadata and controls
63 lines (56 loc) · 3 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package sqlancer.stonedb;
import java.util.ArrayList;
import java.util.List;
import sqlancer.common.query.ExpectedErrors;
import sqlancer.stonedb.StoneDBProvider.StoneDBGlobalState;
public final class StoneDBErrors {
private StoneDBErrors() {
}
public static List<String> getExpectedExpressionErrors(StoneDBGlobalState globalState) {
ArrayList<String> errors = new ArrayList<>();
// java.sql.SQLException: Incorrect DATE value: '292269055-12-02'
errors.add("Incorrect DATE value: ");
// java.sql.SQLException: Incorrect string value: '\xBC\xE7\xC9\x91\x05R...' for
// column 'c1' at row 1
errors.add("Incorrect string value: ");
// java.sql.SQLException: Incorrect integer value: 'ST' for column 'c1' at row 1
errors.add("Incorrect integer value: ");
// com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Truncated
// incorrect INTEGER value: '#Q'
errors.add("Data truncation: Truncated incorrect INTEGER value: ");
// com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: BIGINT
// value is out of range in
// '-((`database0`.`t0`.`c1` >> (not(`database0`.`t0`.`c1`))))'
errors.add("Data truncation: BIGINT value is out of range in ");
// com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: BIGINT
// UNSIGNED value is out of range in
// '(`database10`.`t0`.`c0` + (`database10`.`t0`.`c0` & (not(0.5))))'
errors.add("Data truncation: BIGINT UNSIGNED value is out of range in ");
// com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Incorrect
// time value: '0Sly6xqF0' for
// column 'c1' at row 1
errors.add("Data truncation: Incorrect time value: ");
// com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: DOUBLE
// value is out of range in
// '(`database0`.`t0`.`c0` * `database0`.`t0`.`c0`)'
errors.add("Data truncation: DOUBLE value is out of range in ");
// java.sql.SQLException: Numeric result of an expression is too large and
// cannot be handled by tianmu.
errors.add("Numeric result of an expression is too large and cannot be handled by tianmu.");
// java.sql.SQLSyntaxErrorException: Unknown column '1020726100' in 'order
// clause'
errors.add("Unknown column ");
if (globalState.getDbmsSpecificOptions().test80Version) {
// Caused by: java.sql.SQLException: Incorrect DATETIME value: '292269055-12-02
// 16:47:04'
errors.add("Incorrect DATETIME value: ");
// Caused by: java.sql.SQLException: Incorrect TIMESTAMP value: '292269055-12-02
// 16:47:04'
errors.add("Incorrect TIMESTAMP value: ");
}
return errors;
}
public static void addExpectedExpressionErrors(StoneDBGlobalState globalState, ExpectedErrors errors) {
errors.addAll(getExpectedExpressionErrors(globalState));
}
}