Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sqlite: Parse number part of PragmaSignature: NULL_OR_NUMBER as an in…
…t32_t The [SQLite documentation](https://www.sqlite.org/pragma.html#pragma_optimize) for `PRAGMA optimize` says: > To see all optimizations that would have been done without actually > doing them, run "PRAGMA optimize(-1)". We parsed the mask as a `uint` (which makes sense for a mask!), but that precludes us from parsing negative literals and caused `PRAGMA optimize(-1)` to fail. Parsing as an `int32_t` admits this statement. (I chose to use `int32_t` rather than `int` because SQLite uses a 32-bit integer for the mask.) Annoyingly, SQLite’s internal `sqlite3GetInt32` function doesn’t allow you to write a negative number with hex strings, so the best way to flip (almost) all the bits using hex is using the 0x7fffffff literal.
- Loading branch information