Skip to content

Commit e1b268e

Browse files
committed
[SQLite] Do not use non-default encodings when using PQS
1 parent e1c4a21 commit e1b268e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/sqlancer/sqlite3/SQLite3Provider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,8 @@ private void addSensiblePragmaDefaults(SQLite3GlobalState globalState) throws SQ
331331
// the PQS implementation currently assumes the default behavior of LIKE
332332
pragmasToExecute.add("PRAGMA case_sensitive_like=ON;");
333333
}
334-
if (Randomly.getBoolean()) {
334+
if (Randomly.getBoolean() && globalState.getDmbsSpecificOptions().oracles != SQLite3OracleFactory.PQS) {
335+
// the encoding has an influence how binary strings are cast
335336
pragmasToExecute.add(String.format("PRAGMA encoding = '%s';",
336337
Randomly.fromOptions("UTF-8", "UTF-16", "UTF-16le", "UTF-16be")));
337338
}

0 commit comments

Comments
 (0)