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

Disable synchronous writes to the master journal when PRAGMA synchronous=OFF

for all database files.  Ticket #1375. (CVS 2630)

FossilOrigin-Name: 644b96aa23de7e828280d35785db840a4fa9413d
This commit is contained in:
drh
2005-08-27 16:36:48 +00:00
parent 9cc5abd769
commit 2c8997b9a5
8 changed files with 122 additions and 17 deletions

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.264 2005/08/02 17:13:10 drh Exp $
** $Id: btree.c,v 1.265 2005/08/27 16:36:49 drh Exp $
**
** This file implements a external (disk-based) database using BTrees.
** For a detailed discussion of BTrees, refer to
@@ -1345,6 +1345,15 @@ int sqlite3BtreeSetSafetyLevel(Btree *pBt, int level){
}
#endif
/*
** Return TRUE if the given btree is set to safety level 1. In other
** words, return TRUE if no sync() occurs on the disk files.
*/
int sqlite3BtreeSyncDisabled(Btree *pBt){
assert( pBt && pBt->pPager );
return sqlite3pager_nosync(pBt->pPager);
}
#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) || !defined(SQLITE_OMIT_VACUUM)
/*
** Change the default pages size and the number of reserved bytes per page.