Missing support for WAL2 mode in 3.43.2.2
jubax opened this issue · 2 comments
jubax commented
Describe the bug
It seems the WAL2 mode is missing. When I set the journal mode to "WAL2" then the journal mode is set to "delete". In contrast "WAL" works as expected.
To Reproduce
@Test
public void testWal2() throws Exception {
Path tmpFile = Files.createTempFile("wal2test", ".db");
try {
try (Connection connection = DriverManager.getConnection("jdbc:sqlite:" + tmpFile.toFile().getAbsolutePath())) {
try (PreparedStatement statement = connection.prepareStatement("pragma journal_mode=wal2")) {
statement.execute();
}
try (Statement statement = connection.createStatement()) {
try (ResultSet rs = statement.executeQuery("PRAGMA journal_mode;")) {
if (rs.next()) {
assertEquals("wal2", rs.getString(1));
}
}
}
}
} finally {
Files.delete(tmpFile);
}
}
Expected behavior
The WAL2 mode should be activated and the query in my test should return "wal2".
Logs
n/a
Environment (please complete the following information):
- OS: macOS 14.3.1 (Sonoma)
- CPU architecture: Apple M2 Max
- sqlite-jdbc version: 3.43.2.2
Additional context
n/a
sjlombardo commented
@jubax - WAL2 is not a supported feature of the main SQLite distribution.