Lines Matching refs:pC
73663 VdbeCursor *pC = p->apCsr[i];
73664 if( pC ){
73665 sqlite3VdbeFreeCursor(p, pC);
76055 VdbeCursor *pC, /* The cursor to compare against */
76064 assert( pC->eCurType==CURTYPE_BTREE );
76065 pCur = pC->uc.pCursor;
80956 VdbeCursor *pC; /* The VDBE cursor */
80972 pC = p->apCsr[pOp->p1];
80976 rc = sqlite3VdbeCursorMoveto(&pC, &p2);
80983 assert( pC!=0 );
80984 assert( p2<pC->nField );
80985 aOffset = pC->aOffset;
80986 assert( pC->eCurType!=CURTYPE_VTAB );
80987 assert( pC->eCurType!=CURTYPE_PSEUDO || pC->nullRow );
80988 assert( pC->eCurType!=CURTYPE_SORTER );
80990 if( pC->cacheStatus!=p->cacheCtr ){ /*OPTIMIZATION-IF-FALSE*/
80991 if( pC->nullRow ){
80992 if( pC->eCurType==CURTYPE_PSEUDO ){
80993 assert( pC->uc.pseudoTableReg>0 );
80994 pReg = &aMem[pC->uc.pseudoTableReg];
80997 pC->payloadSize = pC->szRow = avail = pReg->n;
80998 pC->aRow = (u8*)pReg->z;
81004 pCrsr = pC->uc.pCursor;
81005 assert( pC->eCurType==CURTYPE_BTREE );
81008 pC->payloadSize = sqlite3BtreePayloadSize(pCrsr);
81009 pC->aRow = sqlite3BtreePayloadFetch(pCrsr, &avail);
81011 if( pC->payloadSize <= (u32)avail ){
81012 pC->szRow = pC->payloadSize;
81013 }else if( pC->payloadSize > (u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){
81016 pC->szRow = avail;
81019 pC->cacheStatus = p->cacheCtr;
81020 pC->iHdrOffset = getVarint32(pC->aRow, offset);
81021 pC->nHdrParsed = 0;
81030 pC->aRow = 0;
81031 pC->szRow = 0;
81042 if( offset > 98307 || offset > pC->payloadSize ){
81051 zData = pC->aRow;
81052 assert( pC->nHdrParsed<=p2 ); /* Conditional skipped */
81060 if( pC->nHdrParsed<=p2 ){
81064 if( pC->iHdrOffset<aOffset[0] ){
81066 if( pC->aRow==0 ){
81068 rc = sqlite3VdbeMemFromBtree(pC->uc.pCursor, 0, aOffset[0], &sMem);
81072 zData = pC->aRow;
81077 i = pC->nHdrParsed;
81079 zHdr = zData + pC->iHdrOffset;
81089 pC->aType[i++] = t;
81098 if( (zHdr>=zEndHdr && (zHdr>zEndHdr || offset64!=pC->payloadSize))
81099 || (offset64 > pC->payloadSize)
81101 if( pC->aRow==0 ) sqlite3VdbeMemRelease(&sMem);
81106 pC->nHdrParsed = i;
81107 pC->iHdrOffset = (u32)(zHdr - zData);
81108 if( pC->aRow==0 ) sqlite3VdbeMemRelease(&sMem);
81117 if( pC->nHdrParsed<=p2 ){
81126 t = pC->aType[p2];
81133 assert( p2<pC->nHdrParsed );
81139 assert( t==pC->aType[p2] );
81140 if( pC->szRow>=aOffset[p2+1] ){
81143 zData = pC->aRow + aOffset[p2];
81186 rc = sqlite3VdbeMemFromBtree(pC->uc.pCursor, aOffset[p2], len, pDest);
82162 VdbeCursor *pC;
82164 pC = p->apCsr[pOp->p1];
82165 assert( isSorter(pC) );
82166 if( (pC->seqCount++)==0 ){
82226 VdbeCursor *pC;
82227 pC = p->apCsr[pOp->p1];
82228 assert( pC->eCurType==CURTYPE_BTREE );
82229 pC->maskUsed = *(u64*)pOp->p4.pI64;
82326 VdbeCursor *pC; /* The cursor to seek */
82334 pC = p->apCsr[pOp->p1];
82335 assert( pC!=0 );
82336 assert( pC->eCurType==CURTYPE_BTREE );
82340 assert( pC->isOrdered );
82341 assert( pC->uc.pCursor!=0 );
82344 pC->nullRow = 0;
82346 pC->seekOp = pOp->opcode;
82349 if( pC->isTable ){
82351 assert( sqlite3BtreeCursorHasHint(pC->uc.pCursor, BTREE_SEEK_EQ)==0
82396 rc = sqlite3BtreeMovetoUnpacked(pC->uc.pCursor, 0, (u64)iKey, 0, &res);
82397 pC->movetoTarget = iKey; /* Used by OP_Delete */
82406 if( sqlite3BtreeCursorHasHint(pC->uc.pCursor, BTREE_SEEK_EQ) ){
82419 r.pKeyInfo = pC->pKeyInfo;
82440 rc = sqlite3BtreeMovetoUnpacked(pC->uc.pCursor, &r, 0, 0, &res);
82449 pC->deferredMoveto = 0;
82450 pC->cacheStatus = CACHE_STALE;
82457 rc = sqlite3BtreeNext(pC->uc.pCursor, &res);
82466 rc = sqlite3BtreePrevious(pC->uc.pCursor, &res);
82472 res = sqlite3BtreeEof(pC->uc.pCursor);
82552 VdbeCursor *pC;
82564 pC = p->apCsr[pOp->p1];
82565 assert( pC!=0 );
82567 pC->seekOp = pOp->opcode;
82570 assert( pC->eCurType==CURTYPE_BTREE );
82571 assert( pC->uc.pCursor!=0 );
82572 assert( pC->isTable==0 );
82574 r.pKeyInfo = pC->pKeyInfo;
82591 pFree = pIdxKey = sqlite3VdbeAllocUnpackedRecord(pC->pKeyInfo);
82593 sqlite3VdbeRecordUnpack(pC->pKeyInfo, pIn3->n, pIn3->z, pIdxKey);
82608 rc = sqlite3BtreeMovetoUnpacked(pC->uc.pCursor, pIdxKey, 0, 0, &res);
82613 pC->seekResult = res;
82615 pC->nullRow = 1-alreadyExists;
82616 pC->deferredMoveto = 0;
82617 pC->cacheStatus = CACHE_STALE;
82676 VdbeCursor *pC;
82691 pC = p->apCsr[pOp->p1];
82692 assert( pC!=0 );
82694 pC->seekOp = 0;
82696 assert( pC->isTable );
82697 assert( pC->eCurType==CURTYPE_BTREE );
82698 pCrsr = pC->uc.pCursor;
82704 pC->movetoTarget = iKey; /* Used by OP_Delete */
82705 pC->nullRow = 0;
82706 pC->cacheStatus = CACHE_STALE;
82707 pC->deferredMoveto = 0;
82709 pC->seekResult = res;
82757 VdbeCursor *pC; /* Cursor of table to get the new rowid */
82767 pC = p->apCsr[pOp->p1];
82768 assert( pC!=0 );
82769 assert( pC->eCurType==CURTYPE_BTREE );
82770 assert( pC->uc.pCursor!=0 );
82785 assert( pC->isTable );
82797 if( !pC->useRandomRowid ){
82798 rc = sqlite3BtreeLast(pC->uc.pCursor, &res);
82805 assert( sqlite3BtreeCursorIsValid(pC->uc.pCursor) );
82806 v = sqlite3BtreeIntegerKey(pC->uc.pCursor);
82808 pC->useRandomRowid = 1;
82835 if( pMem->u.i==MAX_ROWID || pC->useRandomRowid ){
82845 if( pC->useRandomRowid ){
82856 }while( ((rc = sqlite3BtreeMovetoUnpacked(pC->uc.pCursor, 0, (u64)v,
82867 pC->deferredMoveto = 0;
82868 pC->cacheStatus = CACHE_STALE;
82921 VdbeCursor *pC; /* Cursor to table into which insert is written */
82932 pC = p->apCsr[pOp->p1];
82933 assert( pC!=0 );
82934 assert( pC->eCurType==CURTYPE_BTREE );
82935 assert( pC->uc.pCursor!=0 );
82936 assert( (pOp->p5 & OPFLAG_ISNOOP) || pC->isTable );
82952 assert( pC->iDb>=0 );
82953 zDb = db->aDb[pC->iDb].zDbSName;
82968 sqlite3VdbePreUpdateHook(p, pC, SQLITE_INSERT, zDb, pTab, x.nKey, pOp->p2);
82983 seekResult = ((pOp->p5 & OPFLAG_USESEEKRESULT) ? pC->seekResult : 0);
82990 rc = sqlite3BtreeInsert(pC->uc.pCursor, &x,
82993 pC->deferredMoveto = 0;
82994 pC->cacheStatus = CACHE_STALE;
83040 VdbeCursor *pC;
83047 pC = p->apCsr[pOp->p1];
83048 assert( pC!=0 );
83049 assert( pC->eCurType==CURTYPE_BTREE );
83050 assert( pC->uc.pCursor!=0 );
83051 assert( pC->deferredMoveto==0 );
83058 i64 iKey = sqlite3BtreeIntegerKey(pC->uc.pCursor);
83059 assert( pC->movetoTarget==iKey );
83069 assert( pC->iDb>=0 );
83071 zDb = db->aDb[pC->iDb].zDbSName;
83073 if( (pOp->p5 & OPFLAG_SAVEPOSITION)!=0 && pC->isTable ){
83074 pC->movetoTarget = sqlite3BtreeIntegerKey(pC->uc.pCursor);
83088 sqlite3VdbePreUpdateHook(p, pC,
83090 zDb, pTab, pC->movetoTarget,
83104 if( pC->isEphemeral==0
83106 && (pC->wrFlag & OPFLAG_FORDELETE)==0
83116 rc = sqlite3BtreeDelete(pC->uc.pCursor, pOp->p5);
83117 pC->cacheStatus = CACHE_STALE;
83118 pC->seekResult = 0;
83126 pC->movetoTarget);
83127 assert( pC->iDb>=0 );
83162 VdbeCursor *pC;
83166 pC = p->apCsr[pOp->p1];
83167 assert( isSorter(pC) );
83172 rc = sqlite3VdbeSorterCompare(pC, pIn3, nKeyCol, &res);
83192 VdbeCursor *pC;
83195 pC = p->apCsr[pOp->p1];
83196 assert( isSorter(pC) );
83197 rc = sqlite3VdbeSorterRowkey(pC, pOut);
83234 VdbeCursor *pC;
83241 pC = p->apCsr[pOp->p1];
83242 assert( pC!=0 );
83243 assert( pC->eCurType==CURTYPE_BTREE );
83244 assert( isSorter(pC)==0 );
83245 assert( pC->nullRow==0 );
83246 assert( pC->uc.pCursor!=0 );
83247 pCrsr = pC->uc.pCursor;
83257 assert( pC->deferredMoveto==0 );
83260 rc = sqlite3VdbeCursorMoveto(pC);
83288 VdbeCursor *pC;
83295 pC = p->apCsr[pOp->p1];
83296 assert( pC!=0 );
83297 assert( pC->eCurType!=CURTYPE_PSEUDO || pC->nullRow );
83298 if( pC->nullRow ){
83301 }else if( pC->deferredMoveto ){
83302 v = pC->movetoTarget;
83304 }else if( pC->eCurType==CURTYPE_VTAB ){
83305 assert( pC->uc.pVCur!=0 );
83306 pVtab = pC->uc.pVCur->pVtab;
83309 rc = pModule->xRowid(pC->uc.pVCur, &v);
83314 assert( pC->eCurType==CURTYPE_BTREE );
83315 assert( pC->uc.pCursor!=0 );
83316 rc = sqlite3VdbeCursorRestore(pC);
83318 if( pC->nullRow ){
83322 v = sqlite3BtreeIntegerKey(pC->uc.pCursor);
83335 VdbeCursor *pC;
83338 pC = p->apCsr[pOp->p1];
83339 assert( pC!=0 );
83340 pC->nullRow = 1;
83341 pC->cacheStatus = CACHE_STALE;
83342 if( pC->eCurType==CURTYPE_BTREE ){
83343 assert( pC->uc.pCursor!=0 );
83344 sqlite3BtreeClearCursor(pC->uc.pCursor);
83369 VdbeCursor *pC;
83374 pC = p->apCsr[pOp->p1];
83375 assert( pC!=0 );
83376 assert( pC->eCurType==CURTYPE_BTREE );
83377 pCrsr = pC->uc.pCursor;
83380 pC->seekResult = pOp->p3;
83382 pC->seekOp = OP_Last;
83386 pC->nullRow = (u8)res;
83387 pC->deferredMoveto = 0;
83388 pC->cacheStatus = CACHE_STALE;
83406 VdbeCursor *pC;
83412 pC = p->apCsr[pOp->p1];
83413 assert( pC!=0 );
83414 pCrsr = pC->uc.pCursor;
83471 VdbeCursor *pC;
83476 pC = p->apCsr[pOp->p1];
83477 assert( pC!=0 );
83478 assert( isSorter(pC)==(pOp->opcode==OP_SorterSort) );
83481 pC->seekOp = OP_Rewind;
83483 if( isSorter(pC) ){
83484 rc = sqlite3VdbeSorterRewind(pC, &res);
83486 assert( pC->eCurType==CURTYPE_BTREE );
83487 pCrsr = pC->uc.pCursor;
83490 pC->deferredMoveto = 0;
83491 pC->cacheStatus = CACHE_STALE;
83494 pC->nullRow = (u8)res;
83572 VdbeCursor *pC;
83575 pC = p->apCsr[pOp->p1];
83576 assert( isSorter(pC) );
83578 rc = sqlite3VdbeSorterNext(db, pC, &res);
83588 pC = p->apCsr[pOp->p1];
83590 assert( pC!=0 );
83591 assert( pC->deferredMoveto==0 );
83592 assert( pC->eCurType==CURTYPE_BTREE );
83593 assert( res==0 || (res==1 && pC->isTable==0) );
83603 || pC->seekOp==OP_SeekGT || pC->seekOp==OP_SeekGE
83604 || pC->seekOp==OP_Rewind || pC->seekOp==OP_Found);
83606 || pC->seekOp==OP_SeekLT || pC->seekOp==OP_SeekLE
83607 || pC->seekOp==OP_Last );
83609 rc = pOp->p4.xAdvance(pC->uc.pCursor, &res);
83611 pC->cacheStatus = CACHE_STALE;
83615 pC->nullRow = 0;
83622 pC->nullRow = 1;
83664 VdbeCursor *pC;
83668 pC = p->apCsr[pOp->p1];
83669 assert( pC!=0 );
83670 assert( isSorter(pC)==(pOp->opcode==OP_SorterInsert) );
83674 assert( pC->eCurType==CURTYPE_BTREE || pOp->opcode==OP_SorterInsert );
83675 assert( pC->isTable==0 );
83679 rc = sqlite3VdbeSorterWrite(pC, pIn2);
83685 rc = sqlite3BtreeInsert(pC->uc.pCursor, &x,
83687 ((pOp->p5 & OPFLAG_USESEEKRESULT) ? pC->seekResult : 0)
83689 assert( pC->deferredMoveto==0 );
83690 pC->cacheStatus = CACHE_STALE;
83704 VdbeCursor *pC;
83712 pC = p->apCsr[pOp->p1];
83713 assert( pC!=0 );
83714 assert( pC->eCurType==CURTYPE_BTREE );
83715 pCrsr = pC->uc.pCursor;
83718 r.pKeyInfo = pC->pKeyInfo;
83728 assert( pC->deferredMoveto==0 );
83729 pC->cacheStatus = CACHE_STALE;
83730 pC->seekResult = 0;
83764 VdbeCursor *pC; /* The P1 index cursor */
83769 pC = p->apCsr[pOp->p1];
83770 assert( pC!=0 );
83771 assert( pC->eCurType==CURTYPE_BTREE );
83772 assert( pC->uc.pCursor!=0 );
83773 assert( pC->isTable==0 );
83774 assert( pC->deferredMoveto==0 );
83775 assert( !pC->nullRow || pOp->opcode==OP_IdxRowid );
83779 rc = sqlite3VdbeCursorRestore(pC);
83786 if( !pC->nullRow ){
83788 rc = sqlite3VdbeIdxRowid(db, pC->uc.pCursor, &rowid);
83804 pTabCur->pAltCursor = pC;
83864 VdbeCursor *pC;
83869 pC = p->apCsr[pOp->p1];
83870 assert( pC!=0 );
83871 assert( pC->isOrdered );
83872 assert( pC->eCurType==CURTYPE_BTREE );
83873 assert( pC->uc.pCursor!=0);
83874 assert( pC->deferredMoveto==0 );
83877 r.pKeyInfo = pC->pKeyInfo;
83891 rc = sqlite3VdbeIdxKeyCompare(db, pC, &r, &res);
84013 VdbeCursor *pC;
84016 pC = p->apCsr[pOp->p1];
84017 assert( pC!=0 );
84018 if( isSorter(pC) ){
84019 sqlite3VdbeSorterReset(db, pC->uc.pSorter);
84021 assert( pC->eCurType==CURTYPE_BTREE );
84022 assert( pC->isEphemeral );
84023 rc = sqlite3BtreeClearTableOfCursor(pC->uc.pCursor);
85558 VdbeCursor *pC;
85562 pC = p->apCsr[pOp->p1];
85563 if( pC ){
85564 assert( pC->eCurType==CURTYPE_BTREE );
85565 sqlite3BtreeCursorHint(pC->uc.pCursor, BTREE_HINT_RANGE,
85765 VdbeCursor *pC = v->apCsr[0];
85766 u32 type = pC->nHdrParsed>p->iCol ? pC->aType[p->iCol] : 0;
85767 testcase( pC->nHdrParsed==p->iCol );
85768 testcase( pC->nHdrParsed==p->iCol+1 );
85777 p->iOffset = pC->aType[p->iCol + pC->nField];
85779 p->pCsr = pC->uc.pCursor;
116924 SQLITE_PRIVATE int sqlite3JoinType(Parse *pParse, Token *pA, Token *pB, Token *pC){
116946 apAll[2] = pC;
116968 if( pC==0 ){ zSp++; }
116970 "%T %T%s%T", pA, pB, zSp, pC);
121487 struct AggInfo_col *pC;
121549 for(i=0, pC=pAggInfo->aCol; i<pAggInfo->nAccumulator; i++, pC++){
121550 sqlite3ExprCode(pParse, pC->pExpr, pC->iMem);
130209 u8 c, *pC; /* Last character before the first wildcard */
130210 pC = (u8*)&pStr2->u.zToken[sqlite3Strlen30(pStr2->u.zToken)-1];
130211 c = *pC;
130222 *pC = c + 1;
162431 sqlite3_tokenizer_cursor *pC;
162437 rc = sqlite3Fts3OpenTokenizer(pTab->pTokenizer, iLangid, zDoc, nDoc, &pC);
162443 rc = pMod->xNext(pC, &ZDUMMY, &DUMMY1, &DUMMY2, &DUMMY3, &iCurrent);
162445 pMod->xClose(pC);
162485 sqlite3_tokenizer_cursor *pC; /* Tokenizer cursor open on zDoc/nDoc */
162498 rc = sqlite3Fts3OpenTokenizer(pTab->pTokenizer, pCsr->iLangid, zDoc,nDoc,&pC);
162521 rc = pMod->xNext(pC, &ZDUMMY, &DUMMY1, &iBegin, &iFin, &iCurrent);
162573 pMod->xClose(pC);
163335 sqlite3_tokenizer_cursor *pC; /* Tokenizer cursor */
163370 zDoc, nDoc, &pC
163374 rc = pMod->xNext(pC, &ZDUMMY, &NDUMMY, &iStart, &iEnd, &iCurrent);
163399 rc = pMod->xNext(pC, &ZDUMMY, &NDUMMY, &iStart, &iEnd, &iCurrent);
163416 pMod->xClose(pC);
163775 sqlite3_tokenizer_cursor *pC, /* Cursor returned by simpleOpen */
163782 unicode_cursor *pCsr = (unicode_cursor *)pC;
176023 SessionChange *pC;
176024 for(pC=pTab->apChange[iHash]; pC; pC=pC->pNext){
176025 if( sessionPreupdateEqual(pSession, pTab, pC, op) ) break;
176028 if( pC==0 ){
176091 }else if( pC->bIndirect ){
176097 pC->bIndirect = 0;
197181 struct Constraint *pC = &aConstraint[j];
197182 if( iCol==aColMap[pC->iCol] && p->op & pC->op && p->usable ){
197183 pC->iConsIndex = i;
197184 idxFlags |= pC->fts5op;
197222 struct Constraint *pC = &aConstraint[i];
197223 if( pC->iConsIndex>=0 ){
197224 pInfo->aConstraintUsage[pC->iConsIndex].argvIndex = iNext++;
197225 pInfo->aConstraintUsage[pC->iConsIndex].omit = (unsigned char)pC->omit;
199456 Fts5Config *pC = p->pConfig;
199462 pC->zContentExprlist, pC->zContent
199468 zSql = sqlite3_mprintf(azStmt[eStmt], pC->zContentExprlist,
199469 pC->zContent, pC->zContentRowid, pC->zContentRowid,
199470 pC->zContentRowid
199476 pC->zContentExprlist, pC->zContent, pC->zContentRowid
199482 int nCol = pC->nCol + 1;
199493 zSql = sqlite3_mprintf(azStmt[eStmt], pC->zDb, pC->zName, zBind);
199500 zSql = sqlite3_mprintf(azStmt[eStmt], pC->zDb, pC->zName);
199507 rc = sqlite3_prepare_v2(pC->db, zSql, -1, &p->aStmt[eStmt], 0);
199510 *pzErrMsg = sqlite3_mprintf("%s", sqlite3_errmsg(pC->db));