While adding logs to our locks in `Wal` I noticed we weren't cleaning up
connection's transaction state. This PR set to `TransactionState::None`
once commited and calls `end_read_txn` and `end_tx` in case of write.
Fixes#1004
Reviewed-by: Pekka Enberg <penberg@iki.fi>
Closes#1099
The logging code that writes out transactions to disk needs to write out
the byte array that we actually use. The code is less hairly without the
generics so drop them.
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>
Closes#1100
The logging code that writes out transactions to disk needs to write out
the byte array that we actually use. The code is less hairly without the
generics so drop them.
I don't know when and why we dropped log::* in favor of tracing but when
it was done, it made relevant logs not appear any more while debugging
so... I added test_log::test which helps by automatically adding info
logs from trace package (useful for printing seeds too).
Closes#1097
I don't know when and why we dropped log::* in favor of tracing but when it was done, it made relevant logs not appear any more while debugging so... I added test_log::test which helps by automatically adding info logs from trace package.
This is an umbrella PR for multi threading where I modify the following:
* Loaded extensions (`syms`) are now moved to `Connection` as loading
extensions in SQLite is per connection and not per database.
* `Schema` is not a `RWLock` so that it behaves equally to SQLite where
schema changes block preparing new statements.
* Sprinkled a bunch of `unsafe impl Send` and `unsafe impl Sync` on top
of all `IO` implementations and inner structures for now in order to
allow multi threading. Ideally this will be enforced with transaction
locks and internal locks instead of throwing a bunch of mutexes like
rust would like us to do -- this means the work is not finished and
rather started for future improvements.
Reviewed-by: Preston Thorpe (@PThorpe92)
Closes#1091
This makes it work like in SQLite where only one schema writer is permitted and readers will return error while preparing statement if the schema is changing.
This PR adds tab completion to the CLI app. To achieve that I
implemented a simplified, but similar, Vtable that given a prefix and a
line, it outputs rows of candidates. Currently, it only supports auto
completion for SQLite keywords, but in the future we can autocomplete
database names and columns when `PRAGMA database_list` is implemented.
Also, some work will need to be done for detecting whether some syntax
would be legal in certain scenarios, but I think this is better
delegated to a future PR.
Closes#1050
Move page allocation to pager so that we don't need to instantiate a
cursor to create a B-Tree.
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>
Closes#1093