• Home
  • Raw
  • Download

Lines Matching refs:pC

78485 SQLITE_PRIVATE void sqlite3VdbeIncrWriteCounter(Vdbe *p, VdbeCursor *pC){
78486 if( pC==0
78487 || (pC->eCurType!=CURTYPE_SORTER
78488 && pC->eCurType!=CURTYPE_PSEUDO
78489 && !pC->isEphemeral)
80247 VdbeCursor *pC = p->apCsr[i];
80248 if( pC ){
80249 sqlite3VdbeFreeCursor(p, pC);
82720 VdbeCursor *pC, /* The cursor to compare against */
82729 assert( pC->eCurType==CURTYPE_BTREE );
82730 pCur = pC->uc.pCursor;
87891 VdbeCursor *pC; /* The VDBE cursor */
87893 pC = p->apCsr[pOp->p1];
87895 if( NEVER(pC==0) || pC->eCurType!=CURTYPE_BTREE ){
87898 sqlite3VdbeMemSetInt64(pOut, sqlite3BtreeOffset(pC->uc.pCursor));
87926 VdbeCursor *pC; /* The VDBE cursor */
87941 pC = p->apCsr[pOp->p1];
87942 assert( pC!=0 );
87948 rc = sqlite3VdbeCursorMoveto(&pC, &p2);
87954 assert( pC!=0 );
87955 assert( p2<(u32)pC->nField );
87956 aOffset = pC->aOffset;
87957 assert( pC->eCurType!=CURTYPE_VTAB );
87958 assert( pC->eCurType!=CURTYPE_PSEUDO || pC->nullRow );
87959 assert( pC->eCurType!=CURTYPE_SORTER );
87961 if( pC->cacheStatus!=p->cacheCtr ){ /*OPTIMIZATION-IF-FALSE*/
87962 if( pC->nullRow ){
87963 if( pC->eCurType==CURTYPE_PSEUDO ){
87966 assert( pC->seekResult>0 );
87967 pReg = &aMem[pC->seekResult];
87970 pC->payloadSize = pC->szRow = pReg->n;
87971 pC->aRow = (u8*)pReg->z;
87977 pCrsr = pC->uc.pCursor;
87978 assert( pC->eCurType==CURTYPE_BTREE );
87981 pC->payloadSize = sqlite3BtreePayloadSize(pCrsr);
87982 pC->aRow = sqlite3BtreePayloadFetch(pCrsr, &pC->szRow);
87983 assert( pC->szRow<=pC->payloadSize );
87984 assert( pC->szRow<=65536 ); /* Maximum page size is 64KiB */
87985 if( pC->payloadSize > (u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){
87989 pC->cacheStatus = p->cacheCtr;
87990 pC->iHdrOffset = getVarint32(pC->aRow, aOffset[0]);
87991 pC->nHdrParsed = 0;
87994 if( pC->szRow<aOffset[0] ){ /*OPTIMIZATION-IF-FALSE*/
87999 pC->aRow = 0;
88000 pC->szRow = 0;
88011 if( aOffset[0] > 98307 || aOffset[0] > pC->payloadSize ){
88028 zData = pC->aRow;
88029 assert( pC->nHdrParsed<=p2 ); /* Conditional skipped */
88038 if( pC->nHdrParsed<=p2 ){
88042 if( pC->iHdrOffset<aOffset[0] ){
88044 if( pC->aRow==0 ){
88046 rc = sqlite3VdbeMemFromBtreeZeroOffset(pC->uc.pCursor,aOffset[0],&sMem);
88050 zData = pC->aRow;
88055 i = pC->nHdrParsed;
88057 zHdr = zData + pC->iHdrOffset;
88061 if( (pC->aType[i] = t = zHdr[0])<0x80 ){
88066 pC->aType[i] = t;
88077 if( (zHdr>=zEndHdr && (zHdr>zEndHdr || offset64!=pC->payloadSize))
88078 || (offset64 > pC->payloadSize)
88084 if( pC->aRow==0 ) sqlite3VdbeMemRelease(&sMem);
88089 pC->nHdrParsed = i;
88090 pC->iHdrOffset = (u32)(zHdr - zData);
88091 if( pC->aRow==0 ) sqlite3VdbeMemRelease(&sMem);
88100 if( pC->nHdrParsed<=p2 ){
88109 t = pC->aType[p2];
88116 assert( p2<pC->nHdrParsed );
88122 assert( t==pC->aType[p2] );
88123 if( pC->szRow>=aOffset[p2+1] ){
88126 zData = pC->aRow + aOffset[p2];
88170 rc = sqlite3VdbeMemFromBtree(pC->uc.pCursor, aOffset[p2], len, pDest);
89354 VdbeCursor *pC;
89356 pC = p->apCsr[pOp->p1];
89357 assert( isSorter(pC) );
89358 if( (pC->seqCount++)==0 ){
89423 VdbeCursor *pC;
89424 pC = p->apCsr[pOp->p1];
89425 assert( pC->eCurType==CURTYPE_BTREE );
89426 pC->maskUsed = *(u64*)pOp->p4.pI64;
89527 VdbeCursor *pC; /* The cursor to seek */
89535 pC = p->apCsr[pOp->p1];
89536 assert( pC!=0 );
89537 assert( pC->eCurType==CURTYPE_BTREE );
89541 assert( pC->isOrdered );
89542 assert( pC->uc.pCursor!=0 );
89545 pC->nullRow = 0;
89547 pC->seekOp = pOp->opcode;
89550 pC->deferredMoveto = 0;
89551 pC->cacheStatus = CACHE_STALE;
89552 if( pC->isTable ){
89555 assert( sqlite3BtreeCursorHasHint(pC->uc.pCursor, BTREE_SEEK_EQ)==0
89578 rc = sqlite3BtreeLast(pC->uc.pCursor, &res);
89607 rc = sqlite3BtreeMovetoUnpacked(pC->uc.pCursor, 0, (u64)iKey, 0, &res);
89608 pC->movetoTarget = iKey; /* Used by OP_Delete */
89618 if( sqlite3BtreeCursorHasHint(pC->uc.pCursor, BTREE_SEEK_EQ) ){
89633 r.pKeyInfo = pC->pKeyInfo;
89654 rc = sqlite3BtreeMovetoUnpacked(pC->uc.pCursor, &r, 0, 0, &res);
89669 rc = sqlite3BtreeNext(pC->uc.pCursor, 0);
89685 rc = sqlite3BtreePrevious(pC->uc.pCursor, 0);
89698 res = sqlite3BtreeEof(pC->uc.pCursor);
89723 VdbeCursor *pC;
89725 pC = p->apCsr[pOp->p1];
89726 assert( pC!=0 );
89728 pC->seekHit = pOp->p2 & 1;
89833 VdbeCursor *pC;
89835 pC = p->apCsr[pOp->p1];
89836 assert( pC!=0 );
89837 if( pC->seekHit ) break;
89847 VdbeCursor *pC;
89859 pC = p->apCsr[pOp->p1];
89860 assert( pC!=0 );
89862 pC->seekOp = pOp->opcode;
89865 assert( pC->eCurType==CURTYPE_BTREE );
89866 assert( pC->uc.pCursor!=0 );
89867 assert( pC->isTable==0 );
89869 r.pKeyInfo = pC->pKeyInfo;
89886 pFree = pIdxKey = sqlite3VdbeAllocUnpackedRecord(pC->pKeyInfo);
89888 sqlite3VdbeRecordUnpack(pC->pKeyInfo, pIn3->n, pIn3->z, pIdxKey);
89903 rc = sqlite3BtreeMovetoUnpacked(pC->uc.pCursor, pIdxKey, 0, 0, &res);
89908 pC->seekResult = res;
89910 pC->nullRow = 1-alreadyExists;
89911 pC->deferredMoveto = 0;
89912 pC->cacheStatus = CACHE_STALE;
89971 VdbeCursor *pC;
90001 pC = p->apCsr[pOp->p1];
90002 assert( pC!=0 );
90004 if( pOp->opcode==OP_SeekRowid ) pC->seekOp = OP_SeekRowid;
90006 assert( pC->isTable );
90007 assert( pC->eCurType==CURTYPE_BTREE );
90008 pCrsr = pC->uc.pCursor;
90013 pC->movetoTarget = iKey; /* Used by OP_Delete */
90014 pC->nullRow = 0;
90015 pC->cacheStatus = CACHE_STALE;
90016 pC->deferredMoveto = 0;
90018 pC->seekResult = res;
90066 VdbeCursor *pC; /* Cursor of table to get the new rowid */
90076 pC = p->apCsr[pOp->p1];
90077 assert( pC!=0 );
90078 assert( pC->isTable );
90079 assert( pC->eCurType==CURTYPE_BTREE );
90080 assert( pC->uc.pCursor!=0 );
90095 assert( pC->isTable );
90107 if( !pC->useRandomRowid ){
90108 rc = sqlite3BtreeLast(pC->uc.pCursor, &res);
90115 assert( sqlite3BtreeCursorIsValid(pC->uc.pCursor) );
90116 v = sqlite3BtreeIntegerKey(pC->uc.pCursor);
90118 pC->useRandomRowid = 1;
90145 if( pMem->u.i==MAX_ROWID || pC->useRandomRowid ){
90155 if( pC->useRandomRowid ){
90166 }while( ((rc = sqlite3BtreeMovetoUnpacked(pC->uc.pCursor, 0, (u64)v,
90177 pC->deferredMoveto = 0;
90178 pC->cacheStatus = CACHE_STALE;
90224 VdbeCursor *pC; /* Cursor to table into which insert is written */
90233 pC = p->apCsr[pOp->p1];
90234 assert( pC!=0 );
90235 assert( pC->eCurType==CURTYPE_BTREE );
90236 assert( pC->deferredMoveto==0 );
90237 assert( pC->uc.pCursor!=0 );
90238 assert( (pOp->p5 & OPFLAG_ISNOOP) || pC->isTable );
90241 sqlite3VdbeIncrWriteCounter(p, pC);
90250 assert( pC->iDb>=0 );
90251 zDb = db->aDb[pC->iDb].zDbSName;
90263 sqlite3VdbePreUpdateHook(p, pC, SQLITE_INSERT, zDb, pTab, x.nKey,pOp->p2);
90278 seekResult = ((pOp->p5 & OPFLAG_USESEEKRESULT) ? pC->seekResult : 0);
90285 rc = sqlite3BtreeInsert(pC->uc.pCursor, &x,
90288 pC->deferredMoveto = 0;
90289 pC->cacheStatus = CACHE_STALE;
90339 VdbeCursor *pC;
90346 pC = p->apCsr[pOp->p1];
90347 assert( pC!=0 );
90348 assert( pC->eCurType==CURTYPE_BTREE );
90349 assert( pC->uc.pCursor!=0 );
90350 assert( pC->deferredMoveto==0 );
90351 sqlite3VdbeIncrWriteCounter(p, pC);
90357 && sqlite3BtreeCursorIsValidNN(pC->uc.pCursor)
90362 i64 iKey = sqlite3BtreeIntegerKey(pC->uc.pCursor);
90363 assert( CORRUPT_DB || pC->movetoTarget==iKey );
90373 assert( pC->iDb>=0 );
90375 zDb = db->aDb[pC->iDb].zDbSName;
90377 if( (pOp->p5 & OPFLAG_SAVEPOSITION)!=0 && pC->isTable ){
90378 pC->movetoTarget = sqlite3BtreeIntegerKey(pC->uc.pCursor);
90392 sqlite3VdbePreUpdateHook(p, pC,
90394 zDb, pTab, pC->movetoTarget,
90408 if( pC->isEphemeral==0
90410 && (pC->wrFlag & OPFLAG_FORDELETE)==0
90420 rc = sqlite3BtreeDelete(pC->uc.pCursor, pOp->p5);
90421 pC->cacheStatus = CACHE_STALE;
90422 pC->seekResult = 0;
90430 pC->movetoTarget);
90431 assert( pC->iDb>=0 );
90466 VdbeCursor *pC;
90470 pC = p->apCsr[pOp->p1];
90471 assert( isSorter(pC) );
90476 rc = sqlite3VdbeSorterCompare(pC, pIn3, nKeyCol, &res);
90496 VdbeCursor *pC;
90499 pC = p->apCsr[pOp->p1];
90500 assert( isSorter(pC) );
90501 rc = sqlite3VdbeSorterRowkey(pC, pOut);
90538 VdbeCursor *pC;
90545 pC = p->apCsr[pOp->p1];
90546 assert( pC!=0 );
90547 assert( pC->eCurType==CURTYPE_BTREE );
90548 assert( isSorter(pC)==0 );
90549 assert( pC->nullRow==0 );
90550 assert( pC->uc.pCursor!=0 );
90551 pCrsr = pC->uc.pCursor;
90561 assert( pC->deferredMoveto==0 );
90588 VdbeCursor *pC;
90595 pC = p->apCsr[pOp->p1];
90596 assert( pC!=0 );
90597 assert( pC->eCurType!=CURTYPE_PSEUDO || pC->nullRow );
90598 if( pC->nullRow ){
90601 }else if( pC->deferredMoveto ){
90602 v = pC->movetoTarget;
90604 }else if( pC->eCurType==CURTYPE_VTAB ){
90605 assert( pC->uc.pVCur!=0 );
90606 pVtab = pC->uc.pVCur->pVtab;
90609 rc = pModule->xRowid(pC->uc.pVCur, &v);
90614 assert( pC->eCurType==CURTYPE_BTREE );
90615 assert( pC->uc.pCursor!=0 );
90616 rc = sqlite3VdbeCursorRestore(pC);
90618 if( pC->nullRow ){
90622 v = sqlite3BtreeIntegerKey(pC->uc.pCursor);
90635 VdbeCursor *pC;
90638 pC = p->apCsr[pOp->p1];
90639 assert( pC!=0 );
90640 pC->nullRow = 1;
90641 pC->cacheStatus = CACHE_STALE;
90642 if( pC->eCurType==CURTYPE_BTREE ){
90643 assert( pC->uc.pCursor!=0 );
90644 sqlite3BtreeClearCursor(pC->uc.pCursor);
90647 if( pC->seekOp==0 ) pC->seekOp = OP_NullRow;
90676 VdbeCursor *pC;
90681 pC = p->apCsr[pOp->p1];
90682 assert( pC!=0 );
90683 assert( pC->eCurType==CURTYPE_BTREE );
90684 pCrsr = pC->uc.pCursor;
90688 pC->seekOp = pOp->opcode;
90692 pC->seekResult = -1;
90698 pC->nullRow = (u8)res;
90699 pC->deferredMoveto = 0;
90700 pC->cacheStatus = CACHE_STALE;
90715 VdbeCursor *pC;
90721 pC = p->apCsr[pOp->p1];
90722 assert( pC!=0 );
90723 pCrsr = pC->uc.pCursor;
90781 VdbeCursor *pC;
90787 pC = p->apCsr[pOp->p1];
90788 assert( pC!=0 );
90789 assert( isSorter(pC)==(pOp->opcode==OP_SorterSort) );
90792 pC->seekOp = OP_Rewind;
90794 if( isSorter(pC) ){
90795 rc = sqlite3VdbeSorterRewind(pC, &res);
90797 assert( pC->eCurType==CURTYPE_BTREE );
90798 pCrsr = pC->uc.pCursor;
90801 pC->deferredMoveto = 0;
90802 pC->cacheStatus = CACHE_STALE;
90805 pC->nullRow = (u8)res;
90873 VdbeCursor *pC;
90875 pC = p->apCsr[pOp->p1];
90876 assert( isSorter(pC) );
90877 rc = sqlite3VdbeSorterNext(db, pC);
90883 pC = p->apCsr[pOp->p1];
90884 assert( pC!=0 );
90885 assert( pC->deferredMoveto==0 );
90886 assert( pC->eCurType==CURTYPE_BTREE );
90893 || pC->seekOp==OP_SeekGT || pC->seekOp==OP_SeekGE
90894 || pC->seekOp==OP_Rewind || pC->seekOp==OP_Found
90895 || pC->seekOp==OP_NullRow|| pC->seekOp==OP_SeekRowid
90896 || pC->seekOp==OP_IfNoHope);
90898 || pC->seekOp==OP_SeekLT || pC->seekOp==OP_SeekLE
90899 || pC->seekOp==OP_Last || pC->seekOp==OP_IfNoHope
90900 || pC->seekOp==OP_NullRow);
90902 rc = pOp->p4.xAdvance(pC->uc.pCursor, pOp->p3);
90904 pC->cacheStatus = CACHE_STALE;
90907 pC->nullRow = 0;
90916 pC->nullRow = 1;
90949 VdbeCursor *pC;
90953 pC = p->apCsr[pOp->p1];
90954 sqlite3VdbeIncrWriteCounter(p, pC);
90955 assert( pC!=0 );
90956 assert( !isSorter(pC) );
90960 assert( pC->eCurType==CURTYPE_BTREE );
90961 assert( pC->isTable==0 );
90968 rc = sqlite3BtreeInsert(pC->uc.pCursor, &x,
90970 ((pOp->p5 & OPFLAG_USESEEKRESULT) ? pC->seekResult : 0)
90972 assert( pC->deferredMoveto==0 );
90973 pC->cacheStatus = CACHE_STALE;
90986 VdbeCursor *pC;
90989 pC = p->apCsr[pOp->p1];
90990 sqlite3VdbeIncrWriteCounter(p, pC);
90991 assert( pC!=0 );
90992 assert( isSorter(pC) );
90995 assert( pC->isTable==0 );
90998 rc = sqlite3VdbeSorterWrite(pC, pIn2);
91018 VdbeCursor *pC;
91026 pC = p->apCsr[pOp->p1];
91027 assert( pC!=0 );
91028 assert( pC->eCurType==CURTYPE_BTREE );
91029 sqlite3VdbeIncrWriteCounter(p, pC);
91030 pCrsr = pC->uc.pCursor;
91032 r.pKeyInfo = pC->pKeyInfo;
91045 assert( pC->deferredMoveto==0 );
91046 pC->cacheStatus = CACHE_STALE;
91047 pC->seekResult = 0;
91081 VdbeCursor *pC; /* The P1 index cursor */
91086 pC = p->apCsr[pOp->p1];
91087 assert( pC!=0 );
91088 assert( pC->eCurType==CURTYPE_BTREE );
91089 assert( pC->uc.pCursor!=0 );
91090 assert( pC->isTable==0 );
91091 assert( pC->deferredMoveto==0 );
91092 assert( !pC->nullRow || pOp->opcode==OP_IdxRowid );
91096 rc = sqlite3VdbeCursorRestore(pC);
91103 if( !pC->nullRow ){
91105 rc = sqlite3VdbeIdxRowid(db, pC->uc.pCursor, &rowid);
91121 pTabCur->pAltCursor = pC;
91140 VdbeCursor *pC; /* The P1 index cursor */
91143 pC = p->apCsr[pOp->p1];
91144 if( pC->deferredMoveto ){
91145 rc = sqlite3VdbeFinishMoveto(pC);
91199 VdbeCursor *pC;
91204 pC = p->apCsr[pOp->p1];
91205 assert( pC!=0 );
91206 assert( pC->isOrdered );
91207 assert( pC->eCurType==CURTYPE_BTREE );
91208 assert( pC->uc.pCursor!=0);
91209 assert( pC->deferredMoveto==0 );
91212 r.pKeyInfo = pC->pKeyInfo;
91232 rc = sqlite3VdbeIdxKeyCompare(db, pC, &r, &res);
91356 VdbeCursor *pC;
91359 pC = p->apCsr[pOp->p1];
91360 assert( pC!=0 );
91361 if( isSorter(pC) ){
91362 sqlite3VdbeSorterReset(db, pC->uc.pSorter);
91364 assert( pC->eCurType==CURTYPE_BTREE );
91365 assert( pC->isEphemeral );
91366 rc = sqlite3BtreeClearTableOfCursor(pC->uc.pCursor);
92465 VdbeCursor *pC;
92467 pC = p->apCsr[pOp->p1];
92468 assert( pC!=0 );
92469 assert( pC->eCurType==CURTYPE_BTREE );
92470 sqlite3BtreeCursorPin(pC->uc.pCursor);
92480 VdbeCursor *pC;
92482 pC = p->apCsr[pOp->p1];
92483 assert( pC!=0 );
92484 assert( pC->eCurType==CURTYPE_BTREE );
92485 sqlite3BtreeCursorUnpin(pC->uc.pCursor);
93163 VdbeCursor *pC;
93167 pC = p->apCsr[pOp->p1];
93168 if( pC ){
93169 assert( pC->eCurType==CURTYPE_BTREE );
93170 sqlite3BtreeCursorHint(pC->uc.pCursor, BTREE_HINT_RANGE,
93450 VdbeCursor *pC = v->apCsr[0];
93451 u32 type = pC->nHdrParsed>p->iCol ? pC->aType[p->iCol] : 0;
93452 testcase( pC->nHdrParsed==p->iCol );
93453 testcase( pC->nHdrParsed==p->iCol+1 );
93462 p->iOffset = pC->aType[p->iCol + pC->nField];
93464 p->pCsr = pC->uc.pCursor;
129503 SQLITE_PRIVATE int sqlite3JoinType(Parse *pParse, Token *pA, Token *pB, Token *pC){
129525 apAll[2] = pC;
129547 if( pC==0 ){ zSp++; }
129549 "%T %T%s%T", pA, pB, zSp, pC);
134764 struct AggInfo_col *pC;
134840 for(i=0, pC=pAggInfo->aCol; i<pAggInfo->nAccumulator; i++, pC++){
134841 sqlite3ExprCode(pParse, pC->pCExpr, pC->iMem);
145235 u8 c, *pC; /* Last character before the first wildcard */
145236 pC = (u8*)&pStr2->u.zToken[sqlite3Strlen30(pStr2->u.zToken)-1];
145237 c = *pC;
145248 *pC = c + 1;
148930 CollSeq *pC = 0;
148934 pC = sqlite3ExprCompareCollSeq(pHidden->pParse, pX);
148936 zRet = (pC ? pC->zName : sqlite3StrBINARY);
183573 sqlite3_tokenizer_cursor *pC;
183579 rc = sqlite3Fts3OpenTokenizer(pTab->pTokenizer, iLangid, zDoc, nDoc, &pC);
183585 rc = pMod->xNext(pC, &ZDUMMY, &DUMMY1, &DUMMY2, &DUMMY3, &iCurrent);
183587 pMod->xClose(pC);
183627 sqlite3_tokenizer_cursor *pC; /* Tokenizer cursor open on zDoc/nDoc */
183640 rc = sqlite3Fts3OpenTokenizer(pTab->pTokenizer, pCsr->iLangid, zDoc,nDoc,&pC);
183663 rc = pMod->xNext(pC, &ZDUMMY, &DUMMY1, &iBegin, &iFin, &iCurrent);
183715 pMod->xClose(pC);
184512 sqlite3_tokenizer_cursor *pC; /* Tokenizer cursor */
184547 zDoc, nDoc, &pC
184551 rc = pMod->xNext(pC, &ZDUMMY, &NDUMMY, &iStart, &iEnd, &iCurrent);
184576 rc = pMod->xNext(pC, &ZDUMMY, &NDUMMY, &iStart, &iEnd, &iCurrent);
184593 pMod->xClose(pC);
184955 sqlite3_tokenizer_cursor *pC, /* Cursor returned by simpleOpen */
184962 unicode_cursor *pCsr = (unicode_cursor *)pC;
203638 SessionChange *pC;
203639 for(pC=pTab->apChange[iHash]; pC; pC=pC->pNext){
203640 if( sessionPreupdateEqual(pSession, pTab, pC, op) ) break;
203643 if( pC==0 ){
203706 }else if( pC->bIndirect ){
203712 pC->bIndirect = 0;
225947 Fts5Config *pC = p->pConfig;
225953 pC->zContentExprlist, pC->zContent
225959 zSql = sqlite3_mprintf(azStmt[eStmt], pC->zContentExprlist,
225960 pC->zContent, pC->zContentRowid, pC->zContentRowid,
225961 pC->zContentRowid
225967 pC->zContentExprlist, pC->zContent, pC->zContentRowid
225973 int nCol = pC->nCol + 1;
225984 zSql = sqlite3_mprintf(azStmt[eStmt], pC->zDb, pC->zName, zBind);
225991 zSql = sqlite3_mprintf(azStmt[eStmt], pC->zDb, pC->zName);
226001 rc = sqlite3_prepare_v3(pC->db, zSql, -1, f, &p->aStmt[eStmt], 0);
226005 *pzErrMsg = sqlite3_mprintf("%s", sqlite3_errmsg(pC->db));