Lines Matching refs:pC
75086 VdbeCursor *pC = p->apCsr[i];
75087 if( pC ){
75088 sqlite3VdbeFreeCursor(p, pC);
77474 VdbeCursor *pC, /* The cursor to compare against */
77483 assert( pC->eCurType==CURTYPE_BTREE );
77484 pCur = pC->uc.pCursor;
82365 VdbeCursor *pC; /* The VDBE cursor */
82367 pC = p->apCsr[pOp->p1];
82369 if( NEVER(pC==0) || pC->eCurType!=CURTYPE_BTREE ){
82372 sqlite3VdbeMemSetInt64(pOut, sqlite3BtreeOffset(pC->uc.pCursor));
82405 VdbeCursor *pC; /* The VDBE cursor */
82419 pC = p->apCsr[pOp->p1];
82425 rc = sqlite3VdbeCursorMoveto(&pC, &p2);
82432 assert( pC!=0 );
82433 assert( p2<pC->nField );
82434 aOffset = pC->aOffset;
82435 assert( pC->eCurType!=CURTYPE_VTAB );
82436 assert( pC->eCurType!=CURTYPE_PSEUDO || pC->nullRow );
82437 assert( pC->eCurType!=CURTYPE_SORTER );
82439 if( pC->cacheStatus!=p->cacheCtr ){ /*OPTIMIZATION-IF-FALSE*/
82440 if( pC->nullRow ){
82441 if( pC->eCurType==CURTYPE_PSEUDO ){
82444 assert( pC->seekResult>0 );
82445 pReg = &aMem[pC->seekResult];
82448 pC->payloadSize = pC->szRow = pReg->n;
82449 pC->aRow = (u8*)pReg->z;
82455 pCrsr = pC->uc.pCursor;
82456 assert( pC->eCurType==CURTYPE_BTREE );
82459 pC->payloadSize = sqlite3BtreePayloadSize(pCrsr);
82460 pC->aRow = sqlite3BtreePayloadFetch(pCrsr, &pC->szRow);
82461 assert( pC->szRow<=pC->payloadSize );
82462 assert( pC->szRow<=65536 ); /* Maximum page size is 64KiB */
82463 if( pC->payloadSize > (u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){
82467 pC->cacheStatus = p->cacheCtr;
82468 pC->iHdrOffset = getVarint32(pC->aRow, aOffset[0]);
82469 pC->nHdrParsed = 0;
82472 if( pC->szRow<aOffset[0] ){ /*OPTIMIZATION-IF-FALSE*/
82477 pC->aRow = 0;
82478 pC->szRow = 0;
82489 if( aOffset[0] > 98307 || aOffset[0] > pC->payloadSize ){
82506 zData = pC->aRow;
82507 assert( pC->nHdrParsed<=p2 ); /* Conditional skipped */
82516 if( pC->nHdrParsed<=p2 ){
82520 if( pC->iHdrOffset<aOffset[0] ){
82522 if( pC->aRow==0 ){
82524 rc = sqlite3VdbeMemFromBtree(pC->uc.pCursor, 0, aOffset[0], &sMem);
82528 zData = pC->aRow;
82533 i = pC->nHdrParsed;
82535 zHdr = zData + pC->iHdrOffset;
82546 pC->aType[i++] = t;
82555 if( (zHdr>=zEndHdr && (zHdr>zEndHdr || offset64!=pC->payloadSize))
82556 || (offset64 > pC->payloadSize)
82562 if( pC->aRow==0 ) sqlite3VdbeMemRelease(&sMem);
82567 pC->nHdrParsed = i;
82568 pC->iHdrOffset = (u32)(zHdr - zData);
82569 if( pC->aRow==0 ) sqlite3VdbeMemRelease(&sMem);
82578 if( pC->nHdrParsed<=p2 ){
82587 t = pC->aType[p2];
82594 assert( p2<pC->nHdrParsed );
82600 assert( t==pC->aType[p2] );
82601 if( pC->szRow>=aOffset[p2+1] ){
82604 zData = pC->aRow + aOffset[p2];
82647 rc = sqlite3VdbeMemFromBtree(pC->uc.pCursor, aOffset[p2], len, pDest);
83642 VdbeCursor *pC;
83644 pC = p->apCsr[pOp->p1];
83645 assert( isSorter(pC) );
83646 if( (pC->seqCount++)==0 ){
83711 VdbeCursor *pC;
83712 pC = p->apCsr[pOp->p1];
83713 assert( pC->eCurType==CURTYPE_BTREE );
83714 pC->maskUsed = *(u64*)pOp->p4.pI64;
83811 VdbeCursor *pC; /* The cursor to seek */
83819 pC = p->apCsr[pOp->p1];
83820 assert( pC!=0 );
83821 assert( pC->eCurType==CURTYPE_BTREE );
83825 assert( pC->isOrdered );
83826 assert( pC->uc.pCursor!=0 );
83829 pC->nullRow = 0;
83831 pC->seekOp = pOp->opcode;
83834 if( pC->isTable ){
83836 assert( sqlite3BtreeCursorHasHint(pC->uc.pCursor, BTREE_SEEK_EQ)==0
83881 rc = sqlite3BtreeMovetoUnpacked(pC->uc.pCursor, 0, (u64)iKey, 0, &res);
83882 pC->movetoTarget = iKey; /* Used by OP_Delete */
83891 if( sqlite3BtreeCursorHasHint(pC->uc.pCursor, BTREE_SEEK_EQ) ){
83904 r.pKeyInfo = pC->pKeyInfo;
83925 rc = sqlite3BtreeMovetoUnpacked(pC->uc.pCursor, &r, 0, 0, &res);
83934 pC->deferredMoveto = 0;
83935 pC->cacheStatus = CACHE_STALE;
83942 rc = sqlite3BtreeNext(pC->uc.pCursor, 0);
83958 rc = sqlite3BtreePrevious(pC->uc.pCursor, 0);
83971 res = sqlite3BtreeEof(pC->uc.pCursor);
84051 VdbeCursor *pC;
84063 pC = p->apCsr[pOp->p1];
84064 assert( pC!=0 );
84066 pC->seekOp = pOp->opcode;
84069 assert( pC->eCurType==CURTYPE_BTREE );
84070 assert( pC->uc.pCursor!=0 );
84071 assert( pC->isTable==0 );
84073 r.pKeyInfo = pC->pKeyInfo;
84090 pFree = pIdxKey = sqlite3VdbeAllocUnpackedRecord(pC->pKeyInfo);
84092 sqlite3VdbeRecordUnpack(pC->pKeyInfo, pIn3->n, pIn3->z, pIdxKey);
84107 rc = sqlite3BtreeMovetoUnpacked(pC->uc.pCursor, pIdxKey, 0, 0, &res);
84112 pC->seekResult = res;
84114 pC->nullRow = 1-alreadyExists;
84115 pC->deferredMoveto = 0;
84116 pC->cacheStatus = CACHE_STALE;
84175 VdbeCursor *pC;
84190 pC = p->apCsr[pOp->p1];
84191 assert( pC!=0 );
84193 pC->seekOp = 0;
84195 assert( pC->isTable );
84196 assert( pC->eCurType==CURTYPE_BTREE );
84197 pCrsr = pC->uc.pCursor;
84203 pC->movetoTarget = iKey; /* Used by OP_Delete */
84204 pC->nullRow = 0;
84205 pC->cacheStatus = CACHE_STALE;
84206 pC->deferredMoveto = 0;
84208 pC->seekResult = res;
84256 VdbeCursor *pC; /* Cursor of table to get the new rowid */
84266 pC = p->apCsr[pOp->p1];
84267 assert( pC!=0 );
84268 assert( pC->eCurType==CURTYPE_BTREE );
84269 assert( pC->uc.pCursor!=0 );
84284 assert( pC->isTable );
84296 if( !pC->useRandomRowid ){
84297 rc = sqlite3BtreeLast(pC->uc.pCursor, &res);
84304 assert( sqlite3BtreeCursorIsValid(pC->uc.pCursor) );
84305 v = sqlite3BtreeIntegerKey(pC->uc.pCursor);
84307 pC->useRandomRowid = 1;
84334 if( pMem->u.i==MAX_ROWID || pC->useRandomRowid ){
84344 if( pC->useRandomRowid ){
84355 }while( ((rc = sqlite3BtreeMovetoUnpacked(pC->uc.pCursor, 0, (u64)v,
84366 pC->deferredMoveto = 0;
84367 pC->cacheStatus = CACHE_STALE;
84420 VdbeCursor *pC; /* Cursor to table into which insert is written */
84429 pC = p->apCsr[pOp->p1];
84430 assert( pC!=0 );
84431 assert( pC->eCurType==CURTYPE_BTREE );
84432 assert( pC->uc.pCursor!=0 );
84433 assert( (pOp->p5 & OPFLAG_ISNOOP) || pC->isTable );
84449 assert( pC->iDb>=0 );
84450 zDb = db->aDb[pC->iDb].zDbSName;
84462 sqlite3VdbePreUpdateHook(p, pC, SQLITE_INSERT, zDb, pTab, x.nKey,pOp->p2);
84477 seekResult = ((pOp->p5 & OPFLAG_USESEEKRESULT) ? pC->seekResult : 0);
84484 rc = sqlite3BtreeInsert(pC->uc.pCursor, &x,
84487 pC->deferredMoveto = 0;
84488 pC->cacheStatus = CACHE_STALE;
84538 VdbeCursor *pC;
84545 pC = p->apCsr[pOp->p1];
84546 assert( pC!=0 );
84547 assert( pC->eCurType==CURTYPE_BTREE );
84548 assert( pC->uc.pCursor!=0 );
84549 assert( pC->deferredMoveto==0 );
84556 i64 iKey = sqlite3BtreeIntegerKey(pC->uc.pCursor);
84557 assert( pC->movetoTarget==iKey );
84567 assert( pC->iDb>=0 );
84569 zDb = db->aDb[pC->iDb].zDbSName;
84571 if( (pOp->p5 & OPFLAG_SAVEPOSITION)!=0 && pC->isTable ){
84572 pC->movetoTarget = sqlite3BtreeIntegerKey(pC->uc.pCursor);
84586 sqlite3VdbePreUpdateHook(p, pC,
84588 zDb, pTab, pC->movetoTarget,
84602 if( pC->isEphemeral==0
84604 && (pC->wrFlag & OPFLAG_FORDELETE)==0
84614 rc = sqlite3BtreeDelete(pC->uc.pCursor, pOp->p5);
84615 pC->cacheStatus = CACHE_STALE;
84616 pC->seekResult = 0;
84624 pC->movetoTarget);
84625 assert( pC->iDb>=0 );
84660 VdbeCursor *pC;
84664 pC = p->apCsr[pOp->p1];
84665 assert( isSorter(pC) );
84670 rc = sqlite3VdbeSorterCompare(pC, pIn3, nKeyCol, &res);
84690 VdbeCursor *pC;
84693 pC = p->apCsr[pOp->p1];
84694 assert( isSorter(pC) );
84695 rc = sqlite3VdbeSorterRowkey(pC, pOut);
84732 VdbeCursor *pC;
84739 pC = p->apCsr[pOp->p1];
84740 assert( pC!=0 );
84741 assert( pC->eCurType==CURTYPE_BTREE );
84742 assert( isSorter(pC)==0 );
84743 assert( pC->nullRow==0 );
84744 assert( pC->uc.pCursor!=0 );
84745 pCrsr = pC->uc.pCursor;
84755 assert( pC->deferredMoveto==0 );
84758 rc = sqlite3VdbeCursorMoveto(pC);
84786 VdbeCursor *pC;
84793 pC = p->apCsr[pOp->p1];
84794 assert( pC!=0 );
84795 assert( pC->eCurType!=CURTYPE_PSEUDO || pC->nullRow );
84796 if( pC->nullRow ){
84799 }else if( pC->deferredMoveto ){
84800 v = pC->movetoTarget;
84802 }else if( pC->eCurType==CURTYPE_VTAB ){
84803 assert( pC->uc.pVCur!=0 );
84804 pVtab = pC->uc.pVCur->pVtab;
84807 rc = pModule->xRowid(pC->uc.pVCur, &v);
84812 assert( pC->eCurType==CURTYPE_BTREE );
84813 assert( pC->uc.pCursor!=0 );
84814 rc = sqlite3VdbeCursorRestore(pC);
84816 if( pC->nullRow ){
84820 v = sqlite3BtreeIntegerKey(pC->uc.pCursor);
84833 VdbeCursor *pC;
84836 pC = p->apCsr[pOp->p1];
84837 assert( pC!=0 );
84838 pC->nullRow = 1;
84839 pC->cacheStatus = CACHE_STALE;
84840 if( pC->eCurType==CURTYPE_BTREE ){
84841 assert( pC->uc.pCursor!=0 );
84842 sqlite3BtreeClearCursor(pC->uc.pCursor);
84871 VdbeCursor *pC;
84876 pC = p->apCsr[pOp->p1];
84877 assert( pC!=0 );
84878 assert( pC->eCurType==CURTYPE_BTREE );
84879 pCrsr = pC->uc.pCursor;
84883 pC->seekOp = pOp->opcode;
84887 pC->seekResult = -1;
84893 pC->nullRow = (u8)res;
84894 pC->deferredMoveto = 0;
84895 pC->cacheStatus = CACHE_STALE;
84910 VdbeCursor *pC;
84916 pC = p->apCsr[pOp->p1];
84917 assert( pC!=0 );
84918 pCrsr = pC->uc.pCursor;
84975 VdbeCursor *pC;
84980 pC = p->apCsr[pOp->p1];
84981 assert( pC!=0 );
84982 assert( isSorter(pC)==(pOp->opcode==OP_SorterSort) );
84985 pC->seekOp = OP_Rewind;
84987 if( isSorter(pC) ){
84988 rc = sqlite3VdbeSorterRewind(pC, &res);
84990 assert( pC->eCurType==CURTYPE_BTREE );
84991 pCrsr = pC->uc.pCursor;
84994 pC->deferredMoveto = 0;
84995 pC->cacheStatus = CACHE_STALE;
84998 pC->nullRow = (u8)res;
85076 VdbeCursor *pC;
85078 pC = p->apCsr[pOp->p1];
85079 assert( isSorter(pC) );
85080 rc = sqlite3VdbeSorterNext(db, pC);
85090 pC = p->apCsr[pOp->p1];
85091 assert( pC!=0 );
85092 assert( pC->deferredMoveto==0 );
85093 assert( pC->eCurType==CURTYPE_BTREE );
85102 || pC->seekOp==OP_SeekGT || pC->seekOp==OP_SeekGE
85103 || pC->seekOp==OP_Rewind || pC->seekOp==OP_Found);
85105 || pC->seekOp==OP_SeekLT || pC->seekOp==OP_SeekLE
85106 || pC->seekOp==OP_Last );
85108 rc = pOp->p4.xAdvance(pC->uc.pCursor, pOp->p3);
85110 pC->cacheStatus = CACHE_STALE;
85113 pC->nullRow = 0;
85122 pC->nullRow = 1;
85163 VdbeCursor *pC;
85167 pC = p->apCsr[pOp->p1];
85168 assert( pC!=0 );
85169 assert( isSorter(pC)==(pOp->opcode==OP_SorterInsert) );
85173 assert( pC->eCurType==CURTYPE_BTREE || pOp->opcode==OP_SorterInsert );
85174 assert( pC->isTable==0 );
85178 rc = sqlite3VdbeSorterWrite(pC, pIn2);
85184 rc = sqlite3BtreeInsert(pC->uc.pCursor, &x,
85186 ((pOp->p5 & OPFLAG_USESEEKRESULT) ? pC->seekResult : 0)
85188 assert( pC->deferredMoveto==0 );
85189 pC->cacheStatus = CACHE_STALE;
85203 VdbeCursor *pC;
85211 pC = p->apCsr[pOp->p1];
85212 assert( pC!=0 );
85213 assert( pC->eCurType==CURTYPE_BTREE );
85214 pCrsr = pC->uc.pCursor;
85217 r.pKeyInfo = pC->pKeyInfo;
85227 assert( pC->deferredMoveto==0 );
85228 pC->cacheStatus = CACHE_STALE;
85229 pC->seekResult = 0;
85263 VdbeCursor *pC; /* The P1 index cursor */
85268 pC = p->apCsr[pOp->p1];
85269 assert( pC!=0 );
85270 assert( pC->eCurType==CURTYPE_BTREE );
85271 assert( pC->uc.pCursor!=0 );
85272 assert( pC->isTable==0 );
85273 assert( pC->deferredMoveto==0 );
85274 assert( !pC->nullRow || pOp->opcode==OP_IdxRowid );
85278 rc = sqlite3VdbeCursorRestore(pC);
85285 if( !pC->nullRow ){
85287 rc = sqlite3VdbeIdxRowid(db, pC->uc.pCursor, &rowid);
85303 pTabCur->pAltCursor = pC;
85363 VdbeCursor *pC;
85368 pC = p->apCsr[pOp->p1];
85369 assert( pC!=0 );
85370 assert( pC->isOrdered );
85371 assert( pC->eCurType==CURTYPE_BTREE );
85372 assert( pC->uc.pCursor!=0);
85373 assert( pC->deferredMoveto==0 );
85376 r.pKeyInfo = pC->pKeyInfo;
85390 rc = sqlite3VdbeIdxKeyCompare(db, pC, &r, &res);
85512 VdbeCursor *pC;
85515 pC = p->apCsr[pOp->p1];
85516 assert( pC!=0 );
85517 if( isSorter(pC) ){
85518 sqlite3VdbeSorterReset(db, pC->uc.pSorter);
85520 assert( pC->eCurType==CURTYPE_BTREE );
85521 assert( pC->isEphemeral );
85522 rc = sqlite3BtreeClearTableOfCursor(pC->uc.pCursor);
87176 VdbeCursor *pC;
87180 pC = p->apCsr[pOp->p1];
87181 if( pC ){
87182 assert( pC->eCurType==CURTYPE_BTREE );
87183 sqlite3BtreeCursorHint(pC->uc.pCursor, BTREE_HINT_RANGE,
87384 VdbeCursor *pC = v->apCsr[0];
87385 u32 type = pC->nHdrParsed>p->iCol ? pC->aType[p->iCol] : 0;
87386 testcase( pC->nHdrParsed==p->iCol );
87387 testcase( pC->nHdrParsed==p->iCol+1 );
87396 p->iOffset = pC->aType[p->iCol + pC->nField];
87398 p->pCsr = pC->uc.pCursor;
118899 SQLITE_PRIVATE int sqlite3JoinType(Parse *pParse, Token *pA, Token *pB, Token *pC){
118921 apAll[2] = pC;
118943 if( pC==0 ){ zSp++; }
118945 "%T %T%s%T", pA, pB, zSp, pC);
123517 struct AggInfo_col *pC;
123579 for(i=0, pC=pAggInfo->aCol; i<pAggInfo->nAccumulator; i++, pC++){
123580 sqlite3ExprCode(pParse, pC->pExpr, pC->iMem);
132571 u8 c, *pC; /* Last character before the first wildcard */
132572 pC = (u8*)&pStr2->u.zToken[sqlite3Strlen30(pStr2->u.zToken)-1];
132573 c = *pC;
132584 *pC = c + 1;
136095 CollSeq *pC = 0;
136099 pC = sqlite3BinaryCompareCollSeq(pHidden->pParse, pX->pLeft, pX->pRight);
136101 zRet = (pC ? pC->zName : "BINARY");
165288 sqlite3_tokenizer_cursor *pC;
165294 rc = sqlite3Fts3OpenTokenizer(pTab->pTokenizer, iLangid, zDoc, nDoc, &pC);
165300 rc = pMod->xNext(pC, &ZDUMMY, &DUMMY1, &DUMMY2, &DUMMY3, &iCurrent);
165302 pMod->xClose(pC);
165342 sqlite3_tokenizer_cursor *pC; /* Tokenizer cursor open on zDoc/nDoc */
165355 rc = sqlite3Fts3OpenTokenizer(pTab->pTokenizer, pCsr->iLangid, zDoc,nDoc,&pC);
165378 rc = pMod->xNext(pC, &ZDUMMY, &DUMMY1, &iBegin, &iFin, &iCurrent);
165430 pMod->xClose(pC);
166192 sqlite3_tokenizer_cursor *pC; /* Tokenizer cursor */
166227 zDoc, nDoc, &pC
166231 rc = pMod->xNext(pC, &ZDUMMY, &NDUMMY, &iStart, &iEnd, &iCurrent);
166256 rc = pMod->xNext(pC, &ZDUMMY, &NDUMMY, &iStart, &iEnd, &iCurrent);
166273 pMod->xClose(pC);
166632 sqlite3_tokenizer_cursor *pC, /* Cursor returned by simpleOpen */
166639 unicode_cursor *pCsr = (unicode_cursor *)pC;
179965 SessionChange *pC;
179966 for(pC=pTab->apChange[iHash]; pC; pC=pC->pNext){
179967 if( sessionPreupdateEqual(pSession, pTab, pC, op) ) break;
179970 if( pC==0 ){
180033 }else if( pC->bIndirect ){
180039 pC->bIndirect = 0;
201355 struct Constraint *pC = &aConstraint[j];
201356 if( iCol==aColMap[pC->iCol] && p->op & pC->op && p->usable ){
201357 pC->iConsIndex = i;
201358 idxFlags |= pC->fts5op;
201396 struct Constraint *pC = &aConstraint[i];
201397 if( pC->iConsIndex>=0 ){
201398 pInfo->aConstraintUsage[pC->iConsIndex].argvIndex = iNext++;
201399 pInfo->aConstraintUsage[pC->iConsIndex].omit = (unsigned char)pC->omit;
203631 Fts5Config *pC = p->pConfig;
203637 pC->zContentExprlist, pC->zContent
203643 zSql = sqlite3_mprintf(azStmt[eStmt], pC->zContentExprlist,
203644 pC->zContent, pC->zContentRowid, pC->zContentRowid,
203645 pC->zContentRowid
203651 pC->zContentExprlist, pC->zContent, pC->zContentRowid
203657 int nCol = pC->nCol + 1;
203668 zSql = sqlite3_mprintf(azStmt[eStmt], pC->zDb, pC->zName, zBind);
203675 zSql = sqlite3_mprintf(azStmt[eStmt], pC->zDb, pC->zName);
203682 rc = sqlite3_prepare_v3(pC->db, zSql, -1,
203686 *pzErrMsg = sqlite3_mprintf("%s", sqlite3_errmsg(pC->db));