mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Reorder code so that it compiles with SQLITE_OMIT_MEMORYDB. Ticket #1754. (CVS 3170)
FossilOrigin-Name: 1929e37d5e691f9d2bec01deb7bdbbbb6f5ace01
This commit is contained in:
33
src/pager.c
33
src/pager.c
@@ -18,7 +18,7 @@
|
||||
** file simultaneously, or one process from reading the database while
|
||||
** another is writing.
|
||||
**
|
||||
** @(#) $Id: pager.c,v 1.265 2006/03/26 20:49:18 drh Exp $
|
||||
** @(#) $Id: pager.c,v 1.266 2006/04/07 13:54:47 drh Exp $
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_DISKIO
|
||||
#include "sqliteInt.h"
|
||||
@@ -1805,12 +1805,25 @@ int sqlite3pager_pagecount(Pager *pPager){
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
#ifndef SQLITE_OMIT_MEMORYDB
|
||||
/*
|
||||
** Clear a PgHistory block
|
||||
*/
|
||||
static void clearHistory(PgHistory *pHist){
|
||||
sqliteFree(pHist->pOrig);
|
||||
sqliteFree(pHist->pStmt);
|
||||
pHist->pOrig = 0;
|
||||
pHist->pStmt = 0;
|
||||
}
|
||||
#else
|
||||
#define clearHistory(x)
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Forward declaration
|
||||
*/
|
||||
static int syncJournal(Pager*);
|
||||
static void clearHistory(PgHistory*);
|
||||
|
||||
|
||||
/*
|
||||
** Unlink pPg from it's hash chain. Also set the page number to 0 to indicate
|
||||
@@ -3206,20 +3219,6 @@ void sqlite3pager_dont_rollback(void *pData){
|
||||
}
|
||||
|
||||
|
||||
#ifndef SQLITE_OMIT_MEMORYDB
|
||||
/*
|
||||
** Clear a PgHistory block
|
||||
*/
|
||||
static void clearHistory(PgHistory *pHist){
|
||||
sqliteFree(pHist->pOrig);
|
||||
sqliteFree(pHist->pStmt);
|
||||
pHist->pOrig = 0;
|
||||
pHist->pStmt = 0;
|
||||
}
|
||||
#else
|
||||
#define clearHistory(x)
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Commit all changes to the database and release the write lock.
|
||||
**
|
||||
|
Reference in New Issue
Block a user