mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Fix the xDelete implementation of the multiplexor VFS so that it correctly
deletes overflow WAL files. FossilOrigin-Name: e44e26771e5aa48f3bfa14d6db3e669b5b2a1e73
This commit is contained in:
@@ -657,6 +657,15 @@ static int multiplexDelete(
|
||||
multiplexFilename(zName, nName, SQLITE_OPEN_MAIN_JOURNAL, --iChunk, z);
|
||||
rc = pOrigVfs->xDelete(pOrigVfs, z, syncDir);
|
||||
}
|
||||
iChunk = 0;
|
||||
do{
|
||||
multiplexFilename(zName, nName, SQLITE_OPEN_WAL, ++iChunk, z);
|
||||
rc = pOrigVfs->xAccess(pOrigVfs, z, SQLITE_ACCESS_EXISTS, &bExists);
|
||||
}while( rc==SQLITE_OK && bExists );
|
||||
while( rc==SQLITE_OK && iChunk>1 ){
|
||||
multiplexFilename(zName, nName, SQLITE_OPEN_WAL, --iChunk, z);
|
||||
rc = pOrigVfs->xDelete(pOrigVfs, z, syncDir);
|
||||
}
|
||||
}
|
||||
sqlite3_free(z);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user