libsql exposes a WAL checkpoint callback that is called once for each
frame and right when checkpointing is about to finish.
before this change, the result code returned by the checkpoint callback
was ignored on the 'finish' invocation, which resulted in the checkpoint
completing successfully despite the callback returning an error.
this commit propagates the callback's error code and thus prevents the
wal_checkpoint() routine from returning SQLITE_OK in cases where the
callback failed.
A common complain with libSQL is how to run extensions. The main
mechanism, with a .so, has a lot of issues around how those .so are
distributed.
The most common extensions are the ones in the sqlean package. We can
improve this experience by bundling them in our sqlite build.
Not all SQLean extensions are kosher: some of them, like fileio, use
the vfs. Others, are deemed too complex.
The extensions included here are a subset that we deem important enough,
and low risk enough, to just be a part of the main bundle.
This fixes a missing pager that `libsql_pager_codec` expects to not be
null. All this does is add the pager when we call `sqlite3PagerWalInsert`
to the wal frame we want to insert.
Fixes#1867
This adds a new xReadFrameRaw() function to the virtual WAL API, which
upper layers can use to fetch the full frame, including the page number,
that is useful for appending frames to a WAL.
This fixes a build issue with musl based systems that do not have
fcntl64 in their libc. This is done by setting `FILE_OFFSET_BITS=32`
only for musl targets. This forces the compiler to not convert `fcntl`
to `fcntl64`.