Go to the source code of this file.
Functions | |
void | sqlite3IndexAffinityStr (Vdbe *v, Index *pIdx) |
void | sqlite3TableAffinityStr (Vdbe *v, Table *pTab) |
static int | readsTable (Vdbe *v, int iStartAddr, int iDb, Table *pTab) |
static int | autoIncBegin (Parse *pParse, int iDb, Table *pTab) |
static void | autoIncStep (Parse *pParse, int memId, int regRowid) |
static void | autoIncEnd (Parse *pParse, int iDb, Table *pTab, int memId) |
static int | xferOptimization (Parse *pParse, Table *pDest, Select *pSelect, int onError, int iDbDest) |
void | sqlite3Insert (Parse *pParse, SrcList *pTabList, ExprList *pList, Select *pSelect, IdList *pColumn, int onError) |
void | sqlite3GenerateConstraintChecks (Parse *pParse, Table *pTab, int baseCur, int regRowid, int *aRegIdx, int rowidChng, int isUpdate, int overrideError, int ignoreDest) |
void | sqlite3CompleteInsertion (Parse *pParse, Table *pTab, int baseCur, int regRowid, int *aRegIdx, int rowidChng, int isUpdate, int newIdx, int appendBias) |
int | sqlite3OpenTableAndIndices (Parse *pParse, Table *pTab, int baseCur, int op) |
static int | xferCompatibleCollation (const char *z1, const char *z2) |
static int | xferCompatibleIndex (Index *pDest, Index *pSrc) |
Definition at line 162 of file insert.c.
References sqlite3::aDb, Parse::db, Parse::nMem, Parse::nTab, OP_Close, OP_Column, OP_Goto, OP_Integer, OP_Ne, OP_Next, OP_OpenRead, OP_Rewind, OP_Rowid, OP_String8, Db::pSchema, Schema::pSeqTab, Parse::pVdbe, sqlite3OpenTable(), sqlite3VdbeAddOp2(), sqlite3VdbeAddOp3(), sqlite3VdbeAddOp4(), sqlite3VdbeChangeP5(), sqlite3VdbeCurrentAddr(), SQLITE_JUMPIFNULL, Table::tabFlags, TF_Autoincrement, and Table::zName.
Referenced by sqlite3Insert(), and xferOptimization().
Definition at line 213 of file insert.c.
References sqlite3::aDb, Parse::db, Parse::nMem, Parse::nTab, OP_Close, OP_Insert, OP_MakeRecord, OP_NewRowid, OP_NotNull, OP_OpenWrite, OPFLAG_APPEND, Db::pSchema, Schema::pSeqTab, Parse::pVdbe, sqlite3OpenTable(), sqlite3VdbeAddOp1(), sqlite3VdbeAddOp2(), sqlite3VdbeAddOp3(), sqlite3VdbeChangeP5(), sqlite3VdbeJumpHere(), Table::tabFlags, and TF_Autoincrement.
Referenced by sqlite3Insert(), and xferOptimization().
static void autoIncStep | ( | Parse * | pParse, | |
int | memId, | |||
int | regRowid | |||
) | [static] |
Definition at line 202 of file insert.c.
References OP_MemMax, Parse::pVdbe, and sqlite3VdbeAddOp2().
Referenced by sqlite3Insert(), and xferOptimization().
Definition at line 114 of file insert.c.
References OP_OpenRead, OP_VOpen, VdbeOp::opcode, VdbeOp::p2, VdbeOp::p3, VdbeOp::p4, P4_VTAB, VdbeOp::p4type, Table::pIndex, Index::pNext, Table::pVtab, VdbeOp::pVtab, sqlite3VdbeCurrentAddr(), sqlite3VdbeGetOp(), Index::tnum, and Table::tnum.
Referenced by sqlite3Insert().
void sqlite3CompleteInsertion | ( | Parse * | pParse, | |
Table * | pTab, | |||
int | baseCur, | |||
int | regRowid, | |||
int * | aRegIdx, | |||
int | rowidChng, | |||
int | isUpdate, | |||
int | newIdx, | |||
int | appendBias | |||
) |
Definition at line 1325 of file insert.c.
References Table::nCol, Parse::nested, OP_IdxInsert, OP_Insert, OP_MakeRecord, OPFLAG_APPEND, OPFLAG_ISUPDATE, OPFLAG_LASTROWID, OPFLAG_NCHANGE, P4_STATIC, Table::pIndex, Index::pNext, Table::pSelect, sqlite3ExprCacheAffinityChange(), sqlite3GetTempReg(), sqlite3GetVdbe(), sqlite3TableAffinityStr(), sqlite3VdbeAddOp2(), sqlite3VdbeAddOp3(), sqlite3VdbeChangeP4(), sqlite3VdbeChangeP5(), and Table::zName.
Referenced by sqlite3Insert(), and sqlite3Update().
void sqlite3GenerateConstraintChecks | ( | Parse * | pParse, | |
Table * | pTab, | |||
int | baseCur, | |||
int | regRowid, | |||
int * | aRegIdx, | |||
int | rowidChng, | |||
int | isUpdate, | |||
int | overrideError, | |||
int | ignoreDest | |||
) |
Definition at line 1083 of file insert.c.
References Table::aCol, Index::aiColumn, Parse::ckBase, Parse::db, sqlite3::flags, Table::iPKey, Table::keyConf, Table::nCol, Index::nColumn, Column::notNull, OE_Abort, OE_Default, OE_Fail, OE_Ignore, OE_None, OE_Replace, OE_Rollback, Index::onError, OP_Eq, OP_Goto, OP_Halt, OP_IsNull, OP_IsUnique, OP_MakeRecord, OP_NotExists, OP_NotNull, OP_SCopy, P4_DYNAMIC, P4_INT32, P4_STATIC, Table::pCheck, Column::pDflt, Table::pIndex, Index::pNext, Table::pSelect, sqlite3_snprintf(), sqlite3ExprCacheAffinityChange(), sqlite3ExprCode(), sqlite3ExprIfTrue(), sqlite3GenerateRowDelete(), sqlite3GenerateRowIndexDelete(), sqlite3GetTempRange(), sqlite3GetTempReg(), sqlite3GetVdbe(), sqlite3IndexAffinityStr(), sqlite3MPrintf(), sqlite3ReleaseTempRange(), sqlite3ReleaseTempReg(), sqlite3VdbeAddOp1(), sqlite3VdbeAddOp2(), sqlite3VdbeAddOp3(), sqlite3VdbeAddOp4(), sqlite3VdbeChangeP4(), sqlite3VdbeJumpHere(), sqlite3VdbeMakeLabel(), sqlite3VdbeResolveLabel(), SQLITE_CONSTRAINT, SQLITE_IgnoreChecks, SQLITE_INT_TO_PTR, SQLITE_JUMPIFNULL, Column::zName, and Table::zName.
Referenced by sqlite3Insert(), and sqlite3Update().
Definition at line 35 of file insert.c.
References Table::aCol, Column::affinity, Index::aiColumn, db, sqlite3::mallocFailed, Index::nColumn, Index::pTable, sqlite3Malloc(), sqlite3VdbeChangeP4(), sqlite3VdbeDb(), SQLITE_AFF_NONE, and Index::zColAff.
Referenced by codeApplyAffinity(), sqlite3GenerateConstraintChecks(), and sqlite3GenerateIndexKey().
void sqlite3Insert | ( | Parse * | pParse, | |
SrcList * | pTabList, | |||
ExprList * | pList, | |||
Select * | pSelect, | |||
IdList * | pColumn, | |||
int | onError | |||
) |
Definition at line 359 of file insert.c.
References IdList::a, ExprList::a, SrcList::a, Table::aCol, sqlite3::aDb, autoIncBegin(), autoIncEnd(), autoIncStep(), COLNAME_NAME, Parse::db, db, sqlite3::flags, IdList::IdList_item::idx, SelectDest::iMem, SelectDest::iParm, Table::iPKey, IsHiddenColumn, IsVirtual, sqlite3::mallocFailed, Table::nCol, Parse::nErr, Parse::nested, ExprList::nExpr, IdList::nId, SelectDest::nMem, Parse::nMem, SrcList::nSrc, Parse::nTab, OE_Abort, OP_AddImm, OP_Close, OP_Column, OP_Goto, OP_Halt, OP_If, OP_Insert, OP_Integer, OP_IsNull, OP_MakeRecord, OP_MustBeInt, OP_NewRowid, OP_Next, OP_NotNull, OP_Null, OP_OpenEphemeral, OP_OpenPseudo, OP_OpenWrite, OP_ResultRow, OP_Rewind, OP_SCopy, OP_SetNumColumns, OP_VUpdate, OP_Yield, VdbeOp::opcode, VdbeOp::p1, VdbeOp::p2, VdbeOp::p3, P4_VTAB, Column::pDflt, Select::pEList, ExprList::ExprList_item::pExpr, Table::pIndex, Index::pNext, NameContext::pParse, Table::pSchema, Table::pSelect, Table::pVtab, readsTable(), sqlite3AuthCheck(), sqlite3BeginWriteOperation(), sqlite3CodeRowTrigger(), sqlite3CompleteInsertion(), sqlite3DbFree(), sqlite3DbMallocRaw(), sqlite3ErrorMsg(), sqlite3ExprCode(), sqlite3ExprCodeAndCache(), sqlite3ExprListDelete(), sqlite3GenerateConstraintChecks(), sqlite3GetTempRange(), sqlite3GetTempReg(), sqlite3GetVdbe(), sqlite3IdListDelete(), sqlite3IsReadOnly(), sqlite3IsRowid(), sqlite3OpenTableAndIndices(), sqlite3ReleaseTempRange(), sqlite3ReleaseTempReg(), sqlite3ResolveExprNames(), sqlite3SchemaToIndex(), sqlite3Select(), sqlite3SelectDelete(), sqlite3SelectDestInit(), sqlite3SrcListDelete(), sqlite3SrcListLookup(), sqlite3StrICmp(), sqlite3TableAffinityStr(), sqlite3TriggersExist(), sqlite3VdbeAddOp1(), sqlite3VdbeAddOp2(), sqlite3VdbeAddOp3(), sqlite3VdbeAddOp4(), sqlite3VdbeCountChanges(), sqlite3VdbeCurrentAddr(), sqlite3VdbeGetOp(), sqlite3VdbeJumpHere(), sqlite3VdbeMakeLabel(), sqlite3VdbeResolveLabel(), sqlite3VdbeSetColName(), sqlite3VdbeSetNumCols(), sqlite3ViewGetColumnNames(), sqlite3VtabMakeWritable(), SQLITE_CountRows, SQLITE_INSERT, SQLITE_INTERNAL, SQLITE_STATIC, SRT_Coroutine, TK_INSERT, TRIGGER_AFTER, TRIGGER_BEFORE, Parse::trigStack, VdbeComment, xferOptimization(), Column::zName, IdList::IdList_item::zName, Table::zName, Db::zName, and SrcList::SrcList_item::zName.
Referenced by codeTriggerProgram(), and yy_reduce().
Definition at line 1385 of file insert.c.
References Parse::db, IsVirtual, Parse::nTab, P4_KEYINFO_HANDOFF, Table::pIndex, Index::pNext, Index::pSchema, Table::pSchema, sqlite3GetVdbe(), sqlite3IndexKeyinfo(), sqlite3OpenTable(), sqlite3SchemaToIndex(), sqlite3VdbeAddOp4(), Index::tnum, VdbeComment, and Index::zName.
Referenced by sqlite3DeleteFrom(), sqlite3Insert(), and sqlite3Pragma().
Definition at line 77 of file insert.c.
References Table::aCol, Column::affinity, db, sqlite3::mallocFailed, Table::nCol, sqlite3Malloc(), sqlite3VdbeChangeP4(), sqlite3VdbeDb(), and Table::zColAff.
Referenced by sqlite3CompleteInsertion(), sqlite3Insert(), and sqlite3Update().
static int xferCompatibleCollation | ( | const char * | z1, | |
const char * | z2 | |||
) | [static] |
Definition at line 1430 of file insert.c.
References sqlite3StrICmp().
Referenced by xferOptimization().
Definition at line 1451 of file insert.c.
References Index::aiColumn, Index::aSortOrder, Index::azColl, Index::nColumn, Index::onError, and Index::pTable.
Referenced by xferOptimization().
static int xferOptimization | ( | Parse * | pParse, | |
Table * | pDest, | |||
Select * | pSelect, | |||
int | onError, | |||
int | iDbDest | |||
) | [static] |
Definition at line 1508 of file insert.c.
References ExprList::a, SrcList::a, Table::aCol, Column::affinity, autoIncBegin(), autoIncEnd(), autoIncStep(), Parse::db, Table::iPKey, Table::nCol, ExprList::nExpr, Column::notNull, SrcList::nSrc, Parse::nTab, OE_Abort, OE_Default, OE_None, OE_Rollback, Index::onError, Expr::op, OP_Close, OP_Goto, OP_Halt, OP_IdxInsert, OP_Insert, OP_NewRowid, OP_Next, OP_NotExists, OP_OpenRead, OP_OpenWrite, OP_Rewind, OP_RowData, OP_Rowid, OP_RowKey, OPFLAG_APPEND, OPFLAG_LASTROWID, OPFLAG_NCHANGE, P4_KEYINFO_HANDOFF, P4_STATIC, Table::pCheck, Select::pEList, ExprList::ExprList_item::pExpr, Select::pGroupBy, Table::pIndex, Select::pLimit, Index::pNext, Select::pOffset, Select::pOrderBy, Select::pPrior, Table::pSchema, Table::pSelect, SrcList::SrcList_item::pSelect, Select::pSrc, Table::pTrigger, Select::pWhere, Select::selFlags, SF_Distinct, sqlite3CodeVerifySchema(), sqlite3ExprCompare(), sqlite3GetTempReg(), sqlite3GetVdbe(), sqlite3IndexKeyinfo(), sqlite3LocateTable(), sqlite3OpenTable(), sqlite3ReleaseTempReg(), sqlite3SchemaToIndex(), sqlite3VdbeAddOp2(), sqlite3VdbeAddOp3(), sqlite3VdbeAddOp4(), sqlite3VdbeChangeP4(), sqlite3VdbeChangeP5(), sqlite3VdbeJumpHere(), SQLITE_CONSTRAINT, SQLITE_OK, Table::tabFlags, TF_Autoincrement, TF_Virtual, TK_ALL, Index::tnum, VdbeComment, xferCompatibleCollation(), xferCompatibleIndex(), Column::zColl, Index::zName, and Table::zName.
Referenced by sqlite3Insert().
ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:59 2011 by Doxygen 1.6.1