Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions libsql-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ license.workspace = true
repository.workspace = true
description = "Native bindings to libSQL"
build = "build.rs"
exclude = ["bundled/SQLite3MultipleCiphers/build", "bundled/SQLite3MultipleCiphers/test"]
exclude = [
"bundled/SQLite3MultipleCiphers/build",
"bundled/SQLite3MultipleCiphers/test",
]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down Expand Up @@ -37,11 +40,12 @@ sqlean-extension-math = []
sqlean-extension-stats = []
sqlean-extension-text = []
sqlean-extensions = [
"sqlean-extension-uuid",
"sqlean-extension-crypto",
"sqlean-extension-fuzzy",
"sqlean-extension-math",
"sqlean-extension-stats",
"sqlean-extension-text"
"sqlean-extension-uuid",
"sqlean-extension-crypto",
"sqlean-extension-fuzzy",
"sqlean-extension-math",
"sqlean-extension-stats",
"sqlean-extension-text",
]
libsql-disable-checkpoint-downgrade = []
libsql-checkpoint-callback-on-any-frame-written = []
3 changes: 3 additions & 0 deletions libsql-ffi/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@ pub fn build_bundled(out_dir: &str, out_path: &Path) {
if cfg!(feature = "libsql-disable-checkpoint-downgrade") {
cfg.flag("-DLIBSQL_DISABLE_CHECKPOINT_DOWNGRADE=1");
}
if cfg!(feature = "libsql-checkpoint-callback-on-any-frame-written") {
cfg.flag("-DLIBSQL_CHECKPOINT_CALLBACK_ON_ANY_FRAME_WRITTEN=1");
}

if cfg!(feature = "bundled-sqlcipher") {
cfg.flag("-DSQLITE_HAS_CODEC").flag("-DSQLITE_TEMP_STORE=2");
Expand Down
8 changes: 8 additions & 0 deletions libsql-ffi/bundled/src/sqlite3.c
Original file line number Diff line number Diff line change
Expand Up @@ -67677,10 +67677,18 @@ static int walCheckpoint(

/* If work was actually accomplished... */
if( rc==SQLITE_OK ){
#ifdef LIBSQL_CHECKPOINT_CALLBACK_ON_ANY_FRAME_WRITTEN
if (xCb) {
rc = (xCb)(pCbData, mxSafeFrame, NULL, 0, 0, 0);
}
#endif

if( mxSafeFrame==walIndexHdr(pWal)->mxFrame ){
#ifndef LIBSQL_CHECKPOINT_CALLBACK_ON_ANY_FRAME_WRITTEN
if (xCb) {
rc = (xCb)(pCbData, mxSafeFrame, NULL, 0, 0, 0);
}
#endif
if( rc==SQLITE_OK ){
i64 szDb = pWal->hdr.nPage*(i64)szPage;
testcase( IS_BIG_INT(szDb) );
Expand Down
8 changes: 8 additions & 0 deletions libsql-sqlite3/src/wal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2130,10 +2130,18 @@ static int walCheckpoint(

/* If work was actually accomplished... */
if( rc==SQLITE_OK ){
#ifdef LIBSQL_CHECKPOINT_CALLBACK_ON_ANY_FRAME_WRITTEN
if (xCb) {
rc = (xCb)(pCbData, mxSafeFrame, NULL, 0, 0, 0);
}
#endif

if( mxSafeFrame==walIndexHdr(pWal)->mxFrame ){
#ifndef LIBSQL_CHECKPOINT_CALLBACK_ON_ANY_FRAME_WRITTEN
if (xCb) {
rc = (xCb)(pCbData, mxSafeFrame, NULL, 0, 0, 0);
}
#endif
if( rc==SQLITE_OK ){
i64 szDb = pWal->hdr.nPage*(i64)szPage;
testcase( IS_BIG_INT(szDb) );
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
profile = "default"
channel = "1.81.0"
channel = "1.82.0"
Loading