Go to the source code of this file.
#define BTREE_AUTOVACUUM_FULL 1 |
Definition at line 35 of file btree.h.
Referenced by getAutoVacuum(), and sqlite3BtreeGetAutoVacuum().
#define BTREE_AUTOVACUUM_INCR 2 |
Definition at line 36 of file btree.h.
Referenced by getAutoVacuum(), and sqlite3BtreeGetAutoVacuum().
#define BTREE_AUTOVACUUM_NONE 0 |
Definition at line 34 of file btree.h.
Referenced by getAutoVacuum(), and sqlite3BtreeGetAutoVacuum().
#define BTREE_INTKEY 1 |
Definition at line 115 of file btree.h.
Referenced by sqlite3VdbeExec().
#define BTREE_LEAFDATA 4 |
Definition at line 117 of file btree.h.
Referenced by sqlite3VdbeExec().
#define BTREE_NO_READLOCK 2 |
Definition at line 73 of file btree.h.
Referenced by sqlite3BtreeFactory().
#define BTREE_OMIT_JOURNAL 1 |
Definition at line 72 of file btree.h.
Referenced by sqlite3BtreeFactory().
#define BTREE_ZERODATA 2 |
Definition at line 116 of file btree.h.
Referenced by sqlite3VdbeExec().
#define sqlite3BtreeEnter | ( | X | ) |
Definition at line 204 of file btree.h.
Referenced by sqlite3_file_control(), sqlite3BtreeBeginStmt(), sqlite3BtreeBeginTrans(), sqlite3BtreeClearTable(), sqlite3BtreeClose(), sqlite3BtreeCloseCursor(), sqlite3BtreeCommit(), sqlite3BtreeCommitPhaseOne(), sqlite3BtreeCommitPhaseTwo(), sqlite3BtreeCommitStmt(), sqlite3BtreeCopyFile(), sqlite3BtreeCreateTable(), sqlite3BtreeCursor(), sqlite3BtreeDropTable(), sqlite3BtreeGetAutoVacuum(), sqlite3BtreeGetMeta(), sqlite3BtreeGetReserve(), sqlite3BtreeIncrVacuum(), sqlite3BtreeIntegrityCheck(), sqlite3BtreeLockTable(), sqlite3BtreeMaxPageCount(), sqlite3BtreeRollback(), sqlite3BtreeRollbackStmt(), sqlite3BtreeSchema(), sqlite3BtreeSchemaLocked(), sqlite3BtreeSetAutoVacuum(), sqlite3BtreeSetCacheSize(), sqlite3BtreeSetPageSize(), sqlite3BtreeSetSafetyLevel(), sqlite3BtreeSyncDisabled(), sqlite3BtreeTripAllCursors(), sqlite3BtreeUpdateMeta(), and sqlite3InitOne().
#define sqlite3BtreeEnterAll | ( | X | ) |
Definition at line 212 of file btree.h.
Referenced by attachFunc(), sqlite3_blob_open(), sqlite3LockAndPrepare(), and sqlite3ResetInternalSchema().
#define sqlite3BtreeEnterCursor | ( | X | ) |
Definition at line 210 of file btree.h.
Referenced by blobReadWrite(), and sqlite3_blob_open().
#define sqlite3BtreeLeave | ( | X | ) |
Definition at line 205 of file btree.h.
Referenced by sqlite3_file_control(), sqlite3BtreeBeginStmt(), sqlite3BtreeBeginTrans(), sqlite3BtreeClearTable(), sqlite3BtreeClose(), sqlite3BtreeCloseCursor(), sqlite3BtreeCommit(), sqlite3BtreeCommitPhaseOne(), sqlite3BtreeCommitPhaseTwo(), sqlite3BtreeCommitStmt(), sqlite3BtreeCopyFile(), sqlite3BtreeCreateTable(), sqlite3BtreeCursor(), sqlite3BtreeDropTable(), sqlite3BtreeGetAutoVacuum(), sqlite3BtreeGetMeta(), sqlite3BtreeGetReserve(), sqlite3BtreeIncrVacuum(), sqlite3BtreeIntegrityCheck(), sqlite3BtreeLockTable(), sqlite3BtreeMaxPageCount(), sqlite3BtreeRollback(), sqlite3BtreeRollbackStmt(), sqlite3BtreeSchema(), sqlite3BtreeSchemaLocked(), sqlite3BtreeSetAutoVacuum(), sqlite3BtreeSetCacheSize(), sqlite3BtreeSetPageSize(), sqlite3BtreeSetSafetyLevel(), sqlite3BtreeSyncDisabled(), sqlite3BtreeTripAllCursors(), sqlite3BtreeUpdateMeta(), and sqlite3InitOne().
#define sqlite3BtreeLeaveAll | ( | X | ) |
Definition at line 213 of file btree.h.
Referenced by attachFunc(), sqlite3_blob_open(), sqlite3LockAndPrepare(), and sqlite3ResetInternalSchema().
#define sqlite3BtreeLeaveCursor | ( | X | ) |
Definition at line 211 of file btree.h.
Referenced by blobReadWrite(), and sqlite3_blob_open().
#define sqlite3BtreeMutexArrayEnter | ( | X | ) |
Definition at line 218 of file btree.h.
Referenced by sqlite3VdbeExec(), and sqlite3VdbeHalt().
#define sqlite3BtreeMutexArrayInsert | ( | X, | |||
Y | ) |
Definition at line 220 of file btree.h.
Referenced by sqlite3VdbeUsesBtree().
#define sqlite3BtreeMutexArrayLeave | ( | X | ) |
Definition at line 219 of file btree.h.
Referenced by sqlite3VdbeExec(), and sqlite3VdbeHalt().
#define SQLITE_DEFAULT_AUTOVACUUM 0 |
Definition at line 31 of file btree.h.
Referenced by sqlite3BtreeOpen(), and sqlite3Pragma().
#define SQLITE_N_BTREE_META 10 |
Definition at line 24 of file btree.h.
Referenced by sqlite3VdbeExec().
typedef struct BtreeMutexArray BtreeMutexArray |
int sqlite3BtreeBeginStmt | ( | Btree * | ) |
Definition at line 2699 of file btree.c.
References Btree::db, BtShared::db, BtShared::inStmt, Btree::inTrans, BtShared::inTransaction, Btree::pBt, BtShared::pPager, BtShared::readOnly, sqlite3BtreeEnter, sqlite3BtreeLeave, sqlite3PagerStmtBegin(), SQLITE_ERROR, SQLITE_OK, SQLITE_READONLY, and TRANS_WRITE.
Referenced by sqlite3VdbeExec().
int sqlite3BtreeBeginTrans | ( | Btree * | , | |
int | ||||
) |
Definition at line 1957 of file btree.c.
References btreeIntegrity, Btree::db, BtShared::db, BtShared::inStmt, Btree::inTrans, BtShared::inTransaction, lockBtree(), newDatabase(), BtShared::nTransaction, Btree::pBt, BtLock::pBtree, MemPage::pDbPage, BtShared::pExclusive, BtShared::pLock, BtLock::pNext, BtShared::pPage1, BtShared::readOnly, sqlite3BtreeEnter, sqlite3BtreeInvokeBusyHandler(), sqlite3BtreeLeave, sqlite3PagerBegin(), SQLITE_BUSY, SQLITE_OK, SQLITE_READONLY, TRANS_NONE, TRANS_READ, TRANS_WRITE, and unlockBtreeIfUnused().
Referenced by lockBtreeWithRetry(), and sqlite3VdbeExec().
void sqlite3BtreeCacheOverflow | ( | BtCursor * | ) |
Definition at line 7408 of file btree.c.
References BtCursor::aOverflow, Btree::db, BtCursor::isIncrblobHandle, sqlite3::mutex, BtCursor::pBtree, and sqlite3_mutex_held.
Referenced by sqlite3_blob_open().
void sqlite3BtreeClearCursor | ( | BtCursor * | ) |
Definition at line 371 of file btree.c.
References CURSOR_INVALID, BtCursor::eState, BtCursor::pKey, and sqlite3_free().
Referenced by moveToRoot(), sqlite3BtreeCloseCursor(), sqlite3BtreeInsert(), sqlite3BtreeTripAllCursors(), and sqlite3VdbeExec().
int sqlite3BtreeClearTable | ( | Btree * | , | |
int | , | |||
int * | ||||
) |
Definition at line 6269 of file btree.c.
References checkReadLocks(), clearDatabasePage(), Btree::db, BtShared::db, Btree::inTrans, Btree::pBt, BtShared::readOnly, saveAllCursors(), sqlite3BtreeEnter, sqlite3BtreeLeave, SQLITE_ERROR, SQLITE_OK, SQLITE_READONLY, and TRANS_WRITE.
Referenced by btreeDropTable(), and sqlite3VdbeExec().
int sqlite3BtreeClose | ( | Btree * | ) |
Definition at line 1492 of file btree.c.
References BtShared::db, Btree::db, freeTempSpace(), Btree::locked, sqlite3::mutex, Btree::pBt, BtCursor::pBtree, BtShared::pCursor, Btree::pNext, BtCursor::pNext, BtShared::pPager, Btree::pPrev, BtShared::pSchema, removeFromSharingList(), Btree::sharable, sqlite3_free(), sqlite3_mutex_held, sqlite3BtreeCloseCursor(), sqlite3BtreeEnter, sqlite3BtreeLeave, sqlite3BtreeRollback(), sqlite3PagerClose(), SQLITE_OK, Btree::wantToLock, and BtShared::xFreeSchema.
Referenced by attachFunc(), detachFunc(), invalidateTempStorage(), sqlite3_close(), sqlite3RunVacuum(), and sqlite3VdbeFreeCursor().
int sqlite3BtreeCloseCursor | ( | BtCursor * | ) |
Definition at line 2871 of file btree.c.
References BtCursor::apPage, Btree::db, BtShared::db, invalidateOverflowCache(), BtCursor::iPage, BtCursor::pBt, BtCursor::pBtree, BtShared::pCursor, BtCursor::pNext, BtCursor::pPrev, releasePage(), sqlite3BtreeClearCursor(), sqlite3BtreeEnter, sqlite3BtreeLeave, SQLITE_OK, and unlockBtreeIfUnused().
Referenced by schemaIsValid(), sqlite3BtreeClose(), sqlite3InitOne(), and sqlite3VdbeFreeCursor().
int sqlite3BtreeCommit | ( | Btree * | ) |
Definition at line 2552 of file btree.c.
References sqlite3BtreeCommitPhaseOne(), sqlite3BtreeCommitPhaseTwo(), sqlite3BtreeEnter, sqlite3BtreeLeave, and SQLITE_OK.
Referenced by sqlite3RunVacuum().
int sqlite3BtreeCommitPhaseOne | ( | Btree * | , | |
const char * | zMaster | |||
) |
Definition at line 2466 of file btree.c.
References BtShared::autoVacuum, autoVacuumCommit(), Btree::db, BtShared::db, Btree::inTrans, Btree::pBt, BtShared::pPager, sqlite3BtreeEnter, sqlite3BtreeLeave, sqlite3PagerCommitPhaseOne(), SQLITE_OK, and TRANS_WRITE.
Referenced by sqlite3BtreeCommit(), and vdbeCommit().
int sqlite3BtreeCommitPhaseTwo | ( | Btree * | ) |
Definition at line 2502 of file btree.c.
References btreeIntegrity, Btree::db, BtShared::db, BtShared::inStmt, Btree::inTrans, BtShared::inTransaction, BtShared::nTransaction, Btree::pBt, BtShared::pPager, sqlite3BtreeEnter, sqlite3BtreeLeave, sqlite3PagerCommitPhaseTwo(), SQLITE_OK, TRANS_NONE, TRANS_READ, TRANS_WRITE, unlockAllTables(), and unlockBtreeIfUnused().
Referenced by sqlite3BtreeCommit(), and vdbeCommit().
int sqlite3BtreeCommitStmt | ( | Btree * | ) |
Definition at line 2720 of file btree.c.
References Btree::db, BtShared::db, BtShared::inStmt, Btree::pBt, BtShared::pPager, BtShared::readOnly, sqlite3BtreeEnter, sqlite3BtreeLeave, sqlite3PagerStmtCommit(), and SQLITE_OK.
Referenced by sqlite3VdbeHalt().
Definition at line 7255 of file btree.c.
References btreeCopyFile(), sqlite3BtreeEnter, and sqlite3BtreeLeave.
Referenced by sqlite3RunVacuum().
int sqlite3BtreeCreateTable | ( | Btree * | , | |
int * | , | |||
int | flags | |||
) |
Definition at line 6197 of file btree.c.
References btreeCreateTable(), Btree::db, BtShared::db, Btree::pBt, sqlite3BtreeEnter, and sqlite3BtreeLeave.
Referenced by sqlite3VdbeExec().
Definition at line 2847 of file btree.c.
References btreeCursor(), Btree::db, BtShared::db, Btree::pBt, sqlite3BtreeEnter, and sqlite3BtreeLeave.
Referenced by schemaIsValid(), sqlite3InitOne(), and sqlite3VdbeExec().
Definition at line 3895 of file btree.c.
References Btree::db, sqlite3::mutex, BtCursor::pBtree, and sqlite3_mutex_held.
Referenced by sqlite3VdbeMemFromBtree().
int sqlite3BtreeCursorHasMoved | ( | BtCursor * | , | |
int * | ||||
) |
Definition at line 415 of file btree.c.
References CURSOR_VALID, BtCursor::eState, restoreCursorPosition, BtCursor::skip, and SQLITE_OK.
Referenced by sqlite3VdbeCursorMoveto().
int sqlite3BtreeCursorSize | ( | void | ) |
Definition at line 2861 of file btree.c.
Referenced by allocateCursor(), schemaIsValid(), and sqlite3InitOne().
Definition at line 3340 of file btree.c.
References accessPayload(), BtCursor::aiIdx, BtCursor::apPage, CURSOR_INVALID, CURSOR_VALID, BtCursor::eState, BtCursor::iPage, MemPage::nCell, restoreCursorPosition, SQLITE_ABORT, and SQLITE_OK.
Referenced by sqlite3_blob_read(), sqlite3VdbeExec(), and sqlite3VdbeMemFromBtree().
const void* sqlite3BtreeDataFetch | ( | BtCursor * | , | |
int * | pAmt | |||
) |
Definition at line 3437 of file btree.c.
References CURSOR_VALID, BtCursor::eState, and fetchPayload().
Referenced by sqlite3VdbeExec(), and sqlite3VdbeMemFromBtree().
Definition at line 3006 of file btree.c.
References CURSOR_INVALID, CURSOR_VALID, BtCursor::eState, getCellInfo, BtCursor::info, CellInfo::nData, restoreCursorPosition, and SQLITE_OK.
Referenced by sqlite3VdbeExec().
int sqlite3BtreeDelete | ( | BtCursor * | ) |
Definition at line 5858 of file btree.c.
References BtCursor::aiIdx, allocateTempSpace(), BtCursor::apPage, balance(), cellSizePtr(), checkReadLocks(), clearCell(), CURSOR_FAULT, dropCell(), BtCursor::eState, findCell, findOverflowCell(), get4byte, BtCursor::info, insertCell(), MemPage::intKey, BtShared::inTransaction, BtCursor::iPage, MemPage::isInit, MemPage::leaf, moveToRoot(), MX_CELL_SIZE, MemPage::nCell, MemPage::nFree, CellInfo::nKey, MemPage::nOverflow, Btree::pBt, BtCursor::pBtree, MemPage::pDbPage, MemPage::pgno, BtCursor::pgnoRoot, BtShared::pTmpSpace, put4byte, BtShared::readOnly, restoreCursorPosition, saveAllCursors(), saveCursorPosition(), BtCursor::skip, sqlite3BtreeGetTempCursor(), sqlite3BtreeNext(), sqlite3BtreeReleaseTempCursor(), sqlite3PagerWrite(), SQLITE_ERROR, SQLITE_LOCKED, SQLITE_NOMEM, SQLITE_OK, SQLITE_PERM, SQLITE_READONLY, testcase, TRACE, TRANS_WRITE, BtShared::usableSize, VVA_ONLY, and BtCursor::wrFlag.
Referenced by sqlite3VdbeExec().
int sqlite3BtreeDropTable | ( | Btree * | , | |
int | , | |||
int * | ||||
) |
Definition at line 6414 of file btree.c.
References btreeDropTable(), Btree::db, BtShared::db, Btree::pBt, sqlite3BtreeEnter, and sqlite3BtreeLeave.
Referenced by sqlite3VdbeExec().
int sqlite3BtreeEof | ( | BtCursor * | ) |
Definition at line 3884 of file btree.c.
References CURSOR_VALID, and BtCursor::eState.
Referenced by sqlite3VdbeExec().
int sqlite3BtreeFirst | ( | BtCursor * | , | |
int * | pRes | |||
) |
Definition at line 3631 of file btree.c.
References BtCursor::apPage, CURSOR_INVALID, Btree::db, BtCursor::eState, BtCursor::iPage, moveToLeftmost(), moveToRoot(), sqlite3::mutex, MemPage::nCell, BtCursor::pBtree, sqlite3_mutex_held, and SQLITE_OK.
Referenced by sqlite3VdbeExec().
int sqlite3BtreeFlags | ( | BtCursor * | ) |
Definition at line 6531 of file btree.c.
References MemPage::aData, BtCursor::apPage, MemPage::hdrOffset, BtCursor::iPage, BtCursor::pBt, MemPage::pBt, and restoreCursorPosition.
Referenced by sqlite3VdbeExec().
int sqlite3BtreeGetAutoVacuum | ( | Btree * | ) |
Definition at line 1703 of file btree.c.
References BtShared::autoVacuum, BTREE_AUTOVACUUM_FULL, BTREE_AUTOVACUUM_INCR, BTREE_AUTOVACUUM_NONE, BtShared::incrVacuum, Btree::pBt, sqlite3BtreeEnter, and sqlite3BtreeLeave.
Referenced by sqlite3Pragma(), and sqlite3RunVacuum().
const char* sqlite3BtreeGetDirname | ( | Btree * | ) |
Definition at line 7027 of file btree.c.
References Btree::pBt, BtShared::pPager, and sqlite3PagerDirname().
Referenced by vdbeCommit().
const char* sqlite3BtreeGetFilename | ( | Btree * | ) |
Definition at line 7016 of file btree.c.
References Btree::pBt, BtShared::pPager, and sqlite3PagerFilename().
Referenced by sqlite3Pragma(), and vdbeCommit().
const char* sqlite3BtreeGetJournalname | ( | Btree * | ) |
Definition at line 7040 of file btree.c.
References Btree::pBt, BtShared::pPager, and sqlite3PagerJournalname().
Referenced by vdbeCommit().
Definition at line 6434 of file btree.c.
References MemPage::aData, Btree::db, BtShared::db, get4byte, lockTable(), Btree::pBt, BtShared::pPage1, BtShared::pPager, queryTableLock(), READ_LOCK, BtShared::readOnly, sqlite3BtreeEnter, sqlite3BtreeLeave, sqlite3PagerGet, sqlite3PagerGetData(), sqlite3PagerUnref(), and SQLITE_OK.
Referenced by btreeCreateTable(), btreeDropTable(), schemaIsValid(), sqlite3InitOne(), sqlite3RunVacuum(), and sqlite3VdbeExec().
int sqlite3BtreeGetPageSize | ( | Btree * | ) |
Definition at line 1649 of file btree.c.
References BtShared::pageSize, and Btree::pBt.
Referenced by sqlite3Pragma(), and sqlite3RunVacuum().
int sqlite3BtreeGetReserve | ( | Btree * | ) |
Definition at line 1652 of file btree.c.
References BtShared::pageSize, Btree::pBt, sqlite3BtreeEnter, sqlite3BtreeLeave, and BtShared::usableSize.
Referenced by sqlite3RunVacuum().
int sqlite3BtreeIncrVacuum | ( | Btree * | ) |
Definition at line 2352 of file btree.c.
References BtShared::autoVacuum, Btree::db, BtShared::db, incrVacuumStep(), Btree::inTrans, BtShared::inTransaction, invalidateAllOverflowCache(), Btree::pBt, sqlite3BtreeEnter, sqlite3BtreeLeave, SQLITE_DONE, and TRANS_WRITE.
Referenced by sqlite3VdbeExec().
int sqlite3BtreeInsert | ( | BtCursor * | , | |
const void * | pKey, | |||
i64 | nKey, | |||
const void * | pData, | |||
int | nData, | |||
int | nZero, | |||
int | bias | |||
) |
Definition at line 5760 of file btree.c.
References BtCursor::aiIdx, allocateTempSpace(), BtCursor::apPage, balance(), cellSizePtr(), checkReadLocks(), clearCell(), CURSOR_FAULT, CURSOR_VALID, dropCell(), BtCursor::eState, fillInCell(), findCell, BtCursor::info, insertCell(), MemPage::intKey, BtShared::inTransaction, BtCursor::iPage, MemPage::isInit, MemPage::leaf, moveToRoot(), MX_CELL_SIZE, CellInfo::nSize, Btree::pBt, BtCursor::pBtree, MemPage::pDbPage, MemPage::pgno, BtCursor::pgnoRoot, BtShared::pTmpSpace, BtShared::readOnly, saveAllCursors(), BtCursor::skip, sqlite3BtreeClearCursor(), sqlite3BtreeMoveto(), sqlite3PagerWrite(), SQLITE_ERROR, SQLITE_LOCKED, SQLITE_NOMEM, SQLITE_OK, SQLITE_PERM, SQLITE_READONLY, TRACE, TRANS_WRITE, BtCursor::validNKey, and BtCursor::wrFlag.
Referenced by sqlite3VdbeExec().
char* sqlite3BtreeIntegrityCheck | ( | Btree * | , | |
int * | aRoot, | |||
int | nRoot, | |||
int | , | |||
int * | ||||
) |
Definition at line 6894 of file btree.c.
References MemPage::aData, IntegrityCk::anRef, BtShared::autoVacuum, checkAppendMsg(), checkList(), checkPtrmap(), checkTreePage(), Btree::db, BtShared::db, IntegrityCk::errMsg, get4byte, lockBtreeWithRetry(), IntegrityCk::mallocFailed, IntegrityCk::mxErr, IntegrityCk::nErr, IntegrityCk::nPage, BtShared::nTrunc, pagerPagecount(), IntegrityCk::pBt, Btree::pBt, PENDING_BYTE_PAGE, BtShared::pPage1, IntegrityCk::pPager, BtShared::pPager, PTRMAP_PAGENO, PTRMAP_ROOTPAGE, sqlite3_free(), sqlite3BtreeEnter, sqlite3BtreeLeave, sqlite3DbStrDup(), sqlite3Malloc(), sqlite3PagerRefcount(), sqlite3StrAccumFinish(), sqlite3StrAccumInit(), sqlite3StrAccumReset(), SQLITE_OK, and unlockBtreeIfUnused().
Referenced by sqlite3VdbeExec().
int sqlite3BtreeIsInReadTrans | ( | Btree * | ) |
Definition at line 7286 of file btree.c.
References Btree::db, Btree::inTrans, sqlite3::mutex, sqlite3_mutex_held, and TRANS_NONE.
Referenced by detachFunc(), and invalidateTempStorage().
int sqlite3BtreeIsInStmt | ( | Btree * | ) |
Definition at line 7278 of file btree.c.
References BtShared::inStmt, and Btree::pBt.
Referenced by sqlite3VdbeExec().
int sqlite3BtreeIsInTrans | ( | Btree * | ) |
Definition at line 7270 of file btree.c.
References Btree::db, Btree::inTrans, sqlite3::mutex, sqlite3_mutex_held, and TRANS_WRITE.
Referenced by invalidateCursorsOnModifiedBtrees(), sqlite3RollbackAll(), sqlite3RunVacuum(), sqlite3VdbeExec(), and vdbeCommit().
Definition at line 3314 of file btree.c.
References accessPayload(), BtCursor::aiIdx, BtCursor::apPage, CURSOR_VALID, BtCursor::eState, MemPage::intKey, BtCursor::iPage, MemPage::nCell, restoreCursorPosition, SQLITE_CORRUPT_BKPT, and SQLITE_OK.
Referenced by saveCursorPosition(), sqlite3BtreeMovetoUnpacked(), sqlite3VdbeExec(), and sqlite3VdbeMemFromBtree().
const void* sqlite3BtreeKeyFetch | ( | BtCursor * | , | |
int * | pAmt | |||
) |
Definition at line 3430 of file btree.c.
References CURSOR_VALID, BtCursor::eState, and fetchPayload().
Referenced by sqlite3VdbeExec(), and sqlite3VdbeMemFromBtree().
Definition at line 2982 of file btree.c.
References CURSOR_INVALID, CURSOR_VALID, BtCursor::eState, getCellInfo, BtCursor::info, CellInfo::nKey, restoreCursorPosition, and SQLITE_OK.
Referenced by saveCursorPosition(), sqlite3VdbeExec(), sqlite3VdbeIdxKeyCompare(), and sqlite3VdbeIdxRowid().
int sqlite3BtreeLast | ( | BtCursor * | , | |
int * | pRes | |||
) |
Definition at line 3655 of file btree.c.
References BtCursor::apPage, BtCursor::atLast, CURSOR_INVALID, CURSOR_VALID, Btree::db, BtCursor::eState, getCellInfo, BtCursor::iPage, moveToRightmost(), moveToRoot(), sqlite3::mutex, MemPage::nCell, BtCursor::pBtree, sqlite3_mutex_held, and SQLITE_OK.
Referenced by sqlite3VdbeExec().
Definition at line 7342 of file btree.c.
References lockTable(), queryTableLock(), READ_LOCK, Btree::sharable, sqlite3BtreeEnter, sqlite3BtreeLeave, SQLITE_OK, and WRITE_LOCK.
Referenced by sqlite3VdbeExec().
int sqlite3BtreeMaxPageCount | ( | Btree * | , | |
int | ||||
) |
Definition at line 1665 of file btree.c.
References Btree::pBt, BtShared::pPager, sqlite3BtreeEnter, sqlite3BtreeLeave, and sqlite3PagerMaxPageCount().
Referenced by sqlite3Pragma().
Definition at line 3851 of file btree.c.
References BtCursor::pKeyInfo, sqlite3BtreeMovetoUnpacked(), sqlite3VdbeDeleteUnpackedRecord(), sqlite3VdbeRecordUnpack(), and SQLITE_NOMEM.
Referenced by sqlite3BtreeInsert(), and sqlite3BtreeRestoreCursorPosition().
int sqlite3BtreeMovetoUnpacked | ( | BtCursor * | , | |
UnpackedRecord * | pUnKey, | |||
i64 | intKey, | |||
int | bias, | |||
int * | pRes | |||
) |
Definition at line 3703 of file btree.c.
References MemPage::aData, BtCursor::aiIdx, BtCursor::apPage, BtCursor::atLast, MemPage::childPtrSize, CURSOR_INVALID, CURSOR_VALID, Btree::db, BtCursor::eState, fetchPayload(), findCell, get4byte, getVarint, getVarint32, MemPage::hasData, MemPage::hdrOffset, BtCursor::info, MemPage::intKey, BtCursor::iPage, MemPage::isInit, MemPage::leaf, moveToChild(), moveToRoot(), sqlite3::mutex, MemPage::nCell, CellInfo::nKey, CellInfo::nSize, BtCursor::pBtree, sqlite3_free(), sqlite3_mutex_held, sqlite3BtreeKey(), sqlite3Malloc(), sqlite3VdbeRecordCompare(), SQLITE_CORRUPT_BKPT, SQLITE_NOMEM, SQLITE_OK, and BtCursor::validNKey.
Referenced by sqlite3BtreeMoveto(), sqlite3VdbeCursorMoveto(), and sqlite3VdbeExec().
int sqlite3BtreeNext | ( | BtCursor * | , | |
int * | pRes | |||
) |
Definition at line 3906 of file btree.c.
References MemPage::aData, BtCursor::aiIdx, BtCursor::apPage, CURSOR_INVALID, BtCursor::eState, get4byte, MemPage::hdrOffset, BtCursor::info, MemPage::intKey, BtCursor::iPage, MemPage::isInit, MemPage::leaf, moveToChild(), moveToLeftmost(), MemPage::nCell, CellInfo::nSize, restoreCursorPosition, BtCursor::skip, sqlite3BtreeMoveToParent(), sqlite3BtreeNext(), SQLITE_OK, and BtCursor::validNKey.
Referenced by sqlite3BtreeDelete(), sqlite3BtreeNext(), sqlite3VdbeCursorMoveto(), and sqlite3VdbeExec().
Definition at line 1215 of file btree.c.
References sqlite3::aDb, BtShared::autoVacuum, BtShared::busyHdr, Btree::db, EXTRA_SIZE, sqlite3::flags, get2byte, get4byte, GLOBAL, BtShared::incrVacuum, Btree::inTrans, sqlite3::mallocFailed, BtShared::mutex, sqlite3::mutex, sqlite3_vfs::mxPathname, sqlite3::nDb, BtShared::nRef, pageReinit(), BtShared::pageSize, BtShared::pageSizeFixed, BusyHandler::pArg, Db::pBt, Btree::pBt, BtShared::pCursor, Btree::pNext, BtShared::pNext, BtShared::pPage1, BtShared::pPager, Btree::pPrev, sqlite3::pVfs, BtShared::readOnly, Btree::sharable, sqlite3_free(), sqlite3_mutex_enter, sqlite3_mutex_held, sqlite3_mutex_leave, sqlite3BtreeInvokeBusyHandler(), sqlite3GlobalConfig, sqlite3Malloc(), sqlite3MallocZero(), sqlite3MutexAlloc, sqlite3OsFullPathname(), sqlite3PagerClose(), sqlite3PagerFilename(), sqlite3PagerIsreadonly(), sqlite3PagerOpen(), sqlite3PagerReadFileheader(), sqlite3PagerSetBusyhandler(), sqlite3PagerSetPagesize(), sqlite3PagerSetReiniter(), sqlite3PagerVfs(), sqlite3SharedCacheList, SQLITE_DEFAULT_AUTOVACUUM, SQLITE_MAX_PAGE_SIZE, SQLITE_MUTEX_FAST, SQLITE_MUTEX_STATIC_MASTER, SQLITE_NOMEM, SQLITE_OK, SQLITE_SharedCache, SQLITE_THREADSAFE, SQLITE_Vtab, TRANS_NONE, BtShared::usableSize, and BusyHandler::xFunc.
Referenced by sqlite3BtreeFactory().
Definition at line 6548 of file btree.c.
References Btree::pBt, and BtShared::pPager.
Referenced by attachFunc(), openDatabase(), sqlite3_file_control(), sqlite3OpenTempDatabase(), sqlite3Pragma(), sqlite3RunVacuum(), and sqlite3VdbeExec().
int sqlite3BtreePrevious | ( | BtCursor * | , | |
int * | pRes | |||
) |
Definition at line 3975 of file btree.c.
References BtCursor::aiIdx, BtCursor::apPage, BtCursor::atLast, CURSOR_INVALID, BtCursor::eState, findCell, get4byte, BtCursor::info, MemPage::intKey, BtCursor::iPage, MemPage::isInit, MemPage::leaf, moveToChild(), moveToRightmost(), CellInfo::nSize, restoreCursorPosition, BtCursor::skip, sqlite3BtreeMoveToParent(), sqlite3BtreePrevious(), SQLITE_OK, and BtCursor::validNKey.
Referenced by sqlite3BtreePrevious(), and sqlite3VdbeExec().
Definition at line 7367 of file btree.c.
References accessPayload(), BtCursor::apPage, checkReadLocks(), CURSOR_INVALID, CURSOR_REQUIRESEEK, CURSOR_VALID, Btree::db, BtCursor::eState, MemPage::intKey, BtShared::inTransaction, BtCursor::iPage, BtCursor::isIncrblobHandle, sqlite3::mutex, BtCursor::pBt, BtCursor::pBtree, BtCursor::pgnoRoot, BtShared::readOnly, restoreCursorPosition, sqlite3_mutex_held, SQLITE_ABORT, SQLITE_ERROR, SQLITE_LOCKED, SQLITE_READONLY, TRANS_WRITE, and BtCursor::wrFlag.
Referenced by sqlite3_blob_write().
int sqlite3BtreeRollback | ( | Btree * | ) |
Definition at line 2621 of file btree.c.
References btreeIntegrity, Btree::db, BtShared::db, BtShared::inStmt, Btree::inTrans, BtShared::inTransaction, BtShared::nTransaction, BtShared::nTrunc, Btree::pBt, BtShared::pPager, releasePage(), saveAllCursors(), sqlite3BtreeEnter, sqlite3BtreeGetPage(), sqlite3BtreeLeave, sqlite3BtreeTripAllCursors(), sqlite3PagerRollback(), SQLITE_OK, TRANS_NONE, TRANS_READ, TRANS_WRITE, unlockAllTables(), and unlockBtreeIfUnused().
Referenced by btreeCopyFile(), sqlite3BtreeClose(), and sqlite3RollbackAll().
int sqlite3BtreeRollbackStmt | ( | Btree * | ) |
Definition at line 2743 of file btree.c.
References Btree::db, BtShared::db, BtShared::inStmt, Btree::pBt, BtShared::pPager, BtShared::readOnly, sqlite3BtreeEnter, sqlite3BtreeLeave, sqlite3PagerStmtRollback(), and SQLITE_OK.
Referenced by sqlite3VdbeHalt().
void* sqlite3BtreeSchema | ( | Btree * | , | |
int | , | |||
void(*)(void *) | ||||
) |
Definition at line 7311 of file btree.c.
References Btree::pBt, BtShared::pSchema, sqlite3BtreeEnter, sqlite3BtreeLeave, sqlite3MallocZero(), xFree(), and BtShared::xFreeSchema.
Referenced by sqlite3BtreeFactory(), and sqlite3SchemaGet().
int sqlite3BtreeSchemaLocked | ( | Btree * | ) |
Definition at line 7326 of file btree.c.
References Btree::db, MASTER_ROOT, sqlite3::mutex, queryTableLock(), READ_LOCK, sqlite3_mutex_held, sqlite3BtreeEnter, sqlite3BtreeLeave, and SQLITE_OK.
Referenced by sqlite3Prepare().
int sqlite3BtreeSetAutoVacuum | ( | Btree * | , | |
int | ||||
) |
Definition at line 1680 of file btree.c.
References BtShared::autoVacuum, BtShared::pageSizeFixed, Btree::pBt, sqlite3BtreeEnter, sqlite3BtreeLeave, SQLITE_OK, and SQLITE_READONLY.
Referenced by sqlite3Pragma(), and sqlite3RunVacuum().
int sqlite3BtreeSetCacheSize | ( | Btree * | , | |
int | ||||
) |
Definition at line 1563 of file btree.c.
References Btree::db, sqlite3::mutex, Btree::pBt, BtShared::pPager, sqlite3_mutex_held, sqlite3BtreeEnter, sqlite3BtreeLeave, sqlite3PagerSetCachesize(), and SQLITE_OK.
Referenced by sqlite3BtreeFactory(), sqlite3InitOne(), and sqlite3Pragma().
int sqlite3BtreeSetPageSize | ( | Btree * | , | |
int | , | |||
int | ||||
) |
Definition at line 1622 of file btree.c.
References freeTempSpace(), BtShared::pageSize, BtShared::pageSizeFixed, Btree::pBt, BtShared::pCursor, BtShared::pPage1, BtShared::pPager, sqlite3BtreeEnter, sqlite3BtreeLeave, sqlite3PagerSetPagesize(), SQLITE_MAX_PAGE_SIZE, SQLITE_OK, SQLITE_READONLY, and BtShared::usableSize.
Referenced by sqlite3Pragma(), and sqlite3RunVacuum().
int sqlite3BtreeSetSafetyLevel | ( | Btree * | , | |
int | , | |||
int | ||||
) |
Definition at line 1581 of file btree.c.
References Btree::db, sqlite3::mutex, Btree::pBt, BtShared::pPager, sqlite3_mutex_held, sqlite3BtreeEnter, sqlite3BtreeLeave, sqlite3PagerSetSafetyLevel(), and SQLITE_OK.
Referenced by sqlite3Pragma().
int sqlite3BtreeSyncDisabled | ( | Btree * | ) |
Definition at line 1595 of file btree.c.
References Btree::db, sqlite3::mutex, Btree::pBt, BtShared::pPager, sqlite3_mutex_held, sqlite3BtreeEnter, sqlite3BtreeLeave, and sqlite3PagerNosync().
Referenced by vdbeCommit().
void sqlite3BtreeTripAllCursors | ( | Btree * | , | |
int | ||||
) |
Definition at line 2601 of file btree.c.
References CURSOR_FAULT, BtCursor::eState, Btree::pBt, BtShared::pCursor, BtCursor::pNext, BtCursor::skip, sqlite3BtreeClearCursor(), sqlite3BtreeEnter, and sqlite3BtreeLeave.
Referenced by invalidateCursorsOnModifiedBtrees(), and sqlite3BtreeRollback().
Definition at line 6499 of file btree.c.
References MemPage::aData, BtShared::autoVacuum, Btree::db, BtShared::db, BtShared::incrVacuum, Btree::inTrans, Btree::pBt, MemPage::pDbPage, BtShared::pPage1, put4byte, BtShared::readOnly, sqlite3BtreeEnter, sqlite3BtreeLeave, sqlite3PagerWrite(), SQLITE_ERROR, SQLITE_OK, SQLITE_READONLY, and TRANS_WRITE.
Referenced by btreeCreateTable(), btreeDropTable(), sqlite3RunVacuum(), and sqlite3VdbeExec().
ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:58 2011 by Doxygen 1.6.1