Skip to content
Draft
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
355 changes: 116 additions & 239 deletions core/lib.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/storage/encryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ use turso_macros::{match_ignore_ascii_case, AtomicEnum};
/// ```
///
/// constants used for the Turso page header in the encrypted dbs.
const TURSO_HEADER_PREFIX: &[u8] = b"Turso";
pub const TURSO_HEADER_PREFIX: &[u8] = b"Turso";
const TURSO_VERSION: u8 = 0x00;
const VERSION_OFFSET: usize = 5;
const CIPHER_OFFSET: usize = 6;
Expand Down
2 changes: 1 addition & 1 deletion core/storage/page_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ impl PageCache {
// However, if we do not evict that page from the page cache, we will return an unloaded page later which will trigger
// assertions later on. This is worsened by the fact that page cache is not per `Statement`, so you can abort a completion
// in one Statement, and trigger some error in the next one if we don't evict the page here.
if !page.is_loaded() && !page.is_locked() {
if (!page.is_loaded() || page.get().contents.is_none()) && !page.is_locked() {
self.delete(*key)?;
return Ok(None);
}
Expand Down
Loading
Loading