vdbe.c File Reference

Go to the source code of this file.

Defines

#define UPDATE_MAX_BLOBSIZE(P)
#define Stringify(P, enc)
#define Deephemeralize(P)
#define ExpandBlob(P)   (((P)->flags&MEM_Zero)?sqlite3VdbeMemExpandBlob(P):0)
#define storeTypeInfo(A, B)   _storeTypeInfo(A)
#define REGISTER_TRACE(R, M)
#define CHECK_FOR_INTERRUPT   if( db->u1.isInterrupted ) goto abort_due_to_interrupt;
#define MAX_ROWID   ( (((u64)0x7fffffff)<<32) | (u64)0xffffffff )

Functions

static void _storeTypeInfo (Mem *pMem)
int sqlite3VdbeOpcodeHasProperty (int opcode, int mask)
static VdbeCursorallocateCursor (Vdbe *p, int iCur, Op *pOp, int iDb, int isBtreeCursor)
static void applyNumericAffinity (Mem *pRec)
static void applyAffinity (Mem *pRec, char affinity, u8 enc)
int sqlite3_value_numeric_type (sqlite3_value *pVal)
void sqlite3ValueApplyAffinity (sqlite3_value *pVal, u8 affinity, u8 enc)
int sqlite3VdbeExec (Vdbe *p)

Variables

static const unsigned char opcodeProperty [] = OPFLG_INITIALIZER

Define Documentation

#define CHECK_FOR_INTERRUPT   if( db->u1.isInterrupted ) goto abort_due_to_interrupt;

Definition at line 482 of file vdbe.c.

Referenced by sqlite3VdbeExec().

#define Deephemeralize (  ) 
Value:
if( ((P)->flags&MEM_Ephem)!=0 \
       && sqlite3VdbeMemMakeWriteable(P) ){ goto no_mem;}

Definition at line 131 of file vdbe.c.

Referenced by sqlite3VdbeExec().

#define ExpandBlob (  )     (((P)->flags&MEM_Zero)?sqlite3VdbeMemExpandBlob(P):0)

Definition at line 139 of file vdbe.c.

Referenced by sqlite3VdbeExec().

#define MAX_ROWID   ( (((u64)0x7fffffff)<<32) | (u64)0xffffffff )

Referenced by sqlite3VdbeExec().

#define REGISTER_TRACE ( R,
 ) 

Definition at line 458 of file vdbe.c.

Referenced by sqlite3VdbeExec().

#define storeTypeInfo ( A,
 )     _storeTypeInfo(A)

Definition at line 148 of file vdbe.c.

Referenced by sqlite3_value_numeric_type(), and sqlite3VdbeExec().

#define Stringify ( P,
enc   ) 
Value:
if(((P)->flags&(MEM_Str|MEM_Blob))==0 && sqlite3VdbeMemStringify(P,enc)) \
     { goto no_mem; }

Definition at line 116 of file vdbe.c.

Referenced by sqlite3VdbeExec().

#define UPDATE_MAX_BLOBSIZE (  ) 

Definition at line 109 of file vdbe.c.

Referenced by sqlite3VdbeExec().


Function Documentation

static void _storeTypeInfo ( Mem pMem  )  [static]
static VdbeCursor* allocateCursor ( Vdbe p,
int  iCur,
Op pOp,
int  iDb,
int  isBtreeCursor 
) [static]
static void applyAffinity ( Mem pRec,
char  affinity,
u8  enc 
) [static]
static void applyNumericAffinity ( Mem pRec  )  [static]
int sqlite3_value_numeric_type ( sqlite3_value pVal  ) 

Definition at line 326 of file vdbe.c.

References applyNumericAffinity(), storeTypeInfo, and Mem::type.

Referenced by sumStep().

void sqlite3ValueApplyAffinity ( sqlite3_value pVal,
u8  affinity,
u8  enc 
)

Definition at line 337 of file vdbe.c.

References applyAffinity().

Referenced by sqlite3ValueFromExpr().

int sqlite3VdbeExec ( Vdbe p  ) 

Definition at line 533 of file vdbe.c.

References KeyInfo::aColl, Vdbe::aCounter, sqlite3::activeVdbeCnt, sqlite3::aDb, VdbeOp::ai, sqlite3::aLimit, allocateCursor(), UnpackedRecord::aMem, Vdbe::aMem, Vdbe::aMutex, VdbeCursor::aOffset, Vdbe::aOp, Vdbe::apArg, Vdbe::apCsr, applyAffinity(), applyNumericAffinity(), VdbeCursor::aRow, KeyInfo::aSortOrder, VdbeCursor::atFirst, VdbeCursor::aType, sqlite3::autoCommit, Vdbe::aVar, BTREE_INTKEY, BTREE_LEAFDATA, BTREE_ZERODATA, Vdbe::btreeMask, sqlite3::sqlite3InitInfo::busy, sqlite3::busyHandler, CACHE_STALE, Vdbe::cacheCtr, VdbeCursor::cacheStatus, CHECK_FOR_INTERRUPT, Vdbe::contextStack, Vdbe::contextStackDepth, Vdbe::contextStackTop, Fifo::db, InitData::db, Mem::db, Vdbe::db, db, DB_SchemaLoaded, DbHasProperty, Deephemeralize, VdbeCursor::deferredMoveto, KeyInfo::enc, Mem::enc, ENC, VdbeCursor::ephemPseudoTable, Vdbe::errorAction, ExpandBlob, Vdbe::expired, Vdbe::explain, Schema::file_format, UnpackedRecord::flags, FuncDef::flags, Mem::flags, sqlite3::flags, getVarint32, VdbeOp::i, Mem::i, InitData::iDb, VdbeCursor::iDb, VdbeCursor::iKey, sqlite3::init, intToKey, Vdbe::inVtabMethod, sqlite3_context::isError, VdbeCursor::isIndex, sqlite3::isInterrupted, VdbeCursor::isTable, keyToInt, Context::lastRowid, sqlite3::lastRowid, VdbeCursor::lastRowid, sqlite3::magic, Vdbe::magic, sqlite3::mallocFailed, MASTER_ROOT, MAX_ROWID, MEM_Agg, MEM_Int, MEM_Null, MEM_Real, MEM_Term, MEM_Zero, MemSetTypeFlag, Vdbe::minWriteFileFormat, VdbeCursor::movetoTarget, Mem::n, BusyHandler::nBusy, Vdbe::nCallback, Context::nChange, Vdbe::nChange, Vdbe::nCursor, VdbeCursor::nData, sqlite3::nDb, VdbeCursor::nextRowid, VdbeCursor::nextRowidValid, UnpackedRecord::nField, VdbeCursor::nField, Vdbe::nMem, Vdbe::nOp, sqlite3::nProgressOps, Vdbe::nResColumn, VdbeCursor::nullRow, OE_Abort, OP_Add, OP_AddImm, OP_Affinity, OP_AggFinal, OP_AggStep, OP_And, OP_AutoCommit, OP_BitAnd, OP_BitNot, OP_BitOr, OP_Blob, OP_Clear, OP_Close, OP_CollSeq, OP_Column, OP_Compare, OP_Concat, OP_ContextPop, OP_ContextPush, OP_Copy, OP_CreateIndex, OP_CreateTable, OP_Delete, OP_Destroy, OP_Divide, OP_DropIndex, OP_DropTable, OP_DropTrigger, OP_Eq, OP_Expire, OP_FifoRead, OP_FifoWrite, OP_ForceInt, OP_Found, OP_Function, OP_Ge, OP_Gosub, OP_Goto, OP_Gt, OP_Halt, OP_IdxDelete, OP_IdxGE, OP_IdxInsert, OP_IdxLT, OP_IdxRowid, OP_If, OP_IfNeg, OP_IfNot, OP_IfPos, OP_IfZero, OP_IncrVacuum, OP_Insert, OP_Int64, OP_Integer, OP_IntegrityCk, OP_IsNull, OP_IsUnique, OP_Jump, OP_Last, OP_Le, OP_LoadAnalysis, OP_Lt, OP_MakeRecord, OP_MemMax, OP_Move, OP_MoveGe, OP_MoveGt, OP_MoveLe, OP_MoveLt, OP_Multiply, OP_MustBeInt, OP_Ne, OP_NewRowid, OP_Next, OP_Not, OP_NotExists, OP_NotFound, OP_NotNull, OP_Null, OP_NullRow, OP_OpenEphemeral, OP_OpenPseudo, OP_OpenRead, OP_OpenWrite, OP_Or, OP_Pagecount, OP_ParseSchema, OP_Permutation, OP_Prev, OP_ReadCookie, OP_Real, OP_RealAffinity, OP_Remainder, OP_ResetCount, OP_ResultRow, OP_Return, OP_Rewind, OP_RowData, OP_Rowid, OP_RowKey, OP_SCopy, OP_Sequence, OP_SetCookie, OP_SetNumColumns, OP_ShiftLeft, OP_ShiftRight, OP_Sort, OP_Statement, OP_String, OP_String8, OP_Subtract, OP_TableLock, OP_ToBlob, OP_ToInt, OP_ToNumeric, OP_ToReal, OP_ToText, OP_Trace, OP_Transaction, OP_Vacuum, OP_Variable, OP_VBegin, OP_VColumn, OP_VCreate, OP_VDestroy, OP_VerifyCookie, OP_VFilter, OP_VNext, OP_VOpen, OP_VRename, OP_VRowid, OP_VUpdate, OP_Yield, VdbeOp::opcode, Vdbe::openedStatement, OPFLAG_APPEND, OPFLAG_ISUPDATE, OPFLAG_LASTROWID, OPFLAG_NCHANGE, OPFLG_IN1, OPFLG_IN2, OPFLG_IN3, OPFLG_OUT2_PRERELEASE, OPFLG_OUT3, VdbeOp::p, VdbeOp::p1, VdbeOp::p2, VdbeOp::p3, VdbeOp::p4, P4_COLLSEQ, P4_DYNAMIC, P4_FUNCDEF, P4_INT32, P4_INTARRAY, P4_KEYINFO, P4_MEM, P4_VDBEFUNC, P4_VTAB, VdbeOp::p4type, VdbeOp::p5, VdbeCursor::payloadSize, VdbeCursor::pBt, Db::pBt, Vdbe::pc, VdbeOp::pColl, sqlite3_context::pColl, VdbeCursor::pCursor, VdbeCursor::pData, VdbeFunc::pFunc, VdbeOp::pFunc, sqlite3_context::pFunc, VdbeOp::pI64, UnpackedRecord::pKeyInfo, VdbeCursor::pKeyInfo, VdbeOp::pKeyInfo, sqlite3_context::pMem, VdbeOp::pMem, VdbeCursor::pModule, sqlite3_vtab::pModule, Vdbe::pNext, sqlite3::pProgressArg, VdbeOp::pReal, Vdbe::pResultSet, sqlite3::priorNewRowid, Db::pSchema, VdbeCursor::pseudoTable, sqlite3::pTraceArg, sqlite3::pUpdateArg, putVarint32, sqlite3::pVdbe, VdbeOp::pVdbeFunc, sqlite3_context::pVdbeFunc, sqlite3_vtab_cursor::pVtab, VdbeOp::pVtab, VdbeCursor::pVtabCursor, InitData::pzErrMsg, Mem::r, InitData::rc, Vdbe::rc, REGISTER_TRACE, VdbeCursor::rowidIsValid, sqlite3_context::s, Schema::schema_cookie, SCHEMA_TABLE, VdbeCursor::seqCount, Context::sFifo, Vdbe::sFifo, SMALLEST_INT64, sqlite3_exec(), sqlite3_free(), sqlite3_interrupt(), sqlite3_randomness(), sqlite3_value_text(), sqlite3AnalysisLoad(), sqlite3BeginBenignMalloc(), sqlite3BtreeBeginStmt(), sqlite3BtreeBeginTrans(), sqlite3BtreeClearCursor(), sqlite3BtreeClearTable(), sqlite3BtreeCreateTable(), sqlite3BtreeCursor(), sqlite3BtreeData(), sqlite3BtreeDataFetch(), sqlite3BtreeDataSize(), sqlite3BtreeDelete(), sqlite3BtreeDropTable(), sqlite3BtreeEof(), sqlite3BtreeFactory(), sqlite3BtreeFirst(), sqlite3BtreeFlags(), sqlite3BtreeGetMeta(), sqlite3BtreeIncrVacuum(), sqlite3BtreeInsert(), sqlite3BtreeIntegrityCheck(), sqlite3BtreeIsInStmt(), sqlite3BtreeIsInTrans(), sqlite3BtreeKey(), sqlite3BtreeKeyFetch(), sqlite3BtreeKeySize(), sqlite3BtreeLast(), sqlite3BtreeLockTable(), sqlite3BtreeMovetoUnpacked(), sqlite3BtreeMutexArrayEnter, sqlite3BtreeMutexArrayLeave, sqlite3BtreeNext(), sqlite3BtreePager(), sqlite3BtreePrevious(), sqlite3BtreeUpdateMeta(), sqlite3DbFree(), sqlite3DbMallocRaw(), sqlite3DbReallocOrFree(), sqlite3DbStrDup(), sqlite3EndBenignMalloc(), sqlite3ErrStr(), sqlite3ExpirePreparedStatements(), sqlite3Hwtime(), sqlite3InitCallback(), sqlite3IsNaN(), sqlite3Malloc(), sqlite3MemCompare(), sqlite3MPrintf(), sqlite3PagerPagecount(), sqlite3ResetInternalSchema(), sqlite3RollbackAll(), sqlite3RootPageMoved(), sqlite3RunVacuum(), sqlite3SafetyOff, sqlite3SafetyOn, sqlite3SetString(), sqlite3UnlinkAndDeleteIndex(), sqlite3UnlinkAndDeleteTable(), sqlite3UnlinkAndDeleteTrigger(), sqlite3VarintLen(), sqlite3VdbeChangeEncoding(), sqlite3VdbeCursorMoveto(), sqlite3VdbeDeleteAuxData(), sqlite3VdbeDeleteUnpackedRecord(), sqlite3VdbeFifoClear(), sqlite3VdbeFifoInit(), sqlite3VdbeFifoPop(), sqlite3VdbeFifoPush(), sqlite3VdbeFreeCursor(), sqlite3VdbeHalt(), sqlite3VdbeIdxKeyCompare(), sqlite3VdbeIdxRowid(), sqlite3VdbeIntegerAffinity(), sqlite3VdbeIntValue(), sqlite3VdbeIOTraceSql, sqlite3VdbeMemExpandBlob(), sqlite3VdbeMemFinalize(), sqlite3VdbeMemFromBtree(), sqlite3VdbeMemGrow(), sqlite3VdbeMemIntegerify(), sqlite3VdbeMemMakeWriteable(), sqlite3VdbeMemMove(), sqlite3VdbeMemNulTerminate(), sqlite3VdbeMemNumerify(), sqlite3VdbeMemRealify(), sqlite3VdbeMemRelease(), sqlite3VdbeMemReleaseExternal(), sqlite3VdbeMemSetNull(), sqlite3VdbeMemSetStr(), sqlite3VdbeMemShallowCopy(), sqlite3VdbeMemTooBig(), sqlite3VdbeRealValue(), sqlite3VdbeRecordUnpack(), sqlite3VdbeSerialGet(), sqlite3VdbeSerialPut(), sqlite3VdbeSerialType(), sqlite3VdbeSerialTypeLen(), sqlite3VdbeSetChanges(), sqlite3VtabBegin(), sqlite3VtabCallCreate(), sqlite3VtabCallDestroy(), sqlite3VtabLock(), sqlite3VtabUnlock(), SQLITE_AFF_MASK, SQLITE_AFF_NUMERIC, SQLITE_AFF_TEXT, SQLITE_BUSY, SQLITE_CORRUPT_BKPT, SQLITE_DEFAULT_TEMP_CACHE_SIZE, SQLITE_DELETE, SQLITE_DONE, SQLITE_EMPTY, SQLITE_ERROR, SQLITE_FULL, SQLITE_FUNC_NEEDCOLL, SQLITE_INSERT, SQLITE_InternChanges, SQLITE_INTERRUPT, SQLITE_IOERR_NOMEM, SQLITE_JUMPIFNULL, SQLITE_LIMIT_LENGTH, SQLITE_LOCKED, SQLITE_MAGIC_BUSY, SQLITE_MAX_LENGTH, SQLITE_MISMATCH, SQLITE_MISUSE, SQLITE_N_BTREE_META, SQLITE_NOMEM, SQLITE_OK, SQLITE_OPEN_CREATE, SQLITE_OPEN_DELETEONCLOSE, SQLITE_OPEN_EXCLUSIVE, SQLITE_OPEN_READWRITE, SQLITE_OPEN_TRANSIENT_DB, SQLITE_READONLY, SQLITE_ROW, SQLITE_SCHEMA, SQLITE_SqlTrace, SQLITE_STATIC, SQLITE_STMTSTATUS_SORT, SQLITE_STOREP2, SQLITE_TOOBIG, SQLITE_UPDATE, SQLITE_UTF8, SQLITE_VdbeListing, storeTypeInfo, Stringify, Mem::u, sqlite3::u1, UNPACKED_IGNORE_ROWID, UNPACKED_INCRKEY, UNPACKED_PREFIX_MATCH, UPDATE_MAX_BLOBSIZE, VdbeCursor::useRandomRowid, VDBE_MAGIC_RUN, sqlite3::writeVdbeCnt, sqlite3_module::xClose, sqlite3_module::xColumn, Mem::xDel, sqlite3_module::xEof, sqlite3_module::xFilter, FuncDef::xFunc, sqlite3_module::xNext, sqlite3_module::xOpen, sqlite3::xProgress, sqlite3_module::xRename, sqlite3_module::xRowid, FuncDef::xStep, sqlite3::xTrace, sqlite3_module::xUpdate, sqlite3::xUpdateCallback, Mem::z, VdbeOp::z, sqlite3_vtab::zErrMsg, Vdbe::zErrMsg, Mem::zMalloc, and Db::zName.

Referenced by sqlite3Step().

int sqlite3VdbeOpcodeHasProperty ( int  opcode,
int  mask 
)

Definition at line 179 of file vdbe.c.

Referenced by resolveP2Values(), and sqlite3VdbeAddOpList().


Variable Documentation

const unsigned char opcodeProperty[] = OPFLG_INITIALIZER [static]

Definition at line 173 of file vdbe.c.


ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:50:02 2011 by Doxygen 1.6.1