1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Select the default page size for new databases based on the sector-size and IOCAP flags. (CVS 4286)

FossilOrigin-Name: 13dda2e8e879835c21e539ba3ff8f96face1af4c
This commit is contained in:
danielk1977
2007-08-24 11:52:28 +00:00
parent f78799e637
commit 9663b8f92d
9 changed files with 124 additions and 35 deletions

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.411 2007/08/24 03:51:33 drh Exp $
** $Id: btree.c,v 1.412 2007/08/24 11:52:29 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
@@ -1199,7 +1199,7 @@ int sqlite3BtreeOpen(
pBt->pageSize = get2byte(&zDbHeader[16]);
if( pBt->pageSize<512 || pBt->pageSize>SQLITE_MAX_PAGE_SIZE
|| ((pBt->pageSize-1)&pBt->pageSize)!=0 ){
pBt->pageSize = SQLITE_DEFAULT_PAGE_SIZE;
pBt->pageSize = sqlite3PagerSetPagesize(pBt->pPager, 0);
pBt->maxEmbedFrac = 64; /* 25% */
pBt->minEmbedFrac = 32; /* 12.5% */
pBt->minLeafFrac = 32; /* 12.5% */