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

Allow a VACUUM operation to change the page-size in the same way as it can be used to change a database between auto-vacuum and normal mode. (CVS 4896)

FossilOrigin-Name: 871df0e7c36a88f175cfc63797745e52a1b1796b
This commit is contained in:
danielk1977
2008-03-20 11:04:21 +00:00
parent f219f196f8
commit f653d78282
10 changed files with 268 additions and 74 deletions

View File

@@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to implement the PRAGMA command.
**
** $Id: pragma.c,v 1.171 2008/03/19 00:21:31 drh Exp $
** $Id: pragma.c,v 1.172 2008/03/20 11:04:21 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -350,7 +350,8 @@ void sqlite3Pragma(
/* Malloc may fail when setting the page-size, as there is an internal
** buffer that the pager module resizes using sqlite3_realloc().
*/
if( SQLITE_NOMEM==sqlite3BtreeSetPageSize(pBt, atoi(zRight), -1) ){
db->nextPagesize = atoi(zRight);
if( SQLITE_NOMEM==sqlite3BtreeSetPageSize(pBt, db->nextPagesize, -1) ){
db->mallocFailed = 1;
}
}