Files
turso/core
Jussi Saurio 69d8a73028 Merge 'use virtual root page for sqlite_schema' from Mikaël Francoeur
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
2025-08-14 11:08:11 +03:00
..
2025-07-16 14:02:56 +04:00
2025-07-14 11:20:49 +04:00
2025-06-23 19:52:13 +01:00
2025-06-30 10:01:03 +03:00
2025-07-31 20:51:43 +05:30
2025-01-28 14:55:38 -05:00
2025-06-23 19:52:13 +01:00
2025-08-12 16:42:38 +05:30
2025-01-28 14:55:38 -05:00
2025-06-23 19:52:13 +01:00
2025-08-13 14:14:03 -05:00
2025-08-13 14:14:03 -05:00
2025-06-30 09:54:13 +03:00