Go to the source code of this file.
Defines | |
#define | exprSetHeight(y) |
#define | sqlite3_enable_in_opt 1 |
Functions | |
char | sqlite3ExprAffinity (Expr *pExpr) |
Expr * | sqlite3ExprSetColl (Parse *pParse, Expr *pExpr, Token *pCollName) |
CollSeq * | sqlite3ExprCollSeq (Parse *pParse, Expr *pExpr) |
char | sqlite3CompareAffinity (Expr *pExpr, char aff2) |
static char | comparisonAffinity (Expr *pExpr) |
int | sqlite3IndexAffinityOk (Expr *pExpr, char idx_affinity) |
static u8 | binaryCompareP5 (Expr *pExpr1, Expr *pExpr2, int jumpIfNull) |
CollSeq * | sqlite3BinaryCompareCollSeq (Parse *pParse, Expr *pLeft, Expr *pRight) |
static void | codeCompareOperands (Parse *pParse, Expr *pLeft, int *pRegLeft, int *pFreeLeft, Expr *pRight, int *pRegRight, int *pFreeRight) |
static int | codeCompare (Parse *pParse, Expr *pLeft, Expr *pRight, int opcode, int in1, int in2, int dest, int jumpIfNull) |
Expr * | sqlite3Expr (sqlite3 *db, int op, Expr *pLeft, Expr *pRight, const Token *pToken) |
Expr * | sqlite3PExpr (Parse *pParse, int op, Expr *pLeft, Expr *pRight, const Token *pToken) |
Expr * | sqlite3RegisterExpr (Parse *pParse, Token *pToken) |
Expr * | sqlite3ExprAnd (sqlite3 *db, Expr *pLeft, Expr *pRight) |
void | sqlite3ExprSpan (Expr *pExpr, Token *pLeft, Token *pRight) |
Expr * | sqlite3ExprFunction (Parse *pParse, ExprList *pList, Token *pToken) |
void | sqlite3ExprAssignVarNumber (Parse *pParse, Expr *pExpr) |
void | sqlite3ExprClear (sqlite3 *db, Expr *p) |
void | sqlite3ExprDelete (sqlite3 *db, Expr *p) |
void | sqlite3DequoteExpr (sqlite3 *db, Expr *p) |
Expr * | sqlite3ExprDup (sqlite3 *db, Expr *p) |
void | sqlite3TokenCopy (sqlite3 *db, Token *pTo, Token *pFrom) |
ExprList * | sqlite3ExprListDup (sqlite3 *db, ExprList *p) |
SrcList * | sqlite3SrcListDup (sqlite3 *db, SrcList *p) |
IdList * | sqlite3IdListDup (sqlite3 *db, IdList *p) |
Select * | sqlite3SelectDup (sqlite3 *db, Select *p) |
ExprList * | sqlite3ExprListAppend (Parse *pParse, ExprList *pList, Expr *pExpr, Token *pName) |
void | sqlite3ExprListCheckLength (Parse *pParse, ExprList *pEList, const char *zObject) |
void | sqlite3ExprListDelete (sqlite3 *db, ExprList *pList) |
static int | exprNodeIsConstant (Walker *pWalker, Expr *pExpr) |
static int | selectNodeIsConstant (Walker *pWalker, Select *pSelect) |
static int | exprIsConst (Expr *p, int initFlag) |
int | sqlite3ExprIsConstant (Expr *p) |
int | sqlite3ExprIsConstantNotJoin (Expr *p) |
int | sqlite3ExprIsConstantOrFunction (Expr *p) |
int | sqlite3ExprIsInteger (Expr *p, int *pValue) |
int | sqlite3IsRowid (const char *z) |
static int | isCandidateForInOpt (Select *p) |
int | sqlite3FindInIndex (Parse *pParse, Expr *pX, int *prNotFound) |
void | sqlite3CodeSubselect (Parse *pParse, Expr *pExpr, int rMayHaveNull, int isRowid) |
static char * | dup8bytes (Vdbe *v, const char *in) |
static void | codeReal (Vdbe *v, const char *z, int n, int negateFlag, int iMem) |
static void | codeInteger (Vdbe *v, Expr *pExpr, int negFlag, int iMem) |
int | sqlite3ExprCodeGetColumn (Parse *pParse, Table *pTab, int iColumn, int iTable, int iReg, int allowAffChng) |
void | sqlite3ExprClearColumnCache (Parse *pParse, int iTable) |
void | sqlite3ExprCacheAffinityChange (Parse *pParse, int iStart, int iCount) |
void | sqlite3ExprCodeMove (Parse *pParse, int iFrom, int iTo, int nReg) |
void | sqlite3ExprCodeCopy (Parse *pParse, int iFrom, int iTo, int nReg) |
static int | usedAsColumnCache (Parse *pParse, int iFrom, int iTo) |
int | sqlite3ExprWritableRegister (Parse *pParse, int iCurrent, int iTarget) |
void | sqlite3ExprHardCopy (Parse *pParse, int iReg, int nReg) |
static int | codeAlias (Parse *pParse, int iAlias, Expr *pExpr, int target) |
int | sqlite3ExprCodeTarget (Parse *pParse, Expr *pExpr, int target) |
int | sqlite3ExprCodeTemp (Parse *pParse, Expr *pExpr, int *pReg) |
int | sqlite3ExprCode (Parse *pParse, Expr *pExpr, int target) |
int | sqlite3ExprCodeAndCache (Parse *pParse, Expr *pExpr, int target) |
static int | isAppropriateForFactoring (Expr *p) |
static int | evalConstExpr (Walker *pWalker, Expr *pExpr) |
void | sqlite3ExprCodeConstants (Parse *pParse, Expr *pExpr) |
int | sqlite3ExprCodeExprList (Parse *pParse, ExprList *pList, int target, int doHardCopy) |
void | sqlite3ExprIfTrue (Parse *pParse, Expr *pExpr, int dest, int jumpIfNull) |
void | sqlite3ExprIfFalse (Parse *pParse, Expr *pExpr, int dest, int jumpIfNull) |
int | sqlite3ExprCompare (Expr *pA, Expr *pB) |
static int | addAggInfoColumn (sqlite3 *db, AggInfo *pInfo) |
static int | addAggInfoFunc (sqlite3 *db, AggInfo *pInfo) |
static int | analyzeAggregate (Walker *pWalker, Expr *pExpr) |
static int | analyzeAggregatesInSelect (Walker *pWalker, Select *pSelect) |
void | sqlite3ExprAnalyzeAggregates (NameContext *pNC, Expr *pExpr) |
void | sqlite3ExprAnalyzeAggList (NameContext *pNC, ExprList *pList) |
int | sqlite3GetTempReg (Parse *pParse) |
void | sqlite3ReleaseTempReg (Parse *pParse, int iReg) |
int | sqlite3GetTempRange (Parse *pParse, int nReg) |
void | sqlite3ReleaseTempRange (Parse *pParse, int iReg, int nReg) |
#define exprSetHeight | ( | y | ) |
Definition at line 374 of file expr.c.
Referenced by sqlite3Expr().
Definition at line 2864 of file expr.c.
References AggInfo::aCol, AggInfo::nColumn, AggInfo::nColumnAlloc, and sqlite3ArrayAllocate().
Referenced by analyzeAggregate().
Definition at line 2882 of file expr.c.
References AggInfo::aFunc, AggInfo::nFunc, AggInfo::nFuncAlloc, and sqlite3ArrayAllocate().
Referenced by analyzeAggregate().
Definition at line 2901 of file expr.c.
References ExprList::a, SrcList::a, AggInfo::aCol, addAggInfoColumn(), addAggInfoFunc(), AggInfo::aFunc, Parse::db, ENC, EP_Distinct, Expr::flags, Expr::iAgg, Expr::iColumn, Expr::iTable, Token::n, AggInfo::nColumn, NameContext::nDepth, ExprList::nExpr, AggInfo::nFunc, Parse::nMem, AggInfo::nSortingColumn, SrcList::nSrc, Parse::nTab, Expr::op, Expr::pAggInfo, NameContext::pAggInfo, AggInfo::AggInfo_func::pExpr, AggInfo::pGroupBy, Expr::pList, Walker::pNC, NameContext::pParse, NameContext::pSrcList, Expr::pTab, AggInfo::AggInfo_col::pTab, sqlite3ExprCompare(), sqlite3FindFunction(), testcase, TK_AGG_COLUMN, TK_AGG_FUNCTION, TK_COLUMN, Expr::token, Walker::u, WRC_Continue, WRC_Prune, and Token::z.
Referenced by sqlite3ExprAnalyzeAggregates().
Definition at line 3018 of file expr.c.
References NameContext::nDepth, Walker::pNC, sqlite3WalkSelect(), Walker::u, WRC_Continue, and WRC_Prune.
Referenced by sqlite3ExprAnalyzeAggregates().
Definition at line 191 of file expr.c.
References sqlite3CompareAffinity(), and sqlite3ExprAffinity().
Referenced by codeCompare().
Definition at line 1723 of file expr.c.
References Parse::aAlias, Parse::db, db, Parse::disableColCache, sqlite3::mallocFailed, Parse::nAlias, Parse::nMem, sqlite3DbMallocZero(), sqlite3ExprCode(), and sqlite3ExprCodeTarget().
Referenced by sqlite3ExprCodeExprList(), and sqlite3ExprCodeTarget().
static int codeCompare | ( | Parse * | pParse, | |
Expr * | pLeft, | |||
Expr * | pRight, | |||
int | opcode, | |||
int | in1, | |||
int | in2, | |||
int | dest, | |||
int | jumpIfNull | |||
) | [static] |
Definition at line 258 of file expr.c.
References binaryCompareP5(), P4_COLLSEQ, Parse::pVdbe, sqlite3BinaryCompareCollSeq(), sqlite3ExprCacheAffinityChange(), sqlite3VdbeAddOp4(), sqlite3VdbeChangeP5(), SQLITE_AFF_MASK, and SQLITE_AFF_NONE.
Referenced by sqlite3ExprCodeTarget(), sqlite3ExprIfFalse(), and sqlite3ExprIfTrue().
static void codeCompareOperands | ( | Parse * | pParse, | |
Expr * | pLeft, | |||
int * | pRegLeft, | |||
int * | pFreeLeft, | |||
Expr * | pRight, | |||
int * | pRegRight, | |||
int * | pFreeRight | |||
) | [static] |
Definition at line 238 of file expr.c.
References EP_AnyAff, Expr::flags, Expr::op, Expr::pLeft, sqlite3ExprCodeTemp(), and TK_UPLUS.
Referenced by sqlite3ExprCodeTarget(), sqlite3ExprIfFalse(), and sqlite3ExprIfTrue().
Definition at line 1486 of file expr.c.
References codeReal(), dup8bytes(), EP_IntValue, Expr::flags, Expr::iTable, Token::n, OP_Int64, OP_Integer, P4_INT64, sqlite3Atoi64(), sqlite3FitsIn64Bits(), sqlite3GetInt32(), sqlite3VdbeAddOp2(), sqlite3VdbeAddOp4(), Expr::token, and Token::z.
Referenced by sqlite3ExprCodeTarget().
static void codeReal | ( | Vdbe * | v, | |
const char * | z, | |||
int | n, | |||
int | negateFlag, | |||
int | iMem | |||
) | [static] |
Definition at line 1460 of file expr.c.
References dup8bytes(), OP_Null, OP_Real, P4_REAL, sqlite3AtoF(), sqlite3IsNaN(), sqlite3VdbeAddOp2(), sqlite3VdbeAddOp4(), and sqlite3VdbeDb().
Referenced by codeInteger(), and sqlite3ExprCodeTarget().
static char comparisonAffinity | ( | Expr * | pExpr | ) | [static] |
Definition at line 150 of file expr.c.
References ExprList::a, Expr::op, Select::pEList, ExprList::ExprList_item::pExpr, Expr::pLeft, Expr::pRight, Expr::pSelect, sqlite3CompareAffinity(), sqlite3ExprAffinity(), SQLITE_AFF_NONE, TK_EQ, TK_GE, TK_GT, TK_IN, TK_LE, TK_LT, and TK_NE.
Referenced by sqlite3ExprCodeTarget(), sqlite3FindInIndex(), and sqlite3IndexAffinityOk().
static char* dup8bytes | ( | Vdbe * | v, | |
const char * | in | |||
) | [static] |
Definition at line 1444 of file expr.c.
References sqlite3DbMallocRaw(), and sqlite3VdbeDb().
Referenced by codeInteger(), and codeReal().
Definition at line 2444 of file expr.c.
References ExprList::a, EP_FixedDest, Expr::flags, isAppropriateForFactoring(), Expr::iTable, ExprList::nExpr, Parse::nMem, Expr::op, ExprList::ExprList_item::pExpr, Expr::pList, Walker::pParse, sqlite3ExprCodeTarget(), sqlite3ReleaseTempReg(), TK_AGG_FUNCTION, TK_CONST_FUNC, TK_FUNCTION, TK_REGISTER, WRC_Continue, and WRC_Prune.
Referenced by sqlite3ExprCodeConstants().
static int exprIsConst | ( | Expr * | p, | |
int | initFlag | |||
) | [static] |
Definition at line 946 of file expr.c.
References exprNodeIsConstant(), Walker::i, selectNodeIsConstant(), sqlite3WalkExpr(), Walker::u, Walker::xExprCallback, and Walker::xSelectCallback.
Referenced by sqlite3ExprIsConstant(), sqlite3ExprIsConstantNotJoin(), and sqlite3ExprIsConstantOrFunction().
Definition at line 904 of file expr.c.
References EP_FromJoin, ExprHasAnyProperty, Walker::i, Expr::op, testcase, TK_AGG_COLUMN, TK_AGG_FUNCTION, TK_COLUMN, TK_DOT, TK_EXISTS, TK_FUNCTION, TK_ID, TK_SELECT, Walker::u, WRC_Abort, and WRC_Continue.
Referenced by exprIsConst().
static int isAppropriateForFactoring | ( | Expr * | p | ) | [static] |
Definition at line 2396 of file expr.c.
References EP_FixedDest, Expr::flags, Expr::op, Expr::pLeft, sqlite3ExprIsConstantNotJoin(), testcase, TK_BLOB, TK_FLOAT, TK_INTEGER, TK_NULL, TK_STRING, TK_UMINUS, TK_UPLUS, and TK_VARIABLE.
Referenced by evalConstExpr().
static int isCandidateForInOpt | ( | Select * | p | ) | [static] |
Definition at line 1056 of file expr.c.
References ExprList::a, SrcList::a, IsVirtual, ExprList::nExpr, SrcList::nSrc, Expr::op, Select::pEList, ExprList::ExprList_item::pExpr, Select::pGroupBy, Select::pLimit, Select::pOffset, Select::pPrior, Table::pSelect, SrcList::SrcList_item::pSelect, Select::pSrc, SrcList::SrcList_item::pTab, Select::pWhere, Select::selFlags, SF_Aggregate, SF_Distinct, and TK_COLUMN.
Referenced by sqlite3FindInIndex().
Definition at line 209 of file expr.c.
References EP_ExpCollate, Expr::flags, Expr::pColl, and sqlite3ExprCollSeq().
Referenced by codeCompare(), findTerm(), sqlite3CodeSubselect(), and sqlite3FindInIndex().
Definition at line 1263 of file expr.c.
References ExprList::a, KeyInfo::aColl, SelectDest::affinity, Parse::db, Parse::disableColCache, SelectDest::eDest, EP_VarSelect, ExprHasAnyProperty, Expr::iColumn, SelectDest::iParm, Expr::iTable, sqlite3::mallocFailed, ExprList::nExpr, KeyInfo::nField, Parse::nMem, Parse::nTab, Expr::op, OP_IdxInsert, OP_If, OP_Insert, OP_Integer, OP_MakeRecord, OP_MustBeInt, OP_Null, OP_OpenEphemeral, P4_KEYINFO, Select::pEList, ExprList::ExprList_item::pExpr, Expr::pLeft, Select::pLimit, Expr::pList, Expr::pSelect, sqlite3BinaryCompareCollSeq(), sqlite3ExprAffinity(), sqlite3ExprCacheAffinityChange(), sqlite3ExprCodeTarget(), sqlite3ExprCollSeq(), sqlite3ExprDelete(), sqlite3ExprIsConstant(), sqlite3GetTempReg(), sqlite3GetVdbe(), sqlite3PExpr(), sqlite3ReleaseTempReg(), sqlite3Select(), sqlite3SelectDestInit(), sqlite3VdbeAddOp1(), sqlite3VdbeAddOp2(), sqlite3VdbeAddOp3(), sqlite3VdbeAddOp4(), sqlite3VdbeChangeP4(), sqlite3VdbeChangeToNoop(), sqlite3VdbeCurrentAddr(), sqlite3VdbeJumpHere(), SQLITE_AFF_NONE, SRT_Exists, SRT_Mem, SRT_Set, TK_EXISTS, TK_IN, TK_INTEGER, TK_SELECT, Parse::trigStack, and VdbeComment.
Referenced by sqlite3ExprCodeTarget(), and sqlite3FindInIndex().
char sqlite3CompareAffinity | ( | Expr * | pExpr, | |
char | aff2 | |||
) |
Definition at line 123 of file expr.c.
References sqlite3ExprAffinity(), sqlite3IsNumericAffinity, SQLITE_AFF_NONE, and SQLITE_AFF_NUMERIC.
Referenced by binaryCompareP5(), comparisonAffinity(), generateOutputSubroutine(), and selectInnerLoop().
Definition at line 631 of file expr.c.
References Token::dyn, EP_Dequoted, ExprHasAnyProperty, ExprSetProperty, sqlite3Dequote(), sqlite3TokenCopy(), Expr::token, and Token::z.
Referenced by isLikeOrGlob(), and sqlite3ExprCodeTarget().
Definition at line 382 of file expr.c.
References Token::dyn, EP_ExpCollate, exprSetHeight, Expr::flags, Expr::iAgg, Expr::op, Expr::pColl, Expr::pLeft, Expr::pRight, Expr::span, sqlite3DbMallocZero(), sqlite3ExprDelete(), sqlite3ExprSpan(), Expr::token, and Token::z.
Referenced by exprAnalyze(), resolveCompoundOrderBy(), sqlite3ExprAnd(), sqlite3PExpr(), and sqlite3SelectNew().
char sqlite3ExprAffinity | ( | Expr * | pExpr | ) |
Definition at line 36 of file expr.c.
References ExprList::a, Table::aCol, Expr::affinity, Column::affinity, Expr::iColumn, Table::nCol, Expr::op, Select::pEList, ExprList::ExprList_item::pExpr, Expr::pSelect, Expr::pTab, sqlite3AffinityType(), sqlite3ExprAffinity(), SQLITE_AFF_INTEGER, TK_AGG_COLUMN, TK_CAST, TK_COLUMN, TK_REGISTER, TK_SELECT, and Expr::token.
Referenced by binaryCompareP5(), comparisonAffinity(), orTermIsOptCandidate(), selectAddColumnTypeAndCollation(), sqlite3CodeSubselect(), sqlite3CompareAffinity(), and sqlite3ExprAffinity().
void sqlite3ExprAnalyzeAggList | ( | NameContext * | pNC, | |
ExprList * | pList | |||
) |
Definition at line 3052 of file expr.c.
References ExprList::a, and sqlite3ExprAnalyzeAggregates().
Referenced by sqlite3Select().
void sqlite3ExprAnalyzeAggregates | ( | NameContext * | pNC, | |
Expr * | pExpr | |||
) |
Definition at line 3038 of file expr.c.
References analyzeAggregate(), analyzeAggregatesInSelect(), Walker::pNC, sqlite3WalkExpr(), Walker::u, Walker::xExprCallback, and Walker::xSelectCallback.
Referenced by sqlite3ExprAnalyzeAggList(), and sqlite3Select().
Definition at line 476 of file expr.c.
References sqlite3Expr(), and TK_AND.
Referenced by addWhereTerm(), flattenSubquery(), sqlite3AddCheckConstraint(), and sqliteProcessJoin().
Definition at line 539 of file expr.c.
References sqlite3::aLimit, Parse::apVarExpr, Parse::db, db, Expr::iTable, sqlite3::mallocFailed, Token::n, Parse::nErr, Parse::nVar, Parse::nVarExpr, Parse::nVarExprAlloc, sqlite3DbReallocOrFree(), sqlite3ErrorMsg(), SQLITE_LIMIT_VARIABLE_NUMBER, testcase, Expr::token, and Token::z.
Referenced by yy_reduce().
void sqlite3ExprCacheAffinityChange | ( | Parse * | pParse, | |
int | iStart, | |||
int | iCount | |||
) |
Definition at line 1605 of file expr.c.
References Parse::aColCache, Parse::yColCache::affChange, Parse::yColCache::iReg, and Parse::nColCache.
Referenced by codeApplyAffinity(), codeCompare(), generateOutputSubroutine(), generateSortTail(), selectInnerLoop(), sqlite3CodeSubselect(), sqlite3CompleteInsertion(), sqlite3ExprCodeTarget(), sqlite3GenerateConstraintChecks(), sqlite3GenerateIndexKey(), sqlite3Update(), and updateAccumulator().
Definition at line 609 of file expr.c.
References Token::dyn, Expr::pLeft, Expr::pList, Expr::pRight, Expr::pSelect, Expr::span, sqlite3DbFree(), sqlite3ExprDelete(), sqlite3ExprListDelete(), sqlite3SelectDelete(), Expr::token, and Token::z.
Referenced by resolveAlias(), and sqlite3ExprDelete().
void sqlite3ExprClearColumnCache | ( | Parse * | pParse, | |
int | iTable | |||
) |
Definition at line 1585 of file expr.c.
References Parse::aColCache, Parse::iColCache, Parse::yColCache::iTable, Parse::nColCache, and testcase.
Referenced by sqlite3WhereBegin(), and sqlite3WhereEnd().
Definition at line 2340 of file expr.c.
References Parse::db, sqlite3::mallocFailed, OP_SCopy, Parse::pVdbe, sqlite3ExprCodeTarget(), and sqlite3VdbeAddOp2().
Referenced by codeAlias(), codeAttach(), computeLimitRegisters(), sqlite3ExprCodeAndCache(), sqlite3ExprCodeExprList(), sqlite3ExprCodeTarget(), sqlite3GenerateConstraintChecks(), sqlite3Insert(), sqlite3Select(), sqlite3Update(), sqlite3WhereBegin(), and updateAccumulator().
Definition at line 2364 of file expr.c.
References Expr::iTable, Parse::nMem, Expr::op, OP_Copy, Parse::pVdbe, sqlite3ExprCode(), sqlite3VdbeAddOp2(), and TK_REGISTER.
Referenced by sqlite3Insert(), and sqlite3Update().
Definition at line 2485 of file expr.c.
References evalConstExpr(), Walker::pParse, sqlite3WalkExpr(), Walker::xExprCallback, and Walker::xSelectCallback.
Referenced by sqlite3WhereBegin().
void sqlite3ExprCodeCopy | ( | Parse * | pParse, | |
int | iFrom, | |||
int | iTo, | |||
int | nReg | |||
) |
Definition at line 1636 of file expr.c.
References OP_Copy, Parse::pVdbe, and sqlite3VdbeAddOp2().
Referenced by generateOutputSubroutine().
Definition at line 2500 of file expr.c.
References ExprList::a, codeAlias(), ExprList::nExpr, OP_SCopy, sqlite3ExprCode(), sqlite3ExprHardCopy(), sqlite3GetVdbe(), and sqlite3VdbeAddOp2().
Referenced by pushOntoSorter(), selectInnerLoop(), sqlite3ExprCodeTarget(), sqlite3Select(), and updateAccumulator().
int sqlite3ExprCodeGetColumn | ( | Parse * | pParse, | |
Table * | pTab, | |||
int | iColumn, | |||
int | iTable, | |||
int | iReg, | |||
int | allowAffChng | |||
) |
Definition at line 1528 of file expr.c.
References Table::aCol, Parse::aColCache, Column::affinity, ArraySize, Parse::disableColCache, Parse::iColCache, IsVirtual, Parse::yColCache::iTable, Parse::nColCache, OP_Column, OP_Noop, OP_RealAffinity, OP_Rowid, OP_VColumn, OP_VRowid, Parse::pVdbe, sqlite3ColumnDefault(), sqlite3VdbeAddOp0(), sqlite3VdbeAddOp1(), sqlite3VdbeAddOp2(), sqlite3VdbeAddOp3(), SQLITE_AFF_REAL, and VdbeComment.
Referenced by sqlite3ExprCodeTarget(), and sqlite3Select().
void sqlite3ExprCodeMove | ( | Parse * | pParse, | |
int | iFrom, | |||
int | iTo, | |||
int | nReg | |||
) |
Definition at line 1620 of file expr.c.
References Parse::aColCache, Parse::yColCache::iReg, Parse::nColCache, OP_Move, Parse::pVdbe, and sqlite3VdbeAddOp3().
Referenced by generateOutputSubroutine(), generateSortTail(), pushOntoSorter(), selectInnerLoop(), and sqlite3Select().
Definition at line 1756 of file expr.c.
References ExprList::a, AggInfo::aCol, AggInfo::aFunc, Parse::ckBase, codeAlias(), codeCompare(), codeCompareOperands(), codeInteger(), codeReal(), comparisonAffinity(), Parse::db, db, AggInfo::directMode, Parse::disableColCache, ENC, EP_AnyAff, EP_InfixFunc, FuncDef::flags, Expr::flags, Expr::iAgg, Expr::iColumn, TriggerStack::ignoreJump, AggInfo::AggInfo_func::iMem, IN_INDEX_ROWID, Expr::iTable, sqlite3::mallocFailed, Token::n, ExprList::nExpr, Parse::nMem, OE_Abort, OE_Fail, OE_Ignore, OE_Rollback, Expr::op, OP_Add, OP_AddImm, OP_And, OP_BitAnd, OP_BitNot, OP_BitOr, OP_Blob, OP_CollSeq, OP_Column, OP_Concat, OP_ContextPop, OP_Copy, OP_Divide, OP_Eq, OP_Found, OP_Function, OP_Ge, OP_Goto, OP_Gt, OP_Halt, OP_Integer, OP_IsNull, OP_Le, OP_Lt, OP_MakeRecord, OP_MustBeInt, OP_Ne, OP_Not, OP_NotExists, OP_NotNull, OP_Null, OP_Or, OP_Remainder, OP_SCopy, OP_ShiftLeft, OP_ShiftRight, OP_String8, OP_Subtract, OP_ToBlob, OP_ToInt, OP_ToNumeric, OP_ToReal, OP_ToText, OP_Variable, P4_COLLSEQ, P4_DYNAMIC, P4_FUNCDEF, P4_STATIC, Expr::pAggInfo, sqlite3::pDfltColl, ExprList::ExprList_item::pExpr, Expr::pLeft, Expr::pList, Expr::pRight, Expr::pTab, Parse::pVdbe, AggInfo::sortingIdx, Expr::span, sqlite3AffinityType(), sqlite3CodeSubselect(), sqlite3DequoteExpr(), sqlite3ErrorMsg(), sqlite3ExprCacheAffinityChange(), sqlite3ExprCode(), sqlite3ExprCodeExprList(), sqlite3ExprCodeGetColumn(), sqlite3ExprCodeTarget(), sqlite3ExprCodeTemp(), sqlite3ExprCollSeq(), sqlite3ExprIfFalse(), sqlite3ExprIsConstant(), sqlite3ExprWritableRegister(), sqlite3FindFunction(), sqlite3FindInIndex(), sqlite3GetTempRange(), sqlite3GetTempReg(), sqlite3HexToBlob(), sqlite3ReleaseTempRange(), sqlite3ReleaseTempReg(), sqlite3VdbeAddOp0(), sqlite3VdbeAddOp1(), sqlite3VdbeAddOp2(), sqlite3VdbeAddOp3(), sqlite3VdbeAddOp4(), sqlite3VdbeChangeP4(), sqlite3VdbeChangeP5(), sqlite3VdbeDb(), sqlite3VdbeJumpHere(), sqlite3VdbeMakeLabel(), sqlite3VdbeResolveLabel(), sqlite3VtabOverloadFunction(), SQLITE_AFF_INTEGER, SQLITE_AFF_NONE, SQLITE_AFF_NUMERIC, SQLITE_AFF_REAL, SQLITE_AFF_TEXT, SQLITE_CONSTRAINT, SQLITE_FUNC_NEEDCOLL, SQLITE_JUMPIFNULL, SQLITE_STOREP2, testcase, TK_AGG_COLUMN, TK_AGG_FUNCTION, TK_AND, TK_AS, TK_BETWEEN, TK_BITAND, TK_BITNOT, TK_BITOR, TK_BLOB, TK_CASE, TK_CAST, TK_COLUMN, TK_CONCAT, TK_CONST_FUNC, TK_EQ, TK_EXISTS, TK_FLOAT, TK_FUNCTION, TK_GE, TK_GT, TK_IN, TK_INTEGER, TK_ISNULL, TK_LE, TK_LSHIFT, TK_LT, TK_MINUS, TK_NE, TK_NOT, TK_NOTNULL, TK_NULL, TK_OR, TK_PLUS, TK_RAISE, TK_REGISTER, TK_REM, TK_RSHIFT, TK_SELECT, TK_SLASH, TK_STAR, TK_STRING, TK_UMINUS, TK_UPLUS, TK_VARIABLE, Expr::token, Parse::trigStack, usedAsColumnCache(), AggInfo::useSortingIdx, VdbeComment, VdbeNoopComment, and Token::z.
Referenced by codeAlias(), codeEqualityTerm(), evalConstExpr(), sqlite3CodeSubselect(), sqlite3ExprCode(), sqlite3ExprCodeTarget(), and sqlite3ExprCodeTemp().
Definition at line 2323 of file expr.c.
References sqlite3ExprCodeTarget(), sqlite3GetTempReg(), and sqlite3ReleaseTempReg().
Referenced by codeCompareOperands(), sqlite3ExprCodeTarget(), sqlite3ExprIfFalse(), and sqlite3ExprIfTrue().
Definition at line 86 of file expr.c.
References Table::aCol, Parse::db, db, ENC, Expr::iColumn, Expr::op, Expr::pColl, Expr::pLeft, Expr::pTab, sqlite3CheckCollSeq(), sqlite3FindCollSeq(), TK_AGG_COLUMN, TK_CAST, TK_COLUMN, TK_REGISTER, TK_UPLUS, and Column::zColl.
Referenced by exprCommute(), isLikeOrGlob(), isSortingIndex(), keyInfoFromExprList(), multiSelectCollSeq(), selectAddColumnTypeAndCollation(), sqlite3BinaryCompareCollSeq(), sqlite3CodeSubselect(), sqlite3ExprCodeTarget(), and updateAccumulator().
Definition at line 2827 of file expr.c.
References ExprList::a, EP_Distinct, Expr::flags, Expr::iColumn, Expr::iTable, Token::n, ExprList::nExpr, Expr::op, ExprList::ExprList_item::pExpr, Expr::pLeft, Expr::pList, Expr::pRight, Expr::pSelect, sqlite3ExprCompare(), sqlite3StrNICmp(), TK_COLUMN, Expr::token, and Token::z.
Referenced by analyzeAggregate(), resolveOrderByTermToExprList(), sqlite3ExprCompare(), and xferOptimization().
Definition at line 621 of file expr.c.
References sqlite3DbFree(), and sqlite3ExprClear().
Referenced by clearSelect(), codeAttach(), exprAnalyze(), lookupName(), multiSelect(), multiSelectOrderBy(), resolveCompoundOrderBy(), sqlite3AddCheckConstraint(), sqlite3AddDefaultValue(), sqlite3BeginTrigger(), sqlite3CodeRowTrigger(), sqlite3CodeSubselect(), sqlite3DeleteFrom(), sqlite3DeleteTable(), sqlite3DeleteTrigger(), sqlite3DeleteTriggerStep(), sqlite3Expr(), sqlite3ExprClear(), sqlite3ExprListAppend(), sqlite3ExprListDelete(), sqlite3SrcListAppendFromTerm(), sqlite3SrcListDelete(), sqlite3TriggerDeleteStep(), sqlite3TriggerUpdateStep(), sqlite3Update(), sqlitePersistTriggerStep(), sqliteResetColumnNames(), whereClauseClear(), whereClauseInsert(), and yy_destructor().
Definition at line 654 of file expr.c.
References Token::dyn, Token::n, Expr::pLeft, Expr::pList, Expr::pRight, Expr::pSelect, Expr::span, sqlite3DbMallocRaw(), sqlite3DbStrNDup(), sqlite3ExprDup(), sqlite3ExprListDup(), sqlite3SelectDup(), Expr::token, and Token::z.
Referenced by codeTriggerProgram(), exprAnalyze(), flattenSubquery(), resolveAlias(), resolveCompoundOrderBy(), sqlite3AddCheckConstraint(), sqlite3AddDefaultValue(), sqlite3BeginTrigger(), sqlite3CodeRowTrigger(), sqlite3ExprDup(), sqlite3ExprListDup(), sqlite3MaterializeView(), sqlite3SelectDup(), sqlite3SrcListDup(), sqlitePersistTriggerStep(), substExpr(), and updateVirtualTable().
Definition at line 504 of file expr.c.
References Parse::db, db, Token::dyn, Expr::op, Expr::pList, Expr::span, sqlite3DbMallocZero(), sqlite3ExprListDelete(), sqlite3ExprSetHeight, TK_FUNCTION, and Expr::token.
Referenced by yy_reduce().
void sqlite3ExprHardCopy | ( | Parse * | pParse, | |
int | iReg, | |||
int | nReg | |||
) |
Definition at line 1692 of file expr.c.
References Parse::db, sqlite3::mallocFailed, OP_Copy, OP_SCopy, VdbeOp::opcode, VdbeOp::p1, Parse::pVdbe, sqlite3VdbeCurrentAddr(), and sqlite3VdbeGetOp().
Referenced by sqlite3ExprCodeExprList().
Definition at line 2671 of file expr.c.
References ExprList::a, codeCompare(), codeCompareOperands(), Parse::disableColCache, Expr::iTable, Expr::op, OP_Eq, OP_Ge, OP_Gt, OP_IfNot, OP_IsNull, OP_Le, OP_Lt, OP_Ne, OP_NotNull, ExprList::ExprList_item::pExpr, Expr::pLeft, Expr::pList, Expr::pRight, Parse::pVdbe, sqlite3ExprCodeTemp(), sqlite3ExprIfFalse(), sqlite3ExprIfTrue(), sqlite3ReleaseTempReg(), sqlite3VdbeAddOp2(), sqlite3VdbeAddOp3(), sqlite3VdbeMakeLabel(), sqlite3VdbeResolveLabel(), SQLITE_JUMPIFNULL, testcase, TK_AND, TK_BETWEEN, TK_EQ, TK_GE, TK_GT, TK_ISNULL, TK_LE, TK_LT, TK_NE, TK_NOT, TK_NOTNULL, TK_OR, and TK_REGISTER.
Referenced by sqlite3CodeRowTrigger(), sqlite3ExprCodeTarget(), sqlite3ExprIfFalse(), sqlite3ExprIfTrue(), sqlite3Select(), and sqlite3WhereBegin().
Definition at line 2542 of file expr.c.
References ExprList::a, codeCompare(), codeCompareOperands(), Parse::disableColCache, Expr::iTable, Expr::op, OP_Eq, OP_Ge, OP_Gt, OP_If, OP_IsNull, OP_Le, OP_Lt, OP_Ne, OP_NotNull, ExprList::ExprList_item::pExpr, Expr::pLeft, Expr::pList, Expr::pRight, Parse::pVdbe, sqlite3ExprCodeTemp(), sqlite3ExprIfFalse(), sqlite3ExprIfTrue(), sqlite3ReleaseTempReg(), sqlite3VdbeAddOp2(), sqlite3VdbeAddOp3(), sqlite3VdbeMakeLabel(), sqlite3VdbeResolveLabel(), SQLITE_JUMPIFNULL, testcase, TK_AND, TK_BETWEEN, TK_EQ, TK_GE, TK_GT, TK_ISNULL, TK_LE, TK_LT, TK_NE, TK_NOT, TK_NOTNULL, TK_OR, and TK_REGISTER.
Referenced by sqlite3ExprIfFalse(), sqlite3ExprIfTrue(), and sqlite3GenerateConstraintChecks().
int sqlite3ExprIsConstant | ( | Expr * | p | ) |
Definition at line 963 of file expr.c.
References exprIsConst().
Referenced by resolveAttachExpr(), sqlite3CodeSubselect(), and sqlite3ExprCodeTarget().
int sqlite3ExprIsConstantNotJoin | ( | Expr * | p | ) |
Definition at line 973 of file expr.c.
References exprIsConst().
Referenced by isAppropriateForFactoring(), and sqlite3WhereBegin().
int sqlite3ExprIsConstantOrFunction | ( | Expr * | p | ) |
Definition at line 986 of file expr.c.
References exprIsConst().
Referenced by sqlite3AddDefaultValue().
int sqlite3ExprIsInteger | ( | Expr * | p, | |
int * | pValue | |||
) |
Definition at line 996 of file expr.c.
References EP_IntValue, Expr::flags, Expr::iTable, Expr::op, Expr::pLeft, sqlite3ExprIsInteger(), sqlite3GetInt32(), TK_INTEGER, TK_UMINUS, TK_UPLUS, Expr::token, and Token::z.
Referenced by resolveCompoundOrderBy(), resolveOrderByTermToExprList(), resolveOrderGroupBy(), and sqlite3ExprIsInteger().
Definition at line 816 of file expr.c.
References ExprList::a, Parse::db, db, ExprList::nAlloc, ExprList::nExpr, sqlite3DbMallocZero(), sqlite3DbRealloc(), sqlite3ExprDelete(), sqlite3ExprListDelete(), and sqlite3NameFromToken().
Referenced by exprAnalyze(), multiSelectOrderBy(), selectExpander(), sqlite3CreateIndex(), sqlite3SelectNew(), updateVirtualTable(), and yy_reduce().
Definition at line 861 of file expr.c.
References sqlite3::aLimit, Parse::db, ExprList::nExpr, sqlite3ErrorMsg(), SQLITE_LIMIT_COLUMN, and testcase.
Referenced by yy_reduce().
Definition at line 877 of file expr.c.
References ExprList::a, ExprList::nAlloc, ExprList::nExpr, sqlite3DbFree(), and sqlite3ExprDelete().
Referenced by clearSelect(), exprAnalyze(), multiSelect(), selectExpander(), sqlite3AddPrimaryKey(), sqlite3CreateForeignKey(), sqlite3CreateIndex(), sqlite3DeleteTriggerStep(), sqlite3ExprClear(), sqlite3ExprFunction(), sqlite3ExprListAppend(), sqlite3Insert(), sqlite3Select(), sqlite3TriggerInsertStep(), sqlite3TriggerUpdateStep(), sqlite3Update(), sqlitePersistTriggerStep(), yy_destructor(), and yy_reduce().
Definition at line 683 of file expr.c.
References ExprList::a, ExprList::iECursor, sqlite3::mallocFailed, ExprList::nAlloc, ExprList::nExpr, ExprList::ExprList_item::pExpr, Expr::span, sqlite3DbFree(), sqlite3DbMallocRaw(), sqlite3DbStrDup(), sqlite3ExprDup(), sqlite3TokenCopy(), and Token::z.
Referenced by codeTriggerProgram(), flattenSubquery(), multiSelectOrderBy(), sqlite3ExprDup(), sqlite3Select(), sqlite3SelectDup(), sqlitePersistTriggerStep(), and substExpr().
Definition at line 66 of file expr.c.
References Parse::db, db, EP_ExpCollate, Expr::flags, Expr::pColl, sqlite3DbFree(), sqlite3LocateCollSeq(), and sqlite3NameFromToken().
Referenced by yy_reduce().
Definition at line 491 of file expr.c.
References Token::n, Expr::span, and Token::z.
Referenced by sqlite3Expr(), and yy_reduce().
int sqlite3ExprWritableRegister | ( | Parse * | pParse, | |
int | iCurrent, | |||
int | iTarget | |||
) |
Definition at line 1669 of file expr.c.
References Parse::aColCache, Parse::iColCache, Parse::yColCache::iReg, Parse::nColCache, OP_SCopy, Parse::pVdbe, sqlite3VdbeAddOp2(), and usedAsColumnCache().
Referenced by sqlite3ExprCodeTarget(), and sqlite3ReleaseTempReg().
Definition at line 1140 of file expr.c.
References SrcList::a, ExprList::a, Table::aCol, Column::affinity, Index::aiColumn, Index::azColl, comparisonAffinity(), Parse::db, db, ENC, Expr::iColumn, IN_INDEX_EPH, IN_INDEX_INDEX, IN_INDEX_ROWID, isCandidateForInOpt(), Expr::iTable, Index::nColumn, Parse::nMem, Column::notNull, Parse::nTab, OE_None, Index::onError, OP_If, OP_Integer, OP_OpenRead, OP_SetNumColumns, P4_KEYINFO_HANDOFF, Select::pEList, ExprList::ExprList_item::pExpr, Table::pIndex, Expr::pLeft, Index::pNext, Index::pSchema, Table::pSchema, Expr::pSelect, Select::pSrc, SrcList::SrcList_item::pTab, sqlite3BinaryCompareCollSeq(), sqlite3CodeSubselect(), sqlite3FindCollSeq(), sqlite3GetVdbe(), sqlite3IndexKeyinfo(), sqlite3OpenTable(), sqlite3SchemaToIndex(), sqlite3VdbeAddOp1(), sqlite3VdbeAddOp2(), sqlite3VdbeAddOp4(), sqlite3VdbeJumpHere(), sqlite3VdbeUsesBtree(), SQLITE_AFF_NONE, Index::tnum, VdbeComment, and Index::zName.
Referenced by codeEqualityTerm(), and sqlite3ExprCodeTarget().
int sqlite3GetTempRange | ( | Parse * | pParse, | |
int | nReg | |||
) |
Definition at line 3081 of file expr.c.
References Parse::iRangeReg, Parse::nMem, Parse::nRangeReg, and usedAsColumnCache().
Referenced by codeAttach(), generateOutputSubroutine(), multiSelectOrderBy(), pushOntoSorter(), sqlite3ExprCodeTarget(), sqlite3GenerateConstraintChecks(), sqlite3GenerateIndexKey(), sqlite3Insert(), sqlite3Select(), sqlite3Update(), sqlite3WhereBegin(), and updateAccumulator().
int sqlite3GetTempReg | ( | Parse * | pParse | ) |
Definition at line 3065 of file expr.c.
References Parse::aTempReg, Parse::nMem, and Parse::nTempReg.
Referenced by codeDistinct(), destroyRootPage(), generateOutputSubroutine(), generateSortTail(), multiSelect(), pushOntoSorter(), selectInnerLoop(), sqlite3ChangeCookie(), sqlite3CodeSubselect(), sqlite3CompleteInsertion(), sqlite3ExprCodeTarget(), sqlite3ExprCodeTemp(), sqlite3GenerateConstraintChecks(), sqlite3Insert(), sqlite3MinimumFileFormat(), sqlite3RefillIndex(), sqlite3Select(), sqlite3Update(), sqlite3WhereBegin(), and xferOptimization().
Definition at line 760 of file expr.c.
References IdList::a, IdList::nAlloc, IdList::nId, sqlite3DbFree(), sqlite3DbMallocRaw(), sqlite3DbStrDup(), and IdList::IdList_item::zName.
Referenced by codeTriggerProgram(), sqlite3BeginTrigger(), sqlite3SrcListDup(), and sqlitePersistTriggerStep().
int sqlite3IndexAffinityOk | ( | Expr * | pExpr, | |
char | idx_affinity | |||
) |
Definition at line 175 of file expr.c.
References comparisonAffinity(), sqlite3IsNumericAffinity, SQLITE_AFF_NONE, and SQLITE_AFF_TEXT.
Referenced by findTerm().
int sqlite3IsRowid | ( | const char * | z | ) |
Definition at line 1032 of file expr.c.
References sqlite3StrICmp().
Referenced by lookupName(), sqlite3Insert(), and sqlite3Update().
Definition at line 432 of file expr.c.
References Parse::db, sqlite3Expr(), and sqlite3ExprCheckHeight.
Referenced by addWhereTerm(), exprAnalyze(), multiSelectOrderBy(), resolveAlias(), selectExpander(), sqlite3CodeSubselect(), sqlite3CreateIdExpr(), sqlite3RegisterExpr(), and yy_reduce().
Definition at line 456 of file expr.c.
References Expr::iTable, Parse::nested, Parse::pVdbe, sqlite3ErrorMsg(), sqlite3PExpr(), TK_NULL, TK_REGISTER, and Token::z.
Referenced by yy_reduce().
void sqlite3ReleaseTempRange | ( | Parse * | pParse, | |
int | iReg, | |||
int | nReg | |||
) |
Definition at line 3094 of file expr.c.
References Parse::iRangeReg, and Parse::nRangeReg.
Referenced by multiSelectOrderBy(), pushOntoSorter(), sqlite3ExprCodeTarget(), sqlite3GenerateConstraintChecks(), sqlite3GenerateIndexKey(), sqlite3Insert(), sqlite3Select(), sqlite3Update(), sqlite3WhereBegin(), and updateAccumulator().
void sqlite3ReleaseTempReg | ( | Parse * | pParse, | |
int | iReg | |||
) |
Definition at line 3071 of file expr.c.
References ArraySize, Parse::aTempReg, Parse::nTempReg, and sqlite3ExprWritableRegister().
Referenced by codeDistinct(), destroyRootPage(), evalConstExpr(), generateOutputSubroutine(), generateSortTail(), multiSelect(), pushOntoSorter(), selectInnerLoop(), sqlite3ChangeCookie(), sqlite3CodeSubselect(), sqlite3ExprCodeTarget(), sqlite3ExprCodeTemp(), sqlite3ExprIfFalse(), sqlite3ExprIfTrue(), sqlite3GenerateConstraintChecks(), sqlite3Insert(), sqlite3MinimumFileFormat(), sqlite3RefillIndex(), sqlite3Select(), sqlite3Update(), sqlite3WhereBegin(), and xferOptimization().
Definition at line 780 of file expr.c.
References Select::addrOpenEphm, Select::iLimit, Select::iOffset, Select::op, Select::pEList, Select::pGroupBy, Select::pHaving, Select::pLimit, Select::pOffset, Select::pOrderBy, Select::pPrior, Select::pRightmost, Select::pSrc, Select::pWhere, Select::selFlags, SF_UsesEphemeral, sqlite3DbMallocRaw(), sqlite3ExprDup(), sqlite3ExprListDup(), sqlite3SelectDup(), and sqlite3SrcListDup().
Referenced by codeTriggerProgram(), flattenSubquery(), selectExpander(), sqlite3CreateView(), sqlite3ExprDup(), sqlite3MaterializeView(), sqlite3SelectDup(), sqlite3SrcListDup(), sqlite3ViewGetColumnNames(), sqlitePersistTriggerStep(), and substExpr().
Definition at line 727 of file expr.c.
References SrcList::a, Table::nRef, SrcList::nSrc, sqlite3DbMallocRaw(), sqlite3DbStrDup(), sqlite3ExprDup(), sqlite3IdListDup(), sqlite3SelectDup(), and SrcList::SrcList_item::zDatabase.
Referenced by sqlite3SelectDup().
Definition at line 673 of file expr.c.
References Token::dyn, Token::n, sqlite3DbFree(), sqlite3DbStrNDup(), and Token::z.
Referenced by exprAnalyze(), sqlite3AddDefaultValue(), sqlite3BeginTrigger(), sqlite3DequoteExpr(), sqlite3ExprListDup(), and substExpr().
static int usedAsColumnCache | ( | Parse * | pParse, | |
int | iFrom, | |||
int | iTo | |||
) | [static] |
Definition at line 1648 of file expr.c.
References Parse::aColCache, Parse::yColCache::iReg, and Parse::nColCache.
Referenced by sqlite3ExprCodeTarget(), sqlite3ExprWritableRegister(), and sqlite3GetTempRange().
ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:58 2011 by Doxygen 1.6.1