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

Support compile-time option SQLITE_OMIT_WAL, for building without WAL support.

FossilOrigin-Name: 9b230c43dfa112e3e1589f9775926807bd36b36e
This commit is contained in:
dan
2010-05-01 16:40:20 +00:00
parent 057f1ecddb
commit 5cf53537a8
22 changed files with 267 additions and 133 deletions

View File

@@ -2261,6 +2261,15 @@ static int lockBtree(BtShared *pBt){
if( memcmp(page1, zMagicHeader, 16)!=0 ){
goto page1_init_failed;
}
#ifdef SQLITE_OMIT_WAL
if( page1[18]>1 ){
pBt->readOnly = 1;
}
if( page1[19]>1 ){
goto page1_init_failed;
}
#else
if( page1[18]>2 ){
pBt->readOnly = 1;
}
@@ -2287,6 +2296,7 @@ static int lockBtree(BtShared *pBt){
}
rc = SQLITE_NOTADB;
}
#endif
/* The maximum embedded fraction must be exactly 25%. And the minimum
** embedded fraction must be 12.5% for both leaf-data and non-leaf-data.