mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-12-23 08:21:09 +00:00
exit early on integrity check if db_size == 0
This commit is contained in:
parent
e785124e8f
commit
c268bb962e
1 changed files with 4 additions and 5 deletions
|
|
@ -5898,6 +5898,9 @@ pub fn integrity_check(
|
|||
errors: &mut Vec<IntegrityCheckError>,
|
||||
pager: &Arc<Pager>,
|
||||
) -> Result<IOResult<()>> {
|
||||
if state.db_size == 0 {
|
||||
return Ok(IOResult::Done(()));
|
||||
}
|
||||
loop {
|
||||
let Some(IntegrityCheckPageEntry {
|
||||
page_idx,
|
||||
|
|
@ -7794,11 +7797,7 @@ mod tests {
|
|||
use crate::{
|
||||
io::{Buffer, MemoryIO, OpenFlags, IO},
|
||||
schema::IndexColumn,
|
||||
storage::{
|
||||
database::DatabaseFile,
|
||||
page_cache::PageCache,
|
||||
sqlite3_ondisk::PageSize,
|
||||
},
|
||||
storage::{database::DatabaseFile, page_cache::PageCache, sqlite3_ondisk::PageSize},
|
||||
types::Text,
|
||||
vdbe::Register,
|
||||
BufferPool, Completion, Connection, IOContext, StepResult, WalFile, WalFileShared,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue