| /sqlite-3.40.0/src/ |
| H A D | update.c | 232 if( pPk ){ in updateFromSelect() 270 dest.iSDParm2 = (pPk ? pPk->nKeyCol : -1); in updateFromSelect() 422 testcase( pPk!=0 && pPk!=pTab->pIndex ); in sqlite3Update() 424 if( pPk==pIdx ){ in sqlite3Update() 681 nPk = pPk ? pPk->nKeyCol : 0; in sqlite3Update() 691 if( pPk ){ in sqlite3Update() 830 assert( pPk ); in sqlite3Update() 846 if( pPk ){ in sqlite3Update() 984 if( pPk ){ in sqlite3Update() 1029 if( pPk ){ in sqlite3Update() [all …]
|
| H A D | delete.c | 226 if( pPk->nKeyCol==1 ){ in sqlite3LimitWhere() 232 for(i=0; i<pPk->nKeyCol; i++){ in sqlite3LimitWhere() 490 pPk = 0; in sqlite3DeleteFrom() 498 assert( pPk!=0 ); in sqlite3DeleteFrom() 499 nPk = pPk->nKeyCol; in sqlite3DeleteFrom() 531 if( pPk ){ in sqlite3DeleteFrom() 533 assert( pPk->aiColumn[i]>=0 ); in sqlite3DeleteFrom() 560 if( pPk ){ in sqlite3DeleteFrom() 605 }else if( pPk ){ in sqlite3DeleteFrom() 646 }else if( pPk ){ in sqlite3DeleteFrom() [all …]
|
| H A D | build.c | 2258 assert( iCol<MAX(pPk->nColumn,pPk->nKeyCol) ); in isDupColumn() 2337 Index *pPk; in convertToWithoutRowidTable() local 2404 if( isDupColumn(pPk, j, pPk, i) ){ in convertToWithoutRowidTable() 2407 testcase( hasColumn(pPk->aiColumn, j, pPk->aiColumn[i]) ); in convertToWithoutRowidTable() 2408 pPk->azColl[j] = pPk->azColl[i]; in convertToWithoutRowidTable() 2409 pPk->aSortOrder[j] = pPk->aSortOrder[i]; in convertToWithoutRowidTable() 2410 pPk->aiColumn[j++] = pPk->aiColumn[i]; in convertToWithoutRowidTable() 2415 assert( pPk!=0 ); in convertToWithoutRowidTable() 2418 nPk = pPk->nColumn = pPk->nKeyCol; in convertToWithoutRowidTable() 4127 nExtraCol = pPk ? pPk->nKeyCol : 1; in sqlite3CreateIndex() [all …]
|
| H A D | insert.c | 44 Index *pPk = sqlite3PrimaryKeyIndex(pTab); in sqlite3OpenTable() local 45 assert( pPk!=0 ); in sqlite3OpenTable() 48 sqlite3VdbeSetP4KeyInfo(pParse, pPk); in sqlite3OpenTable() 1719 pPk = 0; in sqlite3GenerateConstraintChecks() 1722 pPk = sqlite3PrimaryKeyIndex(pTab); in sqlite3GenerateConstraintChecks() 1723 nPkField = pPk->nKeyCol; in sqlite3GenerateConstraintChecks() 2011 if( pkChng && pPk==0 ){ in sqlite3GenerateConstraintChecks() 2303 if( pIdx!=pPk ){ in sqlite3GenerateConstraintChecks() 2326 x = pPk->aiColumn[i]; in sqlite3GenerateConstraintChecks() 2328 if( i==(pPk->nKeyCol-1) ){ in sqlite3GenerateConstraintChecks() [all …]
|
| H A D | upsert.c | 281 Index *pPk = sqlite3PrimaryKeyIndex(pTab); in sqlite3UpsertDoUpdate() local 282 int nPk = pPk->nKeyCol; in sqlite3UpsertDoUpdate() 287 assert( pPk->aiColumn[i]>=0 ); in sqlite3UpsertDoUpdate() 288 k = sqlite3TableColumnToIndex(pIdx, pPk->aiColumn[i]); in sqlite3UpsertDoUpdate() 291 pTab->aCol[pPk->aiColumn[i]].zCnName)); in sqlite3UpsertDoUpdate()
|
| H A D | pragma.c | 1174 Index *pPk = sqlite3PrimaryKeyIndex(pTab); in sqlite3Pragma() local 1195 }else if( pPk==0 ){ in sqlite3Pragma() 1750 Index *pIdx, *pPk; in sqlite3Pragma() local 1762 pPk = 0; in sqlite3Pragma() 1765 pPk = sqlite3PrimaryKeyIndex(pTab); in sqlite3Pragma() 1766 r2 = sqlite3GetTempRange(pParse, pPk->nKeyCol); in sqlite3Pragma() 1798 if( pPk ){ in sqlite3Pragma() 1812 for(j=0; j<pPk->nKeyCol; j++){ in sqlite3Pragma() 1963 if( pPk==pIdx ) continue; in sqlite3Pragma() 2011 if( pPk==pIdx ) continue; in sqlite3Pragma() [all …]
|
| H A D | wherecode.c | 2038 for(j=0; j<pPk->nKeyCol; j++){ in sqlite3WhereCodeOneLoopStart() 2190 Index *pPk = sqlite3PrimaryKeyIndex(pTab); in sqlite3WhereCodeOneLoopStart() local 2193 sqlite3VdbeSetP4KeyInfo(pParse, pPk); in sqlite3WhereCodeOneLoopStart() 2304 int nPk = pPk->nKeyCol; in sqlite3WhereCodeOneLoopStart() 2311 int iCol = pPk->aiColumn[iPk]; in sqlite3WhereCodeOneLoopStart() 2601 Index *pPk = sqlite3PrimaryKeyIndex(pTab); in sqlite3WhereCodeOneLoopStart() local 2602 nPk = pPk->nKeyCol; in sqlite3WhereCodeOneLoopStart() 2605 int iCol = pPk->aiColumn[iPk]; in sqlite3WhereCodeOneLoopStart() 2748 Index *pPk = sqlite3PrimaryKeyIndex(pTab); in sqlite3WhereRightJoinLoop() local 2749 nPk = pPk->nKeyCol; in sqlite3WhereRightJoinLoop() [all …]
|
| H A D | alter.c | 2202 Index *pPk = 0; in sqlite3AlterDropColumn() local 2214 pPk = sqlite3PrimaryKeyIndex(pTab); in sqlite3AlterDropColumn() 2215 pParse->nMem += pPk->nColumn; in sqlite3AlterDropColumn() 2216 for(i=0; i<pPk->nKeyCol; i++){ in sqlite3AlterDropColumn() 2219 nField = pPk->nKeyCol; in sqlite3AlterDropColumn() 2225 if( pPk ){ in sqlite3AlterDropColumn() 2226 int iPos = sqlite3TableColumnToIndex(pPk, i); in sqlite3AlterDropColumn() 2227 int iColPos = sqlite3TableColumnToIndex(pPk, iCol); in sqlite3AlterDropColumn() 2228 if( iPos<pPk->nKeyCol ) continue; in sqlite3AlterDropColumn() 2248 if( pPk ){ in sqlite3AlterDropColumn() [all …]
|
| H A D | analyze.c | 1222 Index *pPk = sqlite3PrimaryKeyIndex(pIdx->pTable); in analyzeOneTable() local 1224 regKey = sqlite3GetTempRange(pParse, pPk->nKeyCol); in analyzeOneTable() 1225 for(j=0; j<pPk->nKeyCol; j++){ in analyzeOneTable() 1226 k = sqlite3TableColumnToIndex(pIdx, pPk->aiColumn[j]); in analyzeOneTable() 1231 sqlite3VdbeAddOp3(v, OP_MakeRecord, regKey, pPk->nKeyCol, regRowid); in analyzeOneTable() 1232 sqlite3ReleaseTempRange(pParse, regKey, pPk->nKeyCol); in analyzeOneTable()
|
| H A D | vdbeapi.c | 1940 if( p->pPk ){ in sqlite3_preupdate_old() 1941 iIdx = sqlite3TableColumnToIndex(p->pPk, iIdx); in sqlite3_preupdate_old() 2042 if( p->pPk && p->op!=SQLITE_UPDATE ){ in sqlite3_preupdate_new() 2043 iIdx = sqlite3TableColumnToIndex(p->pPk, iIdx); in sqlite3_preupdate_new()
|
| H A D | vdbeInt.h | 518 Index *pPk; /* PK index if pTab is WITHOUT ROWID */ member
|
| H A D | where.c | 6139 Index *pPk = sqlite3PrimaryKeyIndex(pTab); in sqlite3WhereBegin() local 6140 sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pRJ->iMatch, pPk->nKeyCol); in sqlite3WhereBegin() 6141 sqlite3VdbeSetP4KeyInfo(pParse, pPk); in sqlite3WhereBegin() 6516 Index *pPk = sqlite3PrimaryKeyIndex(pTab); in sqlite3WhereEnd() local 6517 x = pPk->aiColumn[x]; in sqlite3WhereEnd()
|
| H A D | select.c | 1050 Index *pPk = 0; in selectExprDefer() local 1052 pPk = sqlite3PrimaryKeyIndex(pTab); in selectExprDefer() 1053 nKey = pPk->nKeyCol; in selectExprDefer() 1061 pNew->iColumn = pPk ? pPk->aiColumn[k] : -1; in selectExprDefer()
|
| H A D | vdbeaux.c | 5283 preupdate.pPk = sqlite3PrimaryKeyIndex(pTab); in sqlite3VdbePreUpdateHook()
|