mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-12-23 08:21:09 +00:00
This PR fixes a problem where `sqlite_schema` could be read before page 1 was allocated. The fix is similar to that in SQLite. In SQLite, if `btreeCursor()` sees that the root page is 1 and that the b-tree is empty, it sets the page to 0 ([here](https://github.com/sqlite/sqlite/blob/master/src/btree.c#L4 691-L4696)). SQLite's `moveToRoot()` then uses this special value to return `CURSOR_INVALID` with no rows ([here](https://github.com/sqlite/s qlite/blob/master/src/btree.c#L5538-L5540)). Fixes https://github.com/tursodatabase/turso/issues/2449 Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com> Closes #2551 |
||
|---|---|---|
| .. | ||
| commands | ||
| config | ||
| docs | ||
| app.rs | ||
| build.rs | ||
| Cargo.toml | ||
| helper.rs | ||
| input.rs | ||
| main.rs | ||
| mcp_server.rs | ||
| opcodes_dictionary.rs | ||
| SQL.sublime-syntax | ||