Lines Matching refs:pC

2548   Cursor *pC;  in sqliteVdbeExec()  local
2552 pC = &p->aCsr[i]; in sqliteVdbeExec()
2553 if( pC->pCursor!=0 ){ in sqliteVdbeExec()
2555 pC->nullRow = 0; in sqliteVdbeExec()
2559 pC->movetoTarget = iKey; in sqliteVdbeExec()
2560 pC->deferredMoveto = 1; in sqliteVdbeExec()
2565 sqliteBtreeMoveto(pC->pCursor, (char*)&iKey, sizeof(int), &res); in sqliteVdbeExec()
2566 pC->lastRecno = pTos->i; in sqliteVdbeExec()
2567 pC->recnoIsValid = res==0; in sqliteVdbeExec()
2570 sqliteBtreeMoveto(pC->pCursor, pTos->z, pTos->n, &res); in sqliteVdbeExec()
2571 pC->recnoIsValid = 0; in sqliteVdbeExec()
2573 pC->deferredMoveto = 0; in sqliteVdbeExec()
2577 sqliteBtreeNext(pC->pCursor, &res); in sqliteVdbeExec()
2578 pC->recnoIsValid = 0; in sqliteVdbeExec()
2584 sqliteBtreePrevious(pC->pCursor, &res); in sqliteVdbeExec()
2585 pC->recnoIsValid = 0; in sqliteVdbeExec()
2591 res = sqliteBtreeKeySize(pC->pCursor,&keysize)!=0 || keysize==0; in sqliteVdbeExec()
2641 Cursor *pC; in sqliteVdbeExec() local
2644 if( (pC = &p->aCsr[i])->pCursor!=0 ){ in sqliteVdbeExec()
2647 rx = sqliteBtreeMoveto(pC->pCursor, pTos->z, pTos->n, &res); in sqliteVdbeExec()
2649 pC->deferredMoveto = 0; in sqliteVdbeExec()
2799 Cursor *pC; in sqliteVdbeExec() local
2801 if( (pC = &p->aCsr[i])->pCursor==0 ){ in sqliteVdbeExec()
2837 if( !pC->useRandomRowid ){ in sqliteVdbeExec()
2838 if( pC->nextRowidValid ){ in sqliteVdbeExec()
2839 v = pC->nextRowid; in sqliteVdbeExec()
2841 rx = sqliteBtreeLast(pC->pCursor, &res); in sqliteVdbeExec()
2845 sqliteBtreeKey(pC->pCursor, 0, sizeof(v), (void*)&v); in sqliteVdbeExec()
2848 pC->useRandomRowid = 1; in sqliteVdbeExec()
2855 pC->nextRowidValid = 1; in sqliteVdbeExec()
2856 pC->nextRowid = v+1; in sqliteVdbeExec()
2858 pC->nextRowidValid = 0; in sqliteVdbeExec()
2861 if( pC->useRandomRowid ){ in sqliteVdbeExec()
2875 rx = sqliteBtreeMoveto(pC->pCursor, &x, sizeof(int), &res); in sqliteVdbeExec()
2884 pC->recnoIsValid = 0; in sqliteVdbeExec()
2885 pC->deferredMoveto = 0; in sqliteVdbeExec()
2922 Cursor *pC; in sqliteVdbeExec() local
2925 if( ((pC = &p->aCsr[i])->pCursor!=0 || pC->pseudoTable) ){ in sqliteVdbeExec()
2940 if( pC->nextRowidValid && pTos->i>=pC->nextRowid ){ in sqliteVdbeExec()
2941 pC->nextRowidValid = 0; in sqliteVdbeExec()
2950 if( pC->pseudoTable ){ in sqliteVdbeExec()
2956 sqliteFree(pC->pData); in sqliteVdbeExec()
2957 pC->iKey = iKey; in sqliteVdbeExec()
2958 pC->nData = pTos->n; in sqliteVdbeExec()
2960 pC->pData = pTos->z; in sqliteVdbeExec()
2963 pC->pData = sqliteMallocRaw( pC->nData ); in sqliteVdbeExec()
2964 if( pC->pData ){ in sqliteVdbeExec()
2965 memcpy(pC->pData, pTos->z, pC->nData); in sqliteVdbeExec()
2968 pC->nullRow = 0; in sqliteVdbeExec()
2970 rc = sqliteBtreeInsert(pC->pCursor, zKey, nKey, pTos->z, pTos->n); in sqliteVdbeExec()
2972 pC->recnoIsValid = 0; in sqliteVdbeExec()
2973 pC->deferredMoveto = 0; in sqliteVdbeExec()
2996 Cursor *pC; in sqliteVdbeExec() local
2998 pC = &p->aCsr[i]; in sqliteVdbeExec()
2999 if( pC->pCursor!=0 ){ in sqliteVdbeExec()
3000 sqliteVdbeCursorMoveto(pC); in sqliteVdbeExec()
3001 rc = sqliteBtreeDelete(pC->pCursor); in sqliteVdbeExec()
3002 pC->nextRowidValid = 0; in sqliteVdbeExec()
3055 Cursor *pC; in sqliteVdbeExec() local
3060 pC = &p->aCsr[i]; in sqliteVdbeExec()
3061 if( pC->nullRow ){ in sqliteVdbeExec()
3063 }else if( pC->pCursor!=0 ){ in sqliteVdbeExec()
3064 BtCursor *pCrsr = pC->pCursor; in sqliteVdbeExec()
3065 sqliteVdbeCursorMoveto(pC); in sqliteVdbeExec()
3066 if( pC->nullRow ){ in sqliteVdbeExec()
3069 }else if( pC->keyAsData || pOp->opcode==OP_RowKey ){ in sqliteVdbeExec()
3084 if( pC->keyAsData || pOp->opcode==OP_RowKey ){ in sqliteVdbeExec()
3089 }else if( pC->pseudoTable ){ in sqliteVdbeExec()
3090 pTos->n = pC->nData; in sqliteVdbeExec()
3091 pTos->z = pC->pData; in sqliteVdbeExec()
3122 Cursor *pC; in sqliteVdbeExec() local
3135 }else if( (pC = &p->aCsr[i])->pCursor!=0 ){ in sqliteVdbeExec()
3136 sqliteVdbeCursorMoveto(pC); in sqliteVdbeExec()
3138 pCrsr = pC->pCursor; in sqliteVdbeExec()
3139 if( pC->nullRow ){ in sqliteVdbeExec()
3141 }else if( pC->keyAsData ){ in sqliteVdbeExec()
3146 }else if( pC->pseudoTable ){ in sqliteVdbeExec()
3147 payloadSize = pC->nData; in sqliteVdbeExec()
3148 zRec = pC->pData; in sqliteVdbeExec()
3176 }else if( pC->keyAsData ){ in sqliteVdbeExec()
3216 if( pC->keyAsData ){ in sqliteVdbeExec()
3234 Cursor *pC; in sqliteVdbeExec() local
3238 pC = &p->aCsr[i]; in sqliteVdbeExec()
3239 sqliteVdbeCursorMoveto(pC); in sqliteVdbeExec()
3241 if( pC->recnoIsValid ){ in sqliteVdbeExec()
3242 v = pC->lastRecno; in sqliteVdbeExec()
3243 }else if( pC->pseudoTable ){ in sqliteVdbeExec()
3244 v = keyToInt(pC->iKey); in sqliteVdbeExec()
3245 }else if( pC->nullRow || pC->pCursor==0 ){ in sqliteVdbeExec()
3249 assert( pC->pCursor!=0 ); in sqliteVdbeExec()
3250 sqliteBtreeKey(pC->pCursor, 0, sizeof(u32), (char*)&v); in sqliteVdbeExec()
3327 Cursor *pC; in sqliteVdbeExec() local
3331 pC = &p->aCsr[i]; in sqliteVdbeExec()
3332 if( (pCrsr = pC->pCursor)!=0 ){ in sqliteVdbeExec()
3335 pC->nullRow = res; in sqliteVdbeExec()
3336 pC->deferredMoveto = 0; in sqliteVdbeExec()
3341 pC->nullRow = 0; in sqliteVdbeExec()
3356 Cursor *pC; in sqliteVdbeExec() local
3360 pC = &p->aCsr[i]; in sqliteVdbeExec()
3361 if( (pCrsr = pC->pCursor)!=0 ){ in sqliteVdbeExec()
3364 pC->atFirst = res==0; in sqliteVdbeExec()
3365 pC->nullRow = res; in sqliteVdbeExec()
3366 pC->deferredMoveto = 0; in sqliteVdbeExec()
3371 pC->nullRow = 0; in sqliteVdbeExec()
3394 Cursor *pC; in sqliteVdbeExec() local
3399 pC = &p->aCsr[pOp->p1]; in sqliteVdbeExec()
3400 if( (pCrsr = pC->pCursor)!=0 ){ in sqliteVdbeExec()
3402 if( pC->nullRow ){ in sqliteVdbeExec()
3405 assert( pC->deferredMoveto==0 ); in sqliteVdbeExec()
3408 pC->nullRow = res; in sqliteVdbeExec()
3415 pC->nullRow = 1; in sqliteVdbeExec()
3417 pC->recnoIsValid = 0; in sqliteVdbeExec()