Skip to content

Commit 83e75a6

Browse files
NathanFlurryMasterPtato
authored andcommitted
chore: fix missing ops
1 parent 15ebbd9 commit 83e75a6

File tree

1 file changed

+26
-1
lines changed
  • packages/common/sqlite-vfs-fdb/src/vfs/file

1 file changed

+26
-1
lines changed

packages/common/sqlite-vfs-fdb/src/vfs/file/mod.rs

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,31 @@ pub unsafe extern "C" fn fdb_file_control(
758758
SQLITE_OK
759759
}
760760

761+
libsqlite3_sys::SQLITE_FCNTL_PDB => {
762+
// This is used for persistent database binding
763+
// For our implementation, we can just acknowledge without changing behavior
764+
tracing::debug!("PDB control op acknowledged");
765+
SQLITE_OK
766+
}
767+
768+
libsqlite3_sys::SQLITE_FCNTL_LOCK_TIMEOUT => {
769+
// Set lock timeout in milliseconds
770+
tracing::debug!("Lock timeout control op");
771+
772+
if !arg.is_null() {
773+
let timeout_ptr = arg as *mut c_int;
774+
let timeout_value = *timeout_ptr;
775+
776+
// Store the current timeout value (for our implementation we don't track this,
777+
// so we're just echoing back the given value)
778+
*timeout_ptr = timeout_value;
779+
780+
tracing::debug!("Lock timeout set to {} ms", timeout_value);
781+
}
782+
783+
SQLITE_OK
784+
}
785+
761786
// Unsupported or unknown ops
762787
_ => {
763788
// TODO: Make these a hard error
@@ -836,4 +861,4 @@ pub unsafe extern "C" fn fdb_file_close(file: *mut sqlite3_file) -> c_int {
836861
SQLITE_OK
837862
}
838863

839-
// SHM implementation is in the shm.rs module
864+
// SHM implementation is in the shm.rs module

0 commit comments

Comments
 (0)