1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Bug fixes. Trying to make it go faster. (CVS 254)

FossilOrigin-Name: 8f28a83abac59a2161d486c96386b8df726468d0
This commit is contained in:
drh
2001-09-18 02:02:23 +00:00
parent c73d1f5a55
commit 1eaa2694bf
6 changed files with 31 additions and 20 deletions

View File

@@ -18,7 +18,7 @@
** file simultaneously, or one process from reading the database while
** another is writing.
**
** @(#) $Id: pager.c,v 1.20 2001/09/16 00:13:27 drh Exp $
** @(#) $Id: pager.c,v 1.21 2001/09/18 02:02:23 drh Exp $
*/
#include "sqliteInt.h"
#include "pager.h"
@@ -947,14 +947,12 @@ void *sqlitepager_lookup(Pager *pPager, Pgno pgno){
** removed.
*/
int sqlitepager_unref(void *pData){
Pager *pPager;
PgHdr *pPg;
/* Decrement the reference count for this page
*/
pPg = DATA_TO_PGHDR(pData);
assert( pPg->nRef>0 );
pPager = pPg->pPager;
pPg->nRef--;
REFINFO(pPg);
@@ -962,6 +960,8 @@ int sqlitepager_unref(void *pData){
** destructor and add the page to the freelist.
*/
if( pPg->nRef==0 ){
Pager *pPager;
pPager = pPg->pPager;
pPg->pNextFree = 0;
pPg->pPrevFree = pPager->pLast;
pPager->pLast = pPg;