SQLite 3.52 Released With WAL Corruption Fix and CLI Improvements

SQLite 3.52 fixes a WAL-reset database corruption bug and introduces CLI improvements, new SQL functions, and query planner optimizations.

The SQLite team has released version 3.52, addressing a critical database corruption issue related to WAL resets. The new version also expands the SQL engine by enhancing the ALTER TABLE command, which now allows adding or removing NOT NULL and CHECK constraints for greater schema flexibility.

Moreover, this release adds two built-in SQL functions, json_array_insert() and jsonb_array_insert(), which extend JSON functionality for inserting values into JSON or JSONB arrays.

The new Query Result Formatter library improves the display of query results on fixed-width terminals, as the CLI now uses QRF to render tables with Unicode box-drawing characters. Plus, numeric values are right-aligned by default for better clarity, and batch sessions retain the legacy output format to ensure script compatibility.

The CLI includes several enhancements. The .mode command has been significantly improved, and bare semicolons at the end of dot-commands are now ignored. The .timer command now supports a once argument to time only the next SQL statement.

The .progress command adds a --timeout option to interrupt queries after a set duration. Command-line arguments referencing .sql or .txt files are now automatically treated as scripts if they contain SQL statements or dot-commands.

The query planner has been improved for better performance, with SQLite now consistently using a sort-and-merge strategy for EXCEPT, INTERSECT, and UNION operations, which is generally faster than hash-based methods. Additional optimizations enhance join ordering in complex star-schema queries and improve EXISTS-to-JOIN transformations.

It’s also worth noting that floating-point-to-text conversions now round values to 17 significant digits by default, up from 15 in previous versions. Finally, SQLite 3.52 discontinues support for Windows RT.

For more details, see the release notes.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Leave a Reply

Your email address will not be published. Required fields are marked *