pager.c File Reference

PAGERTRACE1

PAGERTRACE2

PAGERTRACE3

PAGERTRACE4

PAGERTRACE5

PAGERID

FILEHANDLEID

PAGER_UNLOCK

PAGER_SHARED

PAGER_RESERVED

PAGER_EXCLUSIVE

PAGER_SYNCED

SQLITE_BUSY_RESERVED_LOCK

FORCE_ALIGNMENT

CODEC1

CODEC2

PAGER_INCR

const unsigned char aJournalMagic

const unsigned charaJournalMagic[static]

JOURNAL_PG_SZ

JOURNAL_HDR_SZ

MEMDB

PAGER_MJ_PGNO

PAGER_MAX_PGNO

pageInStatement(PgHdr *)

intpageInStatement(PgHdr *pPg)[static]

Parameters

PgHdr * pPg

read32bits(sqlite3_file *, i64, u32 *)

intread32bits(sqlite3_file *fd,
i64offset,
u32 *pRes
)[static]

Parameters

sqlite3_file * fd
i64 offset
u32 * pRes

put32bits

write32bits(sqlite3_file *, i64, u32)

intwrite32bits(sqlite3_file *fd,
i64offset,
u32val
)[static]

Parameters

sqlite3_file * fd
i64 offset
u32 val

osUnlock(sqlite3_file *, int)

intosUnlock(sqlite3_file *pFd,
inteLock
)[static]

Parameters

sqlite3_file * pFd
int eLock

pager_unlock(Pager *)

voidpager_unlock(Pager *pPager)[static]

Parameters

Pager * pPager

pager_error(Pager *, int)

intpager_error(Pager *pPager,
intrc
)[static]

Parameters

Pager * pPager
int rc

pager_datahash

pager_pagehash

CHECK_PAGE

readMasterJournal(sqlite3_file *, char *, int)

intreadMasterJournal(sqlite3_file *pJrnl,
char *zMaster,
intnMaster
)[static]

Parameters

sqlite3_file * pJrnl
char * zMaster
int nMaster

seekJournalHdr(Pager *)

voidseekJournalHdr(Pager *pPager)[static]

Parameters

Pager * pPager

zeroJournalHdr(Pager *, int)

intzeroJournalHdr(Pager *pPager,
intdoTruncate
)[static]

Parameters

Pager * pPager
int doTruncate

writeJournalHdr(Pager *)

intwriteJournalHdr(Pager *pPager)[static]

Parameters

Pager * pPager

readJournalHdr(Pager *, i64, u32 *, u32 *)

intreadJournalHdr(Pager *pPager,
i64journalSize,
u32 *pNRec,
u32 *pDbSize
)[static]

Parameters

Pager * pPager
i64 journalSize
u32 * pNRec
u32 * pDbSize

writeMasterJournal(Pager *, const char *)

intwriteMasterJournal(Pager *pPager,
const char *zMaster
)[static]

Parameters

Pager * pPager
const char * zMaster

pager_lookup(Pager *, Pgno)

PgHdr *pager_lookup(Pager *pPager,
Pgnopgno
)[static]

Parameters

Pager * pPager
Pgno pgno

pager_reset(Pager *)

voidpager_reset(Pager *pPager)[static]

Parameters

Pager * pPager

pagerUnlockAndRollback(Pager *)

voidpagerUnlockAndRollback(Pager *p)[static]

Parameters

Pager * p

pager_end_transaction(Pager *, int)

intpager_end_transaction(Pager *pPager,
inthasMaster
)[static]

Parameters

Pager * pPager
int hasMaster

pager_cksum(Pager *, const u8 *)

u32 pager_cksum(Pager *pPager,
const u8 *aData
)[static]

Parameters

Pager * pPager
const u8 * aData

makeClean(PgHdr *)

voidmakeClean(PgHdr *)[static]

Parameters

PgHdr *

pager_playback_one_page(Pager *, sqlite3_file *, i64, int)

intpager_playback_one_page(Pager *pPager,
sqlite3_file *jfd,
i64offset,
intisMainJrnl
)[static]

Parameters

Pager * pPager
sqlite3_file * jfd
i64 offset
int isMainJrnl

pager_delmaster(Pager *, const char *)

intpager_delmaster(Pager *pPager,
const char *zMaster
)[static]

Parameters

Pager * pPager
const char * zMaster

pager_truncate_cache(Pager *)

voidpager_truncate_cache(Pager *pPager)[static]

Parameters

Pager * pPager

pager_truncate(Pager *, int)

intpager_truncate(Pager *pPager,
intnPage
)[static]

Parameters

Pager * pPager
int nPage

setSectorSize(Pager *)

voidsetSectorSize(Pager *pPager)[static]

Parameters

Pager * pPager

pager_playback(Pager *, int)

intpager_playback(Pager *pPager,
intisHot
)[static]

Parameters

Pager * pPager
int isHot

pager_stmt_playback(Pager *)

intpager_stmt_playback(Pager *pPager)[static]

Parameters

Pager * pPager

sqlite3PagerSetCachesize(Pager *, int)

voidsqlite3PagerSetCachesize(Pager *pPager,
intmxPage
)

Parameters

Pager * pPager
int mxPage

sqlite3PagerSetSafetyLevel(Pager *, int, int)

voidsqlite3PagerSetSafetyLevel(Pager *pPager,
intlevel,
intbFullFsync
)

Parameters

Pager * pPager
int level
int bFullFsync

sqlite3PagerOpentemp(Pager *, sqlite3_file *, int)

intsqlite3PagerOpentemp(Pager *pPager,
sqlite3_file *pFile,
intvfsFlags
)[static]

Parameters

Pager * pPager
sqlite3_file * pFile
int vfsFlags

pagerStress(void *, PgHdr *)

intpagerStress(void *,
PgHdr *
)[static]

Parameters

void *
PgHdr *

sqlite3PagerOpen(sqlite3_vfs *, Pager **, const char *, int, int, int)

intsqlite3PagerOpen(sqlite3_vfs *pVfs,
Pager **ppPager,
const char *zFilename,
intnExtra,
intflags,
intvfsFlags
)

Parameters

sqlite3_vfs * pVfs
Pager ** ppPager
const char * zFilename
int nExtra
int flags
int vfsFlags

sqlite3PagerSetBusyhandler(Pager *, BusyHandler *)

voidsqlite3PagerSetBusyhandler(Pager *pPager,
BusyHandler *pBusyHandler
)

Parameters

Pager * pPager
BusyHandler * pBusyHandler

sqlite3PagerSetReiniter(Pager *, void(*)(DbPage *))

voidsqlite3PagerSetReiniter(Pager *pPager,
void(*)(DbPage *)xReinit
)

Parameters

Pager * pPager
void(*)(DbPage *) xReinit

sqlite3PagerSetPagesize(Pager *, u16 *)

intsqlite3PagerSetPagesize(Pager *pPager,
u16 *pPageSize
)

Parameters

Pager * pPager
u16 * pPageSize

sqlite3PagerTempSpace(Pager *)

void *sqlite3PagerTempSpace(Pager *pPager)

Parameters

Pager * pPager

sqlite3PagerMaxPageCount(Pager *, int)

intsqlite3PagerMaxPageCount(Pager *pPager,
intmxPage
)

Parameters

Pager * pPager
int mxPage

disable_simulated_io_errors

enable_simulated_io_errors

sqlite3PagerReadFileheader(Pager *, int, unsigned char *)

intsqlite3PagerReadFileheader(Pager *pPager,
intN,
unsigned char *pDest
)

Parameters

Pager * pPager
int N
unsigned char * pDest

sqlite3PagerPagecount(Pager *, int *)

intsqlite3PagerPagecount(Pager *pPager,
int *pnPage
)

Parameters

Pager * pPager
int * pnPage

syncJournal(Pager *)

intsyncJournal(Pager *)[static]

Parameters

Pager *

pager_wait_on_lock(Pager *, int)

intpager_wait_on_lock(Pager *pPager,
intlocktype
)[static]

Parameters

Pager * pPager
int locktype

sqlite3PagerTruncate(Pager *, Pgno)

intsqlite3PagerTruncate(Pager *pPager,
PgnonPage
)

Parameters

Pager * pPager
Pgno nPage

sqlite3PagerClose(Pager *)

intsqlite3PagerClose(Pager *pPager)

Parameters

Pager * pPager

sqlite3PagerPagenumber(DbPage *)

Pgno sqlite3PagerPagenumber(DbPage *p)

Parameters

DbPage * p

sqlite3PagerRef(DbPage *)

intsqlite3PagerRef(DbPage *pPg)

Parameters

DbPage * pPg

pager_write_pagelist(PgHdr *)

intpager_write_pagelist(PgHdr *pList)[static]

Parameters

PgHdr * pList

hasHotJournal(Pager *, int *)

inthasHotJournal(Pager *pPager,
int *pExists
)[static]

Parameters

Pager * pPager
int * pExists

readDbPage(Pager *, PgHdr *, Pgno)

intreadDbPage(Pager *pPager,
PgHdr *pPg,
Pgnopgno
)[static]

Parameters

Pager * pPager
PgHdr * pPg
Pgno pgno

pagerSharedLock(Pager *)

intpagerSharedLock(Pager *pPager)[static]

Parameters

Pager * pPager

pager_get_content(PgHdr *)

intpager_get_content(PgHdr *pPg)[static]

Parameters

PgHdr * pPg

pagerUnlockIfUnused(Pager *)

voidpagerUnlockIfUnused(Pager *pPager)[static]

Parameters

Pager * pPager

pagerDropPage(DbPage *)

voidpagerDropPage(DbPage *pPg)[static]

Parameters

DbPage * pPg

sqlite3PagerAcquire(Pager *, Pgno, DbPage **, int)

intsqlite3PagerAcquire(Pager *pPager,
Pgnopgno,
DbPage **ppPage,
intnoContent
)

Parameters

Pager * pPager
Pgno pgno
DbPage ** ppPage
int noContent

sqlite3PagerLookup(Pager *, Pgno)

DbPage *sqlite3PagerLookup(Pager *pPager,
Pgnopgno
)

Parameters

Pager * pPager
Pgno pgno

sqlite3PagerUnref(DbPage *)

intsqlite3PagerUnref(DbPage *pPg)

Parameters

DbPage * pPg

pager_open_journal(Pager *)

intpager_open_journal(Pager *pPager)[static]

Parameters

Pager * pPager

sqlite3PagerBegin(DbPage *, int)

intsqlite3PagerBegin(DbPage *pPg,
intexFlag
)

Parameters

DbPage * pPg
int exFlag

makeDirty(PgHdr *)

voidmakeDirty(PgHdr *pPg)[static]

Parameters

PgHdr * pPg

pager_write(PgHdr *)

intpager_write(PgHdr *pPg)[static]

Parameters

PgHdr * pPg

sqlite3PagerWrite(DbPage *)

intsqlite3PagerWrite(DbPage *pDbPage)

Parameters

DbPage * pDbPage

sqlite3PagerIswriteable(DbPage *)

intsqlite3PagerIswriteable(DbPage *pPg)

Parameters

DbPage * pPg

sqlite3PagerDontWrite(DbPage *)

intsqlite3PagerDontWrite(DbPage *pDbPage)

Parameters

DbPage * pDbPage

sqlite3PagerDontRollback(DbPage *)

voidsqlite3PagerDontRollback(DbPage *pPg)

Parameters

DbPage * pPg

pager_incr_changecounter(Pager *, int)

intpager_incr_changecounter(Pager *pPager,
intisDirect
)[static]

Parameters

Pager * pPager
int isDirect

sqlite3PagerSync(Pager *)

intsqlite3PagerSync(Pager *pPager)

Parameters

Pager * pPager

sqlite3PagerCommitPhaseOne(Pager *, const char *, Pgno, int)

intsqlite3PagerCommitPhaseOne(Pager *pPager,
const char *zMaster,
PgnonTrunc,
intnoSync
)

Parameters

Pager * pPager
const char * zMaster
Pgno nTrunc
int noSync

sqlite3PagerCommitPhaseTwo(Pager *)

intsqlite3PagerCommitPhaseTwo(Pager *pPager)

Parameters

Pager * pPager

sqlite3PagerRollback(Pager *)

intsqlite3PagerRollback(Pager *pPager)

Parameters

Pager * pPager

sqlite3PagerIsreadonly(Pager *)

intsqlite3PagerIsreadonly(Pager *pPager)

Parameters

Pager * pPager

sqlite3PagerRefcount(Pager *)

intsqlite3PagerRefcount(Pager *pPager)

Parameters

Pager * pPager

sqlite3PagerPageRefcount(DbPage *)

intsqlite3PagerPageRefcount(DbPage *pPage)

Parameters

DbPage * pPage

pagerStmtBegin(Pager *)

intpagerStmtBegin(Pager *pPager)[static]

Parameters

Pager * pPager

sqlite3PagerStmtBegin(Pager *)

intsqlite3PagerStmtBegin(Pager *pPager)

Parameters

Pager * pPager

sqlite3PagerStmtCommit(Pager *)

intsqlite3PagerStmtCommit(Pager *pPager)

Parameters

Pager * pPager

sqlite3PagerStmtRollback(Pager *)

intsqlite3PagerStmtRollback(Pager *pPager)

Parameters

Pager * pPager

sqlite3PagerFilename(Pager *)

const char *sqlite3PagerFilename(Pager *pPager)

Parameters

Pager * pPager

sqlite3PagerVfs(Pager *)

const sqlite3_vfs *sqlite3PagerVfs(Pager *pPager)

Parameters

Pager * pPager

sqlite3PagerFile(Pager *)

sqlite3_file *sqlite3PagerFile(Pager *pPager)

Parameters

Pager * pPager

sqlite3PagerDirname(Pager *)

const char *sqlite3PagerDirname(Pager *pPager)

Parameters

Pager * pPager

sqlite3PagerJournalname(Pager *)

const char *sqlite3PagerJournalname(Pager *pPager)

Parameters

Pager * pPager

sqlite3PagerNosync(Pager *)

intsqlite3PagerNosync(Pager *pPager)

Parameters

Pager * pPager

sqlite3PagerMovepage(Pager *, DbPage *, Pgno, int)

intsqlite3PagerMovepage(Pager *pPager,
DbPage *pPg,
Pgnopgno,
intisCommit
)

Parameters

Pager * pPager
DbPage * pPg
Pgno pgno
int isCommit

sqlite3PagerGetData(DbPage *)

void *sqlite3PagerGetData(DbPage *pPg)

Parameters

DbPage * pPg

sqlite3PagerGetExtra(DbPage *)

void *sqlite3PagerGetExtra(DbPage *pPg)

Parameters

DbPage * pPg

sqlite3PagerLockingMode(Pager *, int)

intsqlite3PagerLockingMode(Pager *pPager,
inteMode
)

Parameters

Pager * pPager
int eMode

sqlite3PagerJournalMode(Pager *, int)

intsqlite3PagerJournalMode(Pager *pPager,
inteMode
)

Parameters

Pager * pPager
int eMode

sqlite3PagerJournalSizeLimit(Pager *, i64)

i64 sqlite3PagerJournalSizeLimit(Pager *pPager,
i64iLimit
)

Parameters

Pager * pPager
i64 iLimit