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:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user