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

Move the PENDING_PAGE to a very large value if disk I/O is omitted. (CVS 3135)

FossilOrigin-Name: f07181739f82b0d23f934f51b97e67c32efe6f42
This commit is contained in:
drh
2006-03-14 12:59:10 +00:00
parent 91171cde62
commit fe9a9145d1
3 changed files with 16 additions and 9 deletions

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.319 2006/03/13 14:28:05 drh Exp $
** $Id: btree.c,v 1.320 2006/03/14 12:59:10 drh Exp $
**
** This file implements a external (disk-based) database using BTrees.
** For a detailed discussion of BTrees, refer to
@@ -469,8 +469,15 @@ static void put4byte(unsigned char *p, u32 v){
/* The database page the PENDING_BYTE occupies. This page is never used.
** TODO: This macro is very similary to PAGER_MJ_PGNO() in pager.c. They
** should possibly be consolidated (presumably in pager.h).
**
** If disk I/O is omitted (meaning that the database is stored purely
** in memory) then there is no pending byte.
*/
#define PENDING_BYTE_PAGE(pBt) ((PENDING_BYTE/(pBt)->pageSize)+1)
#ifdef SQLITE_OMIT_DISKIO
# define PENDING_BYTE_PAGE(pBt) 0x7fffffff
#else
# define PENDING_BYTE_PAGE(pBt) ((PENDING_BYTE/(pBt)->pageSize)+1)
#endif
/*
** A linked list of the following structures is stored at BtShared.pLock.