mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-16 05:24:22 +01:00
add link to sqlite source about payload_overflows()
This commit is contained in:
@@ -1494,6 +1494,7 @@ impl BTreeCursor {
|
||||
log::debug!("fill_cell_payload(overflow)");
|
||||
|
||||
let payload_overflow_threshold_min = self.payload_overflow_threshold_min(page_type);
|
||||
// see e.g. https://github.com/sqlite/sqlite/blob/9591d3fe93936533c8c3b0dc4d025ac999539e11/src/dbstat.c#L371
|
||||
let mut space_left = payload_overflow_threshold_min
|
||||
+ (record_buf.len() - payload_overflow_threshold_min) % (self.usable_space() - 4);
|
||||
|
||||
|
||||
@@ -1274,6 +1274,7 @@ pub fn begin_write_wal_header(io: &Rc<dyn File>, header: &WalHeader) -> Result<(
|
||||
/// Checks if payload will overflow a cell based on the maximum allowed size.
|
||||
/// It will return the min size that will be stored in that case,
|
||||
/// including overflow pointer
|
||||
/// see e.g. https://github.com/sqlite/sqlite/blob/9591d3fe93936533c8c3b0dc4d025ac999539e11/src/dbstat.c#L371
|
||||
pub fn payload_overflows(
|
||||
payload_size: usize,
|
||||
payload_overflow_threshold_max: usize,
|
||||
|
||||
Reference in New Issue
Block a user