Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing support for WAL2 mode in 3.43.2.2 #1083

Closed
jubax opened this issue Mar 12, 2024 · 2 comments
Closed

Missing support for WAL2 mode in 3.43.2.2 #1083

jubax opened this issue Mar 12, 2024 · 2 comments
Labels
question Further information is requested

Comments

@jubax
Copy link

jubax commented Mar 12, 2024

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 jubax added the triage label Mar 12, 2024
@sjlombardo
Copy link
Contributor

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

@jubax
Copy link
Author

jubax commented Mar 12, 2024

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

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

@gotson gotson closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2024
@gotson gotson added question Further information is requested and removed triage labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants