Lines Matching refs:pOp

489   Op *pOp;                   /* Current operation */  in sqliteVdbeExec()  local
521 pOp = &p->aOp[pc]; in sqliteVdbeExec()
527 sqliteVdbePrintOp(p->trace, pc, pOp); in sqliteVdbeExec()
562 switch( pOp->opcode ){ in sqliteVdbeExec()
601 pc = pOp->p2 - 1; in sqliteVdbeExec()
622 pc = pOp->p2 - 1; in sqliteVdbeExec()
663 if( pOp->p1!=SQLITE_OK ){ in sqliteVdbeExec()
664 p->rc = pOp->p1; in sqliteVdbeExec()
665 p->errorAction = pOp->p2; in sqliteVdbeExec()
666 if( pOp->p3 ){ in sqliteVdbeExec()
667 sqliteSetString(&p->zErrMsg, pOp->p3, (char*)0); in sqliteVdbeExec()
683 pTos->i = pOp->p1; in sqliteVdbeExec()
685 if( pOp->p3 ){ in sqliteVdbeExec()
686 pTos->z = pOp->p3; in sqliteVdbeExec()
688 pTos->n = strlen(pOp->p3)+1; in sqliteVdbeExec()
699 char *z = pOp->p3; in sqliteVdbeExec()
721 int j = pOp->p1 - 1; in sqliteVdbeExec()
738 assert( pOp->p1>=0 ); in sqliteVdbeExec()
739 popStack(&pTos, pOp->p1); in sqliteVdbeExec()
760 Mem *pFrom = &pTos[-pOp->p1]; in sqliteVdbeExec()
765 if( pOp->p2 && (pTos->flags & (MEM_Dyn|MEM_Ephem)) ){ in sqliteVdbeExec()
793 Mem *pFrom = &pTos[-pOp->p1]; in sqliteVdbeExec()
799 for(i=0; i<pOp->p1; i++, pFrom++){ in sqliteVdbeExec()
812 assert( pTos->z==pTos[-pOp->p1].zShort ); in sqliteVdbeExec()
825 Mem *pTo = &pTos[-pOp->p1]; in sqliteVdbeExec()
851 assert( pOp->p1>=0 && pOp->p1<p->nOp ); in sqliteVdbeExec()
852 p->azColName[pOp->p1] = pOp->p3; in sqliteVdbeExec()
854 if( pOp->p2 ) p->nResColumn = pOp->p1+1; in sqliteVdbeExec()
869 pCol = &pTos[1-pOp->p1]; in sqliteVdbeExec()
871 for(i=0; i<pOp->p1; i++, pCol++){ in sqliteVdbeExec()
882 assert( p->nResColumn==pOp->p1 ); in sqliteVdbeExec()
883 p->popStack = pOp->p1; in sqliteVdbeExec()
910 nField = pOp->p1; in sqliteVdbeExec()
911 zSep = pOp->p3; in sqliteVdbeExec()
927 if( pOp->p2==0 ){ in sqliteVdbeExec()
948 if( pOp->p2==0 ){ in sqliteVdbeExec()
1020 switch( pOp->opcode ){ in sqliteVdbeExec()
1046 switch( pOp->opcode ){ in sqliteVdbeExec()
1093 n = pOp->p1; in sqliteVdbeExec()
1104 ctx.pFunc = (FuncDef*)pOp->p3; in sqliteVdbeExec()
1172 switch( pOp->opcode ){ in sqliteVdbeExec()
1198 pTos->i += pOp->p1; in sqliteVdbeExec()
1219 pc = pOp->p2 - 1; in sqliteVdbeExec()
1223 v = pTos->i + (pOp->p1!=0); in sqliteVdbeExec()
1228 if( pOp->p1 && pTos->r==(double)v ) v++; in sqliteVdbeExec()
1281 if( pOp->p2==0 ){ in sqliteVdbeExec()
1285 if( pOp->p1 ) popStack(&pTos, 1); in sqliteVdbeExec()
1286 pc = pOp->p2 - 1; in sqliteVdbeExec()
1416 if( pOp->p2 ){ in sqliteVdbeExec()
1417 if( pOp->p1 ) pc = pOp->p2-1; in sqliteVdbeExec()
1434 switch( pOp->opcode ){ in sqliteVdbeExec()
1443 if( pOp->p2 ){ in sqliteVdbeExec()
1444 if( c ) pc = pOp->p2-1; in sqliteVdbeExec()
1570 if( pOp->p2 ){ in sqliteVdbeExec()
1571 if( pOp->p1 ) pc = pOp->p2-1; in sqliteVdbeExec()
1587 switch( pOp->opcode ){ in sqliteVdbeExec()
1588 case OP_StrEq: c = c==0; assert( pOp->opcode-6==OP_Eq ); break; in sqliteVdbeExec()
1589 case OP_StrNe: c = c!=0; assert( pOp->opcode-6==OP_Ne ); break; in sqliteVdbeExec()
1590 case OP_StrLt: c = c<0; assert( pOp->opcode-6==OP_Lt ); break; in sqliteVdbeExec()
1591 case OP_StrLe: c = c<=0; assert( pOp->opcode-6==OP_Le ); break; in sqliteVdbeExec()
1592 case OP_StrGt: c = c>0; assert( pOp->opcode-6==OP_Gt ); break; in sqliteVdbeExec()
1593 default: c = c>=0; assert( pOp->opcode-6==OP_Ge ); break; in sqliteVdbeExec()
1596 if( pOp->p2 ){ in sqliteVdbeExec()
1597 if( c ) pc = pOp->p2-1; in sqliteVdbeExec()
1636 if( pOp->opcode==OP_And ){ in sqliteVdbeExec()
1671 if( pOp->opcode==OP_Negative || pTos->r<0.0 ){ in sqliteVdbeExec()
1677 if( pOp->opcode==OP_Negative || pTos->i<0 ){ in sqliteVdbeExec()
1686 if( pOp->opcode==OP_Negative || pTos->r<0.0 ){ in sqliteVdbeExec()
1760 c = pOp->p1; in sqliteVdbeExec()
1764 if( pOp->opcode==OP_IfNot ) c = !c; in sqliteVdbeExec()
1768 if( c ) pc = pOp->p2-1; in sqliteVdbeExec()
1781 cnt = pOp->p1; in sqliteVdbeExec()
1787 pc = pOp->p2-1; in sqliteVdbeExec()
1791 if( pOp->p1>0 ) popStack(&pTos, cnt); in sqliteVdbeExec()
1803 cnt = pOp->p1; in sqliteVdbeExec()
1807 if( i>=cnt ) pc = pOp->p2-1; in sqliteVdbeExec()
1808 if( pOp->p1>0 ) popStack(&pTos, cnt); in sqliteVdbeExec()
1863 nField = pOp->p1; in sqliteVdbeExec()
1869 addUnique = pOp->p2; in sqliteVdbeExec()
2025 addRowid = pOp->opcode==OP_MakeIdxKey; in sqliteVdbeExec()
2026 nField = pOp->p1; in sqliteVdbeExec()
2037 }else if( pOp->p3 && pOp->p3[j]=='t' ){ in sqliteVdbeExec()
2095 if( pOp->p2 && containsNull ) pc = pOp->p2 - 1; in sqliteVdbeExec()
2097 if( pOp->p2==0 ) popStack(&pTos, nField); in sqliteVdbeExec()
2145 int i = pOp->p1; in sqliteVdbeExec()
2171 int i = pOp->p1; in sqliteVdbeExec()
2273 assert( pOp->p2<SQLITE_N_BTREE_META ); in sqliteVdbeExec()
2274 assert( pOp->p1>=0 && pOp->p1<db->nDb ); in sqliteVdbeExec()
2275 assert( db->aDb[pOp->p1].pBt!=0 ); in sqliteVdbeExec()
2276 rc = sqliteBtreeGetMeta(db->aDb[pOp->p1].pBt, aMeta); in sqliteVdbeExec()
2278 pTos->i = aMeta[1+pOp->p2]; in sqliteVdbeExec()
2295 assert( pOp->p2<SQLITE_N_BTREE_META ); in sqliteVdbeExec()
2296 assert( pOp->p1>=0 && pOp->p1<db->nDb ); in sqliteVdbeExec()
2297 assert( db->aDb[pOp->p1].pBt!=0 ); in sqliteVdbeExec()
2300 rc = sqliteBtreeGetMeta(db->aDb[pOp->p1].pBt, aMeta); in sqliteVdbeExec()
2302 aMeta[1+pOp->p2] = pTos->i; in sqliteVdbeExec()
2303 rc = sqliteBtreeUpdateMeta(db->aDb[pOp->p1].pBt, aMeta); in sqliteVdbeExec()
2328 assert( pOp->p1>=0 && pOp->p1<db->nDb ); in sqliteVdbeExec()
2329 rc = sqliteBtreeGetMeta(db->aDb[pOp->p1].pBt, aMeta); in sqliteVdbeExec()
2330 if( rc==SQLITE_OK && aMeta[1]!=pOp->p2 ){ in sqliteVdbeExec()
2384 int i = pOp->p1; in sqliteVdbeExec()
2385 int p2 = pOp->p2; in sqliteVdbeExec()
2397 wrFlag = pOp->opcode==OP_OpenWrite; in sqliteVdbeExec()
2422 p->pTos = &pTos[1 + (pOp->p2<=0)]; /* Operands must remain on stack */ in sqliteVdbeExec()
2424 }else if( (*db->xBusyCallback)(db->pBusyArg, pOp->p3, ++busy)==0 ){ in sqliteVdbeExec()
2461 int i = pOp->p1; in sqliteVdbeExec()
2475 if( pOp->p2 ){ in sqliteVdbeExec()
2499 int i = pOp->p1; in sqliteVdbeExec()
2517 int i = pOp->p1; in sqliteVdbeExec()
2547 int i = pOp->p1; in sqliteVdbeExec()
2558 if( pOp->p2==0 && pOp->opcode==OP_MoveTo ){ in sqliteVdbeExec()
2575 oc = pOp->opcode; in sqliteVdbeExec()
2579 if( res && pOp->p2>0 ){ in sqliteVdbeExec()
2580 pc = pOp->p2 - 1; in sqliteVdbeExec()
2593 if( res && pOp->p2>0 ){ in sqliteVdbeExec()
2594 pc = pOp->p2 - 1; in sqliteVdbeExec()
2639 int i = pOp->p1; in sqliteVdbeExec()
2651 if( pOp->opcode==OP_Found ){ in sqliteVdbeExec()
2652 if( alreadyExists ) pc = pOp->p2 - 1; in sqliteVdbeExec()
2654 if( !alreadyExists ) pc = pOp->p2 - 1; in sqliteVdbeExec()
2656 if( pOp->opcode!=OP_Distinct ){ in sqliteVdbeExec()
2684 int i = pOp->p1; in sqliteVdbeExec()
2718 pc = pOp->p2 - 1; in sqliteVdbeExec()
2725 pc = pOp->p2 - 1; in sqliteVdbeExec()
2737 pc = pOp->p2 - 1; in sqliteVdbeExec()
2767 int i = pOp->p1; in sqliteVdbeExec()
2780 pc = pOp->p2 - 1; in sqliteVdbeExec()
2797 int i = pOp->p1; in sqliteVdbeExec()
2921 int i = pOp->p1; in sqliteVdbeExec()
2928 if( pOp->opcode==OP_PutStrKey ){ in sqliteVdbeExec()
2937 if( pOp->p2 & OPFLAG_NCHANGE ) db->nChange++; in sqliteVdbeExec()
2938 if( pOp->p2 & OPFLAG_LASTROWID ) db->lastRowid = pNos->i; in sqliteVdbeExec()
2939 if( pOp->p2 & OPFLAG_CSCHANGE ) db->csChange++; in sqliteVdbeExec()
2955 assert( pOp->opcode==OP_PutIntKey ); in sqliteVdbeExec()
2995 int i = pOp->p1; in sqliteVdbeExec()
3004 if( pOp->p2 & OPFLAG_NCHANGE ) db->nChange++; in sqliteVdbeExec()
3005 if( pOp->p2 & OPFLAG_CSCHANGE ) db->csChange++; in sqliteVdbeExec()
3028 int i = pOp->p1; in sqliteVdbeExec()
3030 p->aCsr[i].keyAsData = pOp->p2; in sqliteVdbeExec()
3054 int i = pOp->p1; in sqliteVdbeExec()
3069 }else if( pC->keyAsData || pOp->opcode==OP_RowKey ){ in sqliteVdbeExec()
3084 if( pC->keyAsData || pOp->opcode==OP_RowKey ){ in sqliteVdbeExec()
3120 int i = pOp->p1; in sqliteVdbeExec()
3121 int p2 = pOp->p2; in sqliteVdbeExec()
3233 int i = pOp->p1; in sqliteVdbeExec()
3270 int i = pOp->p1; in sqliteVdbeExec()
3309 int i = pOp->p1; in sqliteVdbeExec()
3326 int i = pOp->p1; in sqliteVdbeExec()
3337 if( res && pOp->p2>0 ){ in sqliteVdbeExec()
3338 pc = pOp->p2 - 1; in sqliteVdbeExec()
3355 int i = pOp->p1; in sqliteVdbeExec()
3367 if( res && pOp->p2>0 ){ in sqliteVdbeExec()
3368 pc = pOp->p2 - 1; in sqliteVdbeExec()
3398 assert( pOp->p1>=0 && pOp->p1<p->nCursor ); in sqliteVdbeExec()
3399 pC = &p->aCsr[pOp->p1]; in sqliteVdbeExec()
3406 rc = pOp->opcode==OP_Next ? sqliteBtreeNext(pCrsr, &res) : in sqliteVdbeExec()
3411 pc = pOp->p2 - 1; in sqliteVdbeExec()
3433 int i = pOp->p1; in sqliteVdbeExec()
3441 if( pOp->p2 ){ in sqliteVdbeExec()
3454 if( pOp->p3 && pOp->p3[0] ){ in sqliteVdbeExec()
3455 sqliteSetString(&p->zErrMsg, pOp->p3, (char*)0); in sqliteVdbeExec()
3481 int i = pOp->p1; in sqliteVdbeExec()
3509 int i = pOp->p1; in sqliteVdbeExec()
3561 int i= pOp->p1; in sqliteVdbeExec()
3575 if( pOp->opcode==OP_IdxLT ){ in sqliteVdbeExec()
3577 }else if( pOp->opcode==OP_IdxGE ){ in sqliteVdbeExec()
3581 pc = pOp->p2 - 1 ; in sqliteVdbeExec()
3599 int i = pOp->p1; in sqliteVdbeExec()
3609 pc = pOp->p2-1; in sqliteVdbeExec()
3632 rc = sqliteBtreeDropTable(db->aDb[pOp->p2].pBt, pOp->p1); in sqliteVdbeExec()
3649 rc = sqliteBtreeClearTable(db->aDb[pOp->p2].pBt, pOp->p1); in sqliteVdbeExec()
3681 assert( pOp->p3!=0 && pOp->p3type==P3_POINTER ); in sqliteVdbeExec()
3682 assert( pOp->p2>=0 && pOp->p2<db->nDb ); in sqliteVdbeExec()
3683 assert( db->aDb[pOp->p2].pBt!=0 ); in sqliteVdbeExec()
3684 if( pOp->opcode==OP_CreateTable ){ in sqliteVdbeExec()
3685 rc = sqliteBtreeCreateTable(db->aDb[pOp->p2].pBt, &pgno); in sqliteVdbeExec()
3687 rc = sqliteBtreeCreateIndex(db->aDb[pOp->p2].pBt, &pgno); in sqliteVdbeExec()
3693 *(u32*)pOp->p3 = pgno; in sqliteVdbeExec()
3694 pOp->p3 = 0; in sqliteVdbeExec()
3720 int iSet = pOp->p1; in sqliteVdbeExec()
3738 z = sqliteBtreeIntegrityCheck(db->aDb[pOp->p2].pBt, aRoot, nRoot); in sqliteVdbeExec()
3820 pc = pOp->p2 - 1; in sqliteVdbeExec()
3947 nField = pOp->p1; in sqliteVdbeExec()
4000 nField = strlen(pOp->p3); in sqliteVdbeExec()
4021 zNewKey[j++] = pOp->p3[k++]; in sqliteVdbeExec()
4093 pc = pOp->p2 - 1; in sqliteVdbeExec()
4111 assert( p->nResColumn==pOp->p1 ); in sqliteVdbeExec()
4132 assert( pOp->p3!=0 ); in sqliteVdbeExec()
4137 if( sqliteStrICmp(pOp->p3,"stdin")==0 ){ in sqliteVdbeExec()
4140 p->pFile = fopen(pOp->p3, "r"); in sqliteVdbeExec()
4143 sqliteSetString(&p->zErrMsg,"unable to open file: ", pOp->p3, (char*)0); in sqliteVdbeExec()
4167 nField = pOp->p1; in sqliteVdbeExec()
4214 zDelim = pOp->p3; in sqliteVdbeExec()
4265 pc = pOp->p2 - 1; in sqliteVdbeExec()
4275 int i = pOp->p1; in sqliteVdbeExec()
4305 int i = pOp->p1; in sqliteVdbeExec()
4332 if( pOp->p2 ){ in sqliteVdbeExec()
4342 if( pOp->p2 ){ in sqliteVdbeExec()
4359 int i = pOp->p1; in sqliteVdbeExec()
4380 int i = pOp->p1; in sqliteVdbeExec()
4386 if( pOp->p2>0 && pMem->i>0 ){ in sqliteVdbeExec()
4387 pc = pOp->p2 - 1; in sqliteVdbeExec()
4399 p->agg.nMem = pOp->p2; in sqliteVdbeExec()
4412 int i = pOp->p2; in sqliteVdbeExec()
4414 p->agg.apFunc[i] = (FuncDef*)pOp->p3; in sqliteVdbeExec()
4430 int n = pOp->p2; in sqliteVdbeExec()
4450 ctx.pFunc = (FuncDef*)pOp->p3; in sqliteVdbeExec()
4493 pc = pOp->p2 - 1; in sqliteVdbeExec()
4511 int i = pOp->p2; in sqliteVdbeExec()
4538 int i = pOp->p2; in sqliteVdbeExec()
4575 pc = pOp->p2 - 1; in sqliteVdbeExec()
4613 int i = pOp->p1; in sqliteVdbeExec()
4624 if( pOp->p3 ){ in sqliteVdbeExec()
4625 sqliteHashInsert(&p->aSet[i].hash, pOp->p3, strlen(pOp->p3)+1, p); in sqliteVdbeExec()
4644 int i = pOp->p1; in sqliteVdbeExec()
4648 pc = pOp->p2 - 1; in sqliteVdbeExec()
4662 int i = pOp->p1; in sqliteVdbeExec()
4667 pc = pOp->p2 - 1; in sqliteVdbeExec()
4690 if( pOp->p1<0 || pOp->p1>=p->nSet ){ in sqliteVdbeExec()
4691 if( pOp->opcode==OP_SetFirst ) pc = pOp->p2 - 1; in sqliteVdbeExec()
4694 pSet = &p->aSet[pOp->p1]; in sqliteVdbeExec()
4695 if( pOp->opcode==OP_SetFirst ){ in sqliteVdbeExec()
4698 pc = pOp->p2 - 1; in sqliteVdbeExec()
4708 pc = pOp->p2 - 1; in sqliteVdbeExec()
4764 sqlite_snprintf(sizeof(zBuf),zBuf,"%d",pOp->opcode); in sqliteVdbeExec()
4781 pOp->cycles += elapse; in sqliteVdbeExec()
4782 pOp->cnt++; in sqliteVdbeExec()