Files
turso/core/storage
Pekka Enberg 2141293017 Merge 'Fix page_count pragma' from meteorgan
Closes: #1415
### What this PR does
1. Removes database initialization from the `read_tx` function.
2. Adds checks for database initialization when executing `.schema`,
`.indexes`, `.tables` and `.import` commands, as they rely on
`sqlite_schema` table.
### About the second issue
I think we have another solution for the second issue: create the
`sqlite_schema` table in `Schema` only during page1 initialization,
rather than during `Schema` initialization.
#### Pros
This approach has the advantage of unifying the logic for the
`sqlite_schema` table with other user tables when running `select`
statements
#### Cons
- we still need to check error codes for commands like  `.schema`.
- this approach may increase the complexity of the `pager`
implementation.
I'd like to hear your thoughts and feedback.

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #2099
2025-07-24 19:21:35 +03:00
..
2025-07-24 11:29:01 +04:00
2025-07-24 11:49:39 +04:00