1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Get VACUUM working on databases that have reserved bytes at the end

of each page. (CVS 1963)

FossilOrigin-Name: 90bb3af6cd827fcf731ba3d641a00ae426d6baca
This commit is contained in:
drh
2004-09-17 20:02:42 +00:00
parent f7a8362920
commit 31f11f6923
3 changed files with 10 additions and 9 deletions

View File

@@ -14,7 +14,7 @@
** Most of the code in this file may be omitted by defining the
** SQLITE_OMIT_VACUUM macro.
**
** $Id: vacuum.c,v 1.31 2004/09/06 17:24:13 drh Exp $
** $Id: vacuum.c,v 1.32 2004/09/17 20:02:42 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -154,7 +154,8 @@ int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){
if( rc!=SQLITE_OK ) goto end_of_vacuum;
assert( strcmp(db->aDb[db->nDb-1].zName,"vacuum_db")==0 );
pTemp = db->aDb[db->nDb-1].pBt;
sqlite3BtreeSetPageSize(pTemp, sqlite3BtreeGetPageSize(pMain), 0);
sqlite3BtreeSetPageSize(pTemp, sqlite3BtreeGetPageSize(pMain),
sqlite3BtreeGetReserve(pMain));
assert( sqlite3BtreeGetPageSize(pTemp)==sqlite3BtreeGetPageSize(pMain) );
execSql(db, "PRAGMA vacuum_db.synchronous=OFF");