1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +03:00

Auto-vacuum: Ensure pages to be removed by database truncation are in the journal file. Also fix an sqlite3pager_movepage() bug. (CVS 2074)

FossilOrigin-Name: 081676e491760a45325e2349b177d6382faab9f5
This commit is contained in:
danielk1977
2004-11-06 12:26:07 +00:00
parent eee46cf35c
commit ef73ee9a46
5 changed files with 78 additions and 53 deletions

View File

@@ -239,10 +239,12 @@ printf("Writing block %d of %s\n", i, pFile->zName);
if( BLOCK_OFFSET(i+1)>nMax ){
len = nMax-BLOCK_OFFSET(i);
}
if( trash ){
sqlite3Randomness(len, p);
if( len>0 ){
if( trash ){
sqlite3Randomness(len, p);
}
rc = sqlite3RealWrite(&pFile->fd, p, len);
}
rc = sqlite3RealWrite(&pFile->fd, p, len);
}
sqliteFree(p);
}