• Home
  • Raw
  • Download

Lines Matching refs:pC

78310 SQLITE_PRIVATE void sqlite3VdbeIncrWriteCounter(Vdbe *p, VdbeCursor *pC){
78311 if( pC==0
78312 || (pC->eCurType!=CURTYPE_SORTER
78313 && pC->eCurType!=CURTYPE_PSEUDO
78314 && !pC->isEphemeral)
80071 VdbeCursor *pC = p->apCsr[i];
80072 if( pC ){
80073 sqlite3VdbeFreeCursor(p, pC);
82538 VdbeCursor *pC, /* The cursor to compare against */
82547 assert( pC->eCurType==CURTYPE_BTREE );
82548 pCur = pC->uc.pCursor;
87708 VdbeCursor *pC; /* The VDBE cursor */
87710 pC = p->apCsr[pOp->p1];
87712 if( NEVER(pC==0) || pC->eCurType!=CURTYPE_BTREE ){
87715 sqlite3VdbeMemSetInt64(pOut, sqlite3BtreeOffset(pC->uc.pCursor));
87743 VdbeCursor *pC; /* The VDBE cursor */
87758 pC = p->apCsr[pOp->p1];
87759 assert( pC!=0 );
87765 rc = sqlite3VdbeCursorMoveto(&pC, &p2);
87771 assert( pC!=0 );
87772 assert( p2<pC->nField );
87773 aOffset = pC->aOffset;
87774 assert( pC->eCurType!=CURTYPE_VTAB );
87775 assert( pC->eCurType!=CURTYPE_PSEUDO || pC->nullRow );
87776 assert( pC->eCurType!=CURTYPE_SORTER );
87778 if( pC->cacheStatus!=p->cacheCtr ){ /*OPTIMIZATION-IF-FALSE*/
87779 if( pC->nullRow ){
87780 if( pC->eCurType==CURTYPE_PSEUDO ){
87783 assert( pC->seekResult>0 );
87784 pReg = &aMem[pC->seekResult];
87787 pC->payloadSize = pC->szRow = pReg->n;
87788 pC->aRow = (u8*)pReg->z;
87794 pCrsr = pC->uc.pCursor;
87795 assert( pC->eCurType==CURTYPE_BTREE );
87798 pC->payloadSize = sqlite3BtreePayloadSize(pCrsr);
87799 pC->aRow = sqlite3BtreePayloadFetch(pCrsr, &pC->szRow);
87800 assert( pC->szRow<=pC->payloadSize );
87801 assert( pC->szRow<=65536 ); /* Maximum page size is 64KiB */
87802 if( pC->payloadSize > (u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){
87806 pC->cacheStatus = p->cacheCtr;
87807 pC->iHdrOffset = getVarint32(pC->aRow, aOffset[0]);
87808 pC->nHdrParsed = 0;
87811 if( pC->szRow<aOffset[0] ){ /*OPTIMIZATION-IF-FALSE*/
87816 pC->aRow = 0;
87817 pC->szRow = 0;
87828 if( aOffset[0] > 98307 || aOffset[0] > pC->payloadSize ){
87845 zData = pC->aRow;
87846 assert( pC->nHdrParsed<=p2 ); /* Conditional skipped */
87855 if( pC->nHdrParsed<=p2 ){
87859 if( pC->iHdrOffset<aOffset[0] ){
87861 if( pC->aRow==0 ){
87863 rc = sqlite3VdbeMemFromBtreeZeroOffset(pC->uc.pCursor,aOffset[0],&sMem);
87867 zData = pC->aRow;
87872 i = pC->nHdrParsed;
87874 zHdr = zData + pC->iHdrOffset;
87878 if( (pC->aType[i] = t = zHdr[0])<0x80 ){
87883 pC->aType[i] = t;
87894 if( (zHdr>=zEndHdr && (zHdr>zEndHdr || offset64!=pC->payloadSize))
87895 || (offset64 > pC->payloadSize)
87901 if( pC->aRow==0 ) sqlite3VdbeMemRelease(&sMem);
87906 pC->nHdrParsed = i;
87907 pC->iHdrOffset = (u32)(zHdr - zData);
87908 if( pC->aRow==0 ) sqlite3VdbeMemRelease(&sMem);
87917 if( pC->nHdrParsed<=p2 ){
87926 t = pC->aType[p2];
87933 assert( p2<pC->nHdrParsed );
87939 assert( t==pC->aType[p2] );
87940 if( pC->szRow>=aOffset[p2+1] ){
87943 zData = pC->aRow + aOffset[p2];
87987 rc = sqlite3VdbeMemFromBtree(pC->uc.pCursor, aOffset[p2], len, pDest);
89153 VdbeCursor *pC;
89155 pC = p->apCsr[pOp->p1];
89156 assert( isSorter(pC) );
89157 if( (pC->seqCount++)==0 ){
89222 VdbeCursor *pC;
89223 pC = p->apCsr[pOp->p1];
89224 assert( pC->eCurType==CURTYPE_BTREE );
89225 pC->maskUsed = *(u64*)pOp->p4.pI64;
89326 VdbeCursor *pC; /* The cursor to seek */
89334 pC = p->apCsr[pOp->p1];
89335 assert( pC!=0 );
89336 assert( pC->eCurType==CURTYPE_BTREE );
89340 assert( pC->isOrdered );
89341 assert( pC->uc.pCursor!=0 );
89344 pC->nullRow = 0;
89346 pC->seekOp = pOp->opcode;
89349 pC->deferredMoveto = 0;
89350 pC->cacheStatus = CACHE_STALE;
89351 if( pC->isTable ){
89354 assert( sqlite3BtreeCursorHasHint(pC->uc.pCursor, BTREE_SEEK_EQ)==0
89377 rc = sqlite3BtreeLast(pC->uc.pCursor, &res);
89406 rc = sqlite3BtreeMovetoUnpacked(pC->uc.pCursor, 0, (u64)iKey, 0, &res);
89407 pC->movetoTarget = iKey; /* Used by OP_Delete */
89417 if( sqlite3BtreeCursorHasHint(pC->uc.pCursor, BTREE_SEEK_EQ) ){
89432 r.pKeyInfo = pC->pKeyInfo;
89453 rc = sqlite3BtreeMovetoUnpacked(pC->uc.pCursor, &r, 0, 0, &res);
89468 rc = sqlite3BtreeNext(pC->uc.pCursor, 0);
89484 rc = sqlite3BtreePrevious(pC->uc.pCursor, 0);
89497 res = sqlite3BtreeEof(pC->uc.pCursor);
89522 VdbeCursor *pC;
89524 pC = p->apCsr[pOp->p1];
89525 assert( pC!=0 );
89527 pC->seekHit = pOp->p2 & 1;
89632 VdbeCursor *pC;
89634 pC = p->apCsr[pOp->p1];
89635 assert( pC!=0 );
89636 if( pC->seekHit ) break;
89645 VdbeCursor *pC;
89657 pC = p->apCsr[pOp->p1];
89658 assert( pC!=0 );
89660 pC->seekOp = pOp->opcode;
89663 assert( pC->eCurType==CURTYPE_BTREE );
89664 assert( pC->uc.pCursor!=0 );
89665 assert( pC->isTable==0 );
89667 r.pKeyInfo = pC->pKeyInfo;
89684 pFree = pIdxKey = sqlite3VdbeAllocUnpackedRecord(pC->pKeyInfo);
89686 sqlite3VdbeRecordUnpack(pC->pKeyInfo, pIn3->n, pIn3->z, pIdxKey);
89701 rc = sqlite3BtreeMovetoUnpacked(pC->uc.pCursor, pIdxKey, 0, 0, &res);
89706 pC->seekResult = res;
89708 pC->nullRow = 1-alreadyExists;
89709 pC->deferredMoveto = 0;
89710 pC->cacheStatus = CACHE_STALE;
89769 VdbeCursor *pC;
89798 pC = p->apCsr[pOp->p1];
89799 assert( pC!=0 );
89801 if( pOp->opcode==OP_SeekRowid ) pC->seekOp = OP_SeekRowid;
89803 assert( pC->isTable );
89804 assert( pC->eCurType==CURTYPE_BTREE );
89805 pCrsr = pC->uc.pCursor;
89810 pC->movetoTarget = iKey; /* Used by OP_Delete */
89811 pC->nullRow = 0;
89812 pC->cacheStatus = CACHE_STALE;
89813 pC->deferredMoveto = 0;
89815 pC->seekResult = res;
89863 VdbeCursor *pC; /* Cursor of table to get the new rowid */
89873 pC = p->apCsr[pOp->p1];
89874 assert( pC!=0 );
89875 assert( pC->isTable );
89876 assert( pC->eCurType==CURTYPE_BTREE );
89877 assert( pC->uc.pCursor!=0 );
89892 assert( pC->isTable );
89904 if( !pC->useRandomRowid ){
89905 rc = sqlite3BtreeLast(pC->uc.pCursor, &res);
89912 assert( sqlite3BtreeCursorIsValid(pC->uc.pCursor) );
89913 v = sqlite3BtreeIntegerKey(pC->uc.pCursor);
89915 pC->useRandomRowid = 1;
89942 if( pMem->u.i==MAX_ROWID || pC->useRandomRowid ){
89952 if( pC->useRandomRowid ){
89963 }while( ((rc = sqlite3BtreeMovetoUnpacked(pC->uc.pCursor, 0, (u64)v,
89974 pC->deferredMoveto = 0;
89975 pC->cacheStatus = CACHE_STALE;
90021 VdbeCursor *pC; /* Cursor to table into which insert is written */
90030 pC = p->apCsr[pOp->p1];
90031 assert( pC!=0 );
90032 assert( pC->eCurType==CURTYPE_BTREE );
90033 assert( pC->deferredMoveto==0 );
90034 assert( pC->uc.pCursor!=0 );
90035 assert( (pOp->p5 & OPFLAG_ISNOOP) || pC->isTable );
90038 sqlite3VdbeIncrWriteCounter(p, pC);
90047 assert( pC->iDb>=0 );
90048 zDb = db->aDb[pC->iDb].zDbSName;
90060 sqlite3VdbePreUpdateHook(p, pC, SQLITE_INSERT, zDb, pTab, x.nKey,pOp->p2);
90075 seekResult = ((pOp->p5 & OPFLAG_USESEEKRESULT) ? pC->seekResult : 0);
90082 rc = sqlite3BtreeInsert(pC->uc.pCursor, &x,
90085 pC->deferredMoveto = 0;
90086 pC->cacheStatus = CACHE_STALE;
90136 VdbeCursor *pC;
90143 pC = p->apCsr[pOp->p1];
90144 assert( pC!=0 );
90145 assert( pC->eCurType==CURTYPE_BTREE );
90146 assert( pC->uc.pCursor!=0 );
90147 assert( pC->deferredMoveto==0 );
90148 sqlite3VdbeIncrWriteCounter(p, pC);
90154 && sqlite3BtreeCursorIsValidNN(pC->uc.pCursor)
90159 i64 iKey = sqlite3BtreeIntegerKey(pC->uc.pCursor);
90160 assert( CORRUPT_DB || pC->movetoTarget==iKey );
90170 assert( pC->iDb>=0 );
90172 zDb = db->aDb[pC->iDb].zDbSName;
90174 if( (pOp->p5 & OPFLAG_SAVEPOSITION)!=0 && pC->isTable ){
90175 pC->movetoTarget = sqlite3BtreeIntegerKey(pC->uc.pCursor);
90189 sqlite3VdbePreUpdateHook(p, pC,
90191 zDb, pTab, pC->movetoTarget,
90205 if( pC->isEphemeral==0
90207 && (pC->wrFlag & OPFLAG_FORDELETE)==0
90217 rc = sqlite3BtreeDelete(pC->uc.pCursor, pOp->p5);
90218 pC->cacheStatus = CACHE_STALE;
90219 pC->seekResult = 0;
90227 pC->movetoTarget);
90228 assert( pC->iDb>=0 );
90263 VdbeCursor *pC;
90267 pC = p->apCsr[pOp->p1];
90268 assert( isSorter(pC) );
90273 rc = sqlite3VdbeSorterCompare(pC, pIn3, nKeyCol, &res);
90293 VdbeCursor *pC;
90296 pC = p->apCsr[pOp->p1];
90297 assert( isSorter(pC) );
90298 rc = sqlite3VdbeSorterRowkey(pC, pOut);
90335 VdbeCursor *pC;
90342 pC = p->apCsr[pOp->p1];
90343 assert( pC!=0 );
90344 assert( pC->eCurType==CURTYPE_BTREE );
90345 assert( isSorter(pC)==0 );
90346 assert( pC->nullRow==0 );
90347 assert( pC->uc.pCursor!=0 );
90348 pCrsr = pC->uc.pCursor;
90358 assert( pC->deferredMoveto==0 );
90361 rc = sqlite3VdbeCursorMoveto(pC);
90389 VdbeCursor *pC;
90396 pC = p->apCsr[pOp->p1];
90397 assert( pC!=0 );
90398 assert( pC->eCurType!=CURTYPE_PSEUDO || pC->nullRow );
90399 if( pC->nullRow ){
90402 }else if( pC->deferredMoveto ){
90403 v = pC->movetoTarget;
90405 }else if( pC->eCurType==CURTYPE_VTAB ){
90406 assert( pC->uc.pVCur!=0 );
90407 pVtab = pC->uc.pVCur->pVtab;
90410 rc = pModule->xRowid(pC->uc.pVCur, &v);
90415 assert( pC->eCurType==CURTYPE_BTREE );
90416 assert( pC->uc.pCursor!=0 );
90417 rc = sqlite3VdbeCursorRestore(pC);
90419 if( pC->nullRow ){
90423 v = sqlite3BtreeIntegerKey(pC->uc.pCursor);
90436 VdbeCursor *pC;
90439 pC = p->apCsr[pOp->p1];
90440 assert( pC!=0 );
90441 pC->nullRow = 1;
90442 pC->cacheStatus = CACHE_STALE;
90443 if( pC->eCurType==CURTYPE_BTREE ){
90444 assert( pC->uc.pCursor!=0 );
90445 sqlite3BtreeClearCursor(pC->uc.pCursor);
90448 if( pC->seekOp==0 ) pC->seekOp = OP_NullRow;
90477 VdbeCursor *pC;
90482 pC = p->apCsr[pOp->p1];
90483 assert( pC!=0 );
90484 assert( pC->eCurType==CURTYPE_BTREE );
90485 pCrsr = pC->uc.pCursor;
90489 pC->seekOp = pOp->opcode;
90493 pC->seekResult = -1;
90499 pC->nullRow = (u8)res;
90500 pC->deferredMoveto = 0;
90501 pC->cacheStatus = CACHE_STALE;
90516 VdbeCursor *pC;
90522 pC = p->apCsr[pOp->p1];
90523 assert( pC!=0 );
90524 pCrsr = pC->uc.pCursor;
90581 VdbeCursor *pC;
90587 pC = p->apCsr[pOp->p1];
90588 assert( pC!=0 );
90589 assert( isSorter(pC)==(pOp->opcode==OP_SorterSort) );
90592 pC->seekOp = OP_Rewind;
90594 if( isSorter(pC) ){
90595 rc = sqlite3VdbeSorterRewind(pC, &res);
90597 assert( pC->eCurType==CURTYPE_BTREE );
90598 pCrsr = pC->uc.pCursor;
90601 pC->deferredMoveto = 0;
90602 pC->cacheStatus = CACHE_STALE;
90605 pC->nullRow = (u8)res;
90673 VdbeCursor *pC;
90675 pC = p->apCsr[pOp->p1];
90676 assert( isSorter(pC) );
90677 rc = sqlite3VdbeSorterNext(db, pC);
90683 pC = p->apCsr[pOp->p1];
90684 assert( pC!=0 );
90685 assert( pC->deferredMoveto==0 );
90686 assert( pC->eCurType==CURTYPE_BTREE );
90693 || pC->seekOp==OP_SeekGT || pC->seekOp==OP_SeekGE
90694 || pC->seekOp==OP_Rewind || pC->seekOp==OP_Found
90695 || pC->seekOp==OP_NullRow|| pC->seekOp==OP_SeekRowid
90696 || pC->seekOp==OP_IfNoHope);
90698 || pC->seekOp==OP_SeekLT || pC->seekOp==OP_SeekLE
90699 || pC->seekOp==OP_Last || pC->seekOp==OP_IfNoHope
90700 || pC->seekOp==OP_NullRow);
90702 rc = pOp->p4.xAdvance(pC->uc.pCursor, pOp->p3);
90704 pC->cacheStatus = CACHE_STALE;
90707 pC->nullRow = 0;
90716 pC->nullRow = 1;
90749 VdbeCursor *pC;
90753 pC = p->apCsr[pOp->p1];
90754 sqlite3VdbeIncrWriteCounter(p, pC);
90755 assert( pC!=0 );
90756 assert( !isSorter(pC) );
90760 assert( pC->eCurType==CURTYPE_BTREE );
90761 assert( pC->isTable==0 );
90768 rc = sqlite3BtreeInsert(pC->uc.pCursor, &x,
90770 ((pOp->p5 & OPFLAG_USESEEKRESULT) ? pC->seekResult : 0)
90772 assert( pC->deferredMoveto==0 );
90773 pC->cacheStatus = CACHE_STALE;
90786 VdbeCursor *pC;
90789 pC = p->apCsr[pOp->p1];
90790 sqlite3VdbeIncrWriteCounter(p, pC);
90791 assert( pC!=0 );
90792 assert( isSorter(pC) );
90795 assert( pC->isTable==0 );
90798 rc = sqlite3VdbeSorterWrite(pC, pIn2);
90818 VdbeCursor *pC;
90826 pC = p->apCsr[pOp->p1];
90827 assert( pC!=0 );
90828 assert( pC->eCurType==CURTYPE_BTREE );
90829 sqlite3VdbeIncrWriteCounter(p, pC);
90830 pCrsr = pC->uc.pCursor;
90832 r.pKeyInfo = pC->pKeyInfo;
90845 assert( pC->deferredMoveto==0 );
90846 pC->cacheStatus = CACHE_STALE;
90847 pC->seekResult = 0;
90881 VdbeCursor *pC; /* The P1 index cursor */
90886 pC = p->apCsr[pOp->p1];
90887 assert( pC!=0 );
90888 assert( pC->eCurType==CURTYPE_BTREE );
90889 assert( pC->uc.pCursor!=0 );
90890 assert( pC->isTable==0 );
90891 assert( pC->deferredMoveto==0 );
90892 assert( !pC->nullRow || pOp->opcode==OP_IdxRowid );
90896 rc = sqlite3VdbeCursorRestore(pC);
90903 if( !pC->nullRow ){
90905 rc = sqlite3VdbeIdxRowid(db, pC->uc.pCursor, &rowid);
90921 pTabCur->pAltCursor = pC;
90940 VdbeCursor *pC; /* The P1 index cursor */
90943 pC = p->apCsr[pOp->p1];
90944 if( pC->deferredMoveto ){
90945 rc = sqlite3VdbeFinishMoveto(pC);
90999 VdbeCursor *pC;
91004 pC = p->apCsr[pOp->p1];
91005 assert( pC!=0 );
91006 assert( pC->isOrdered );
91007 assert( pC->eCurType==CURTYPE_BTREE );
91008 assert( pC->uc.pCursor!=0);
91009 assert( pC->deferredMoveto==0 );
91012 r.pKeyInfo = pC->pKeyInfo;
91032 rc = sqlite3VdbeIdxKeyCompare(db, pC, &r, &res);
91156 VdbeCursor *pC;
91159 pC = p->apCsr[pOp->p1];
91160 assert( pC!=0 );
91161 if( isSorter(pC) ){
91162 sqlite3VdbeSorterReset(db, pC->uc.pSorter);
91164 assert( pC->eCurType==CURTYPE_BTREE );
91165 assert( pC->isEphemeral );
91166 rc = sqlite3BtreeClearTableOfCursor(pC->uc.pCursor);
92263 VdbeCursor *pC;
92265 pC = p->apCsr[pOp->p1];
92266 assert( pC!=0 );
92267 assert( pC->eCurType==CURTYPE_BTREE );
92268 sqlite3BtreeCursorPin(pC->uc.pCursor);
92278 VdbeCursor *pC;
92280 pC = p->apCsr[pOp->p1];
92281 assert( pC!=0 );
92282 assert( pC->eCurType==CURTYPE_BTREE );
92283 sqlite3BtreeCursorUnpin(pC->uc.pCursor);
92962 VdbeCursor *pC;
92966 pC = p->apCsr[pOp->p1];
92967 if( pC ){
92968 assert( pC->eCurType==CURTYPE_BTREE );
92969 sqlite3BtreeCursorHint(pC->uc.pCursor, BTREE_HINT_RANGE,
93251 VdbeCursor *pC = v->apCsr[0];
93252 u32 type = pC->nHdrParsed>p->iCol ? pC->aType[p->iCol] : 0;
93253 testcase( pC->nHdrParsed==p->iCol );
93254 testcase( pC->nHdrParsed==p->iCol+1 );
93263 p->iOffset = pC->aType[p->iCol + pC->nField];
93265 p->pCsr = pC->uc.pCursor;
129184 SQLITE_PRIVATE int sqlite3JoinType(Parse *pParse, Token *pA, Token *pB, Token *pC){
129206 apAll[2] = pC;
129228 if( pC==0 ){ zSp++; }
129230 "%T %T%s%T", pA, pB, zSp, pC);
134389 struct AggInfo_col *pC;
134461 for(i=0, pC=pAggInfo->aCol; i<pAggInfo->nAccumulator; i++, pC++){
134462 sqlite3ExprCode(pParse, pC->pExpr, pC->iMem);
144591 u8 c, *pC; /* Last character before the first wildcard */
144592 pC = (u8*)&pStr2->u.zToken[sqlite3Strlen30(pStr2->u.zToken)-1];
144593 c = *pC;
144604 *pC = c + 1;
148280 CollSeq *pC = 0;
148284 pC = sqlite3ExprCompareCollSeq(pHidden->pParse, pX);
148286 zRet = (pC ? pC->zName : sqlite3StrBINARY);
182865 sqlite3_tokenizer_cursor *pC;
182871 rc = sqlite3Fts3OpenTokenizer(pTab->pTokenizer, iLangid, zDoc, nDoc, &pC);
182877 rc = pMod->xNext(pC, &ZDUMMY, &DUMMY1, &DUMMY2, &DUMMY3, &iCurrent);
182879 pMod->xClose(pC);
182919 sqlite3_tokenizer_cursor *pC; /* Tokenizer cursor open on zDoc/nDoc */
182932 rc = sqlite3Fts3OpenTokenizer(pTab->pTokenizer, pCsr->iLangid, zDoc,nDoc,&pC);
182955 rc = pMod->xNext(pC, &ZDUMMY, &DUMMY1, &iBegin, &iFin, &iCurrent);
183007 pMod->xClose(pC);
183804 sqlite3_tokenizer_cursor *pC; /* Tokenizer cursor */
183839 zDoc, nDoc, &pC
183843 rc = pMod->xNext(pC, &ZDUMMY, &NDUMMY, &iStart, &iEnd, &iCurrent);
183868 rc = pMod->xNext(pC, &ZDUMMY, &NDUMMY, &iStart, &iEnd, &iCurrent);
183885 pMod->xClose(pC);
184247 sqlite3_tokenizer_cursor *pC, /* Cursor returned by simpleOpen */
184254 unicode_cursor *pCsr = (unicode_cursor *)pC;
202905 SessionChange *pC;
202906 for(pC=pTab->apChange[iHash]; pC; pC=pC->pNext){
202907 if( sessionPreupdateEqual(pSession, pTab, pC, op) ) break;
202910 if( pC==0 ){
202973 }else if( pC->bIndirect ){
202979 pC->bIndirect = 0;
225205 Fts5Config *pC = p->pConfig;
225211 pC->zContentExprlist, pC->zContent
225217 zSql = sqlite3_mprintf(azStmt[eStmt], pC->zContentExprlist,
225218 pC->zContent, pC->zContentRowid, pC->zContentRowid,
225219 pC->zContentRowid
225225 pC->zContentExprlist, pC->zContent, pC->zContentRowid
225231 int nCol = pC->nCol + 1;
225242 zSql = sqlite3_mprintf(azStmt[eStmt], pC->zDb, pC->zName, zBind);
225249 zSql = sqlite3_mprintf(azStmt[eStmt], pC->zDb, pC->zName);
225259 rc = sqlite3_prepare_v3(pC->db, zSql, -1, f, &p->aStmt[eStmt], 0);
225263 *pzErrMsg = sqlite3_mprintf("%s", sqlite3_errmsg(pC->db));