xerial/sqlite-jdbc

Missing support for WAL2 mode in 3.43.2.2

jubax opened this issue · 2 comments

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

@jubax - WAL2 is not a supported feature of the main SQLite distribution.

@jubax - WAL2 is not a supported feature of the main SQLite distribution.

Oh, sorry, it seems I have missed that. Thank you very much 👍