Skip to content

Commit efef8d5

Browse files
committed
[SQLite] Work around a JDBC driver issue
1 parent 1ce76fe commit efef8d5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/sqlancer/sqlite3/schema/SQLite3Schema.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ public static SQLite3Constant getConstant(ResultSet randomRowValues, int columnI
136136
case BINARY:
137137
value = randomRowValues.getBytes(columnIndex);
138138
constant = SQLite3Constant.createBinaryConstant((byte[]) value);
139+
if (((byte[]) value).length == 0) {
140+
// TODO: the JDBC driver seems to sometimes return a zero-length array for NULL values
141+
throw new IgnoreMeException();
142+
}
139143
break;
140144
case NULL:
141145
return SQLite3Constant.createNullConstant();

0 commit comments

Comments
 (0)