Lines Matching refs:P2
9668 int p2; /* Second parameter (often the jump destination) */
9719 signed char p2; /* Second parameter (often the jump destination) */
9770 ** The following macro converts a relative address in the p2 field
9785 #define OP_Function 1 /* synopsis: r[P3]=func(r[P2@P5]) */
9794 #define OP_AggStep 10 /* synopsis: accum=r[P3] step(r[P2@P5]) */
9799 #define OP_VUpdate 15 /* synopsis: data=r[P3@P2] */
9803 #define OP_Not 19 /* same as TK_NOT, synopsis: r[P2]= !r[P1] */
9809 #define OP_Integer 25 /* synopsis: r[P2]=P1 */
9810 #define OP_Int64 26 /* synopsis: r[P2]=P4 */
9811 #define OP_String 27 /* synopsis: r[P2]='P4' (len=P1) */
9812 #define OP_Null 28 /* synopsis: r[P2..P3]=NULL */
9814 #define OP_Blob 30 /* synopsis: r[P2]=P4 (len=P1) */
9815 #define OP_Variable 31 /* synopsis: r[P2]=parameter(P1,P4) */
9816 #define OP_Move 32 /* synopsis: r[P2@P3]=r[P1@P3] */
9817 #define OP_Copy 33 /* synopsis: r[P2@P3+1]=r[P1@P3+1] */
9818 #define OP_SCopy 34 /* synopsis: r[P2]=r[P1] */
9819 #define OP_ResultRow 35 /* synopsis: output=r[P1@P2] */
9821 #define OP_AddImm 37 /* synopsis: r[P1]=r[P1]+P2 */
9826 #define OP_Compare 42 /* synopsis: r[P1@P3] <-> r[P2@P3] */
9832 #define OP_Affinity 48 /* synopsis: affinity(r[P1@P2]) */
9833 #define OP_MakeRecord 49 /* synopsis: r[P3]=mkrec(r[P1@P2]) */
9834 #define OP_Count 50 /* synopsis: r[P2]=count() */
9837 #define OP_ReopenIdx 53 /* synopsis: root=P2 iDb=P3 */
9838 #define OP_OpenRead 54 /* synopsis: root=P2 iDb=P3 */
9839 #define OP_OpenWrite 55 /* synopsis: root=P2 iDb=P3 */
9840 #define OP_OpenAutoindex 56 /* synopsis: nColumn=P2 */
9841 #define OP_OpenEphemeral 57 /* synopsis: nColumn=P2 */
9843 #define OP_SequenceTest 59 /* synopsis: if( cursor[P1].ctr++ ) pc = P2 */
9844 #define OP_OpenPseudo 60 /* synopsis: P3 columns in r[P2] */
9850 #define OP_Seek 66 /* synopsis: intkey=r[P2] */
9855 #define OP_Or 71 /* same as TK_OR, synopsis: r[P3]=(r[P1] || r[P2]) */
9856 #define OP_And 72 /* same as TK_AND, synopsis: r[P3]=(r[P1] && r[P2]) */
9857 #define OP_Sequence 73 /* synopsis: r[P2]=cursor[P1].ctr++ */
9858 #define OP_NewRowid 74 /* synopsis: r[P2]=rowid */
9859 #define OP_Insert 75 /* synopsis: intkey=r[P3] data=r[P2] */
9860 #define OP_IsNull 76 /* same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */
9861 #define OP_NotNull 77 /* same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */
9862 #define OP_Ne 78 /* same as TK_NE, synopsis: if r[P1]!=r[P3] goto P2 */
9863 #define OP_Eq 79 /* same as TK_EQ, synopsis: if r[P1]==r[P3] goto P2 */
9864 #define OP_Gt 80 /* same as TK_GT, synopsis: if r[P1]>r[P3] goto P2 */
9865 #define OP_Le 81 /* same as TK_LE, synopsis: if r[P1]<=r[P3] goto P2 */
9866 #define OP_Lt 82 /* same as TK_LT, synopsis: if r[P1]<r[P3] goto P2 */
9867 #define OP_Ge 83 /* same as TK_GE, synopsis: if r[P1]>=r[P3] goto P2 */
9868 #define OP_InsertInt 84 /* synopsis: intkey=P3 data=r[P2] */
9869 #define OP_BitAnd 85 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */
9870 #define OP_BitOr 86 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */
9871 #define OP_ShiftLeft 87 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<<r[P1] */
9872 #define OP_ShiftRight 88 /* same as TK_RSHIFT, synopsis: r[P3]=r[P2]>>r[P1] */
9873 #define OP_Add 89 /* same as TK_PLUS, synopsis: r[P3]=r[P1]+r[P2] */
9874 #define OP_Subtract 90 /* same as TK_MINUS, synopsis: r[P3]=r[P2]-r[P1] */
9875 #define OP_Multiply 91 /* same as TK_STAR, synopsis: r[P3]=r[P1]*r[P2] */
9876 #define OP_Divide 92 /* same as TK_SLASH, synopsis: r[P3]=r[P2]/r[P1] */
9877 #define OP_Remainder 93 /* same as TK_REM, synopsis: r[P3]=r[P2]%r[P1] */
9878 #define OP_Concat 94 /* same as TK_CONCAT, synopsis: r[P3]=r[P2]+r[P1] */
9881 #define OP_String8 97 /* same as TK_STRING, synopsis: r[P2]='P4' */
9883 #define OP_SorterCompare 99 /* synopsis: if key(P1)!=trim(r[P3],P4) goto P2 */
9884 #define OP_SorterData 100 /* synopsis: r[P2]=data */
9885 #define OP_RowKey 101 /* synopsis: r[P2]=key */
9886 #define OP_RowData 102 /* synopsis: r[P2]=data */
9887 #define OP_Rowid 103 /* synopsis: r[P2]=rowid */
9894 #define OP_IdxInsert 110 /* synopsis: key=r[P2] */
9895 #define OP_IdxDelete 111 /* synopsis: key=r[P2@P3] */
9896 #define OP_IdxRowid 112 /* synopsis: r[P2]=rowid */
9904 #define OP_CreateIndex 120 /* synopsis: r[P2]=root iDb=P1 */
9905 #define OP_CreateTable 121 /* synopsis: r[P2]=root iDb=P1 */
9912 #define OP_RowSetAdd 128 /* synopsis: rowset(P1)=r[P2] */
9914 #define OP_RowSetTest 130 /* synopsis: if r[P3] in rowset(P1) goto P2 */
9917 #define OP_Real 133 /* same as TK_FLOAT, synopsis: r[P2]=P4 */
9918 #define OP_FkCounter 134 /* synopsis: fkctr[P1]+=P2
9919 #define OP_FkIfZero 135 /* synopsis: if fkctr[P1]==0 goto P2 */
9920 #define OP_MemMax 136 /* synopsis: r[P1]=max(r[P1],r[P2]) */
9921 #define OP_IfPos 137 /* synopsis: if r[P1]>0 goto P2 */
9922 #define OP_IfNeg 138 /* synopsis: r[P1]+=P3, if r[P1]<0 goto P2 */
9923 #define OP_IfNotZero 139 /* synopsis: if r[P1]!=0 then r[P1]+=P3, goto P2 */
9924 #define OP_DecrJumpZero 140 /* synopsis: if (--r[P1])==0 goto P2 */
9925 #define OP_JumpZeroIncr 141 /* synopsis: if (r[P1]++)==0 ) goto P2 */
9926 #define OP_AggFinal 142 /* synopsis: accum=r[P1] N=P2 */
9929 #define OP_TableLock 145 /* synopsis: iDb=P1 root=P2 write=P3 */
9934 #define OP_VColumn 150 /* synopsis: r[P3]=vcolumn(P2) */
9939 #define OP_Init 155 /* synopsis: Start at P2 */
9948 #define OPFLG_JUMP 0x0001 /* jump: P2 holds jmp target */
9950 #define OPFLG_IN2 0x0004 /* in2: P2 is an input */
9952 #define OPFLG_OUT2 0x0010 /* out2: P2 is an output */
9993 SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, u32 addr, int P2);
11445 #define SQLITE_STOREP2 0x20 /* Store result in reg[P2] rather than jump */
12269 ** the P4_KEYINFO and P2 parameters later. Neither the KeyInfo nor
12270 ** the number of columns in P2 can be computed at the same time
12636 #define OPFLAG_P2ISREG 0x04 /* P2 to OP_Open** is a register number */
24232 /* a: p0<<14 | p2 (unmasked) */
24260 /* a: p0<<14 | p2 (masked) */
24262 /* 1:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) */
24267 /* s: p0<<14 | p2 (masked) */
24272 /* a: p0<<28 | p2<<14 | p4 (unmasked) */
24285 /* 2:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) */
24288 /* s: p0<<21 | p1<<14 | p2<<7 | p3 (masked) */
24309 /* a: p2<<28 | p4<<14 | p6 (unmasked) */
24405 /* a: p0<<14 | p2
24463 /* a: p0<<28 | p2<<14 | p4 (unmasked) */
25084 /* 1 */ "Function" OpHelp("r[P3]=func(r[P2@P5])"),
25093 /* 10 */ "AggStep" OpHelp("accum=r[P3] step(r[P2@P5])"),
25098 /* 15 */ "VUpdate" OpHelp("data=r[P3@P2]"),
25102 /* 19 */ "Not" OpHelp("r[P2]= !r[P1]"),
25108 /* 25 */ "Integer" OpHelp("r[P2]=P1"),
25109 /* 26 */ "Int64" OpHelp("r[P2]=P4"),
25110 /* 27 */ "String" OpHelp("r[P2]='P4' (len=P1)"),
25111 /* 28 */ "Null" OpHelp("r[P2..P3]=NULL"),
25113 /* 30 */ "Blob" OpHelp("r[P2]=P4 (len=P1)"),
25114 /* 31 */ "Variable" OpHelp("r[P2]=parameter(P1,P4)"),
25115 /* 32 */ "Move" OpHelp("r[P2@P3]=r[P1@P3]"),
25116 /* 33 */ "Copy" OpHelp("r[P2@P3+1]=r[P1@P3+1]"),
25117 /* 34 */ "SCopy" OpHelp("r[P2]=r[P1]"),
25118 /* 35 */ "ResultRow" OpHelp("output=r[P1@P2]"),
25120 /* 37 */ "AddImm" OpHelp("r[P1]=r[P1]+P2"),
25125 /* 42 */ "Compare" OpHelp("r[P1@P3] <-> r[P2@P3]"),
25131 /* 48 */ "Affinity" OpHelp("affinity(r[P1@P2])"),
25132 /* 49 */ "MakeRecord" OpHelp("r[P3]=mkrec(r[P1@P2])"),
25133 /* 50 */ "Count" OpHelp("r[P2]=count()"),
25136 /* 53 */ "ReopenIdx" OpHelp("root=P2 iDb=P3"),
25137 /* 54 */ "OpenRead" OpHelp("root=P2 iDb=P3"),
25138 /* 55 */ "OpenWrite" OpHelp("root=P2 iDb=P3"),
25139 /* 56 */ "OpenAutoindex" OpHelp("nColumn=P2"),
25140 /* 57 */ "OpenEphemeral" OpHelp("nColumn=P2"),
25142 /* 59 */ "SequenceTest" OpHelp("if( cursor[P1].ctr++ ) pc = P2"),
25143 /* 60 */ "OpenPseudo" OpHelp("P3 columns in r[P2]"),
25149 /* 66 */ "Seek" OpHelp("intkey=r[P2]"),
25154 /* 71 */ "Or" OpHelp("r[P3]=(r[P1] || r[P2])"),
25155 /* 72 */ "And" OpHelp("r[P3]=(r[P1] && r[P2])"),
25156 /* 73 */ "Sequence" OpHelp("r[P2]=cursor[P1].ctr++"),
25157 /* 74 */ "NewRowid" OpHelp("r[P2]=rowid"),
25158 /* 75 */ "Insert" OpHelp("intkey=r[P3] data=r[P2]"),
25159 /* 76 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"),
25160 /* 77 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"),
25161 /* 78 */ "Ne" OpHelp("if r[P1]!=r[P3] goto P2"),
25162 /* 79 */ "Eq" OpHelp("if r[P1]==r[P3] goto P2"),
25163 /* 80 */ "Gt" OpHelp("if r[P1]>r[P3] goto P2"),
25164 /* 81 */ "Le" OpHelp("if r[P1]<=r[P3] goto P2"),
25165 /* 82 */ "Lt" OpHelp("if r[P1]<r[P3] goto P2"),
25166 /* 83 */ "Ge" OpHelp("if r[P1]>=r[P3] goto P2"),
25167 /* 84 */ "InsertInt" OpHelp("intkey=P3 data=r[P2]"),
25168 /* 85 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"),
25169 /* 86 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"),
25170 /* 87 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<<r[P1]"),
25171 /* 88 */ "ShiftRight" OpHelp("r[P3]=r[P2]>>r[P1]"),
25172 /* 89 */ "Add" OpHelp("r[P3]=r[P1]+r[P2]"),
25173 /* 90 */ "Subtract" OpHelp("r[P3]=r[P2]-r[P1]"),
25174 /* 91 */ "Multiply" OpHelp("r[P3]=r[P1]*r[P2]"),
25175 /* 92 */ "Divide" OpHelp("r[P3]=r[P2]/r[P1]"),
25176 /* 93 */ "Remainder" OpHelp("r[P3]=r[P2]%r[P1]"),
25177 /* 94 */ "Concat" OpHelp("r[P3]=r[P2]+r[P1]"),
25180 /* 97 */ "String8" OpHelp("r[P2]='P4'"),
25182 /* 99 */ "SorterCompare" OpHelp("if key(P1)!=trim(r[P3],P4) goto P2"),
25183 /* 100 */ "SorterData" OpHelp("r[P2]=data"),
25184 /* 101 */ "RowKey" OpHelp("r[P2]=key"),
25185 /* 102 */ "RowData" OpHelp("r[P2]=data"),
25186 /* 103 */ "Rowid" OpHelp("r[P2]=rowid"),
25193 /* 110 */ "IdxInsert" OpHelp("key=r[P2]"),
25194 /* 111 */ "IdxDelete" OpHelp("key=r[P2@P3]"),
25195 /* 112 */ "IdxRowid" OpHelp("r[P2]=rowid"),
25203 /* 120 */ "CreateIndex" OpHelp("r[P2]=root iDb=P1"),
25204 /* 121 */ "CreateTable" OpHelp("r[P2]=root iDb=P1"),
25211 /* 128 */ "RowSetAdd" OpHelp("rowset(P1)=r[P2]"),
25213 /* 130 */ "RowSetTest" OpHelp("if r[P3] in rowset(P1) goto P2"),
25216 /* 133 */ "Real" OpHelp("r[P2]=P4"),
25217 /* 134 */ "FkCounter" OpHelp("fkctr[P1]+=P2"),
25218 /* 135 */ "FkIfZero" OpHelp("if fkctr[P1]==0 goto P2"),
25219 /* 136 */ "MemMax" OpHelp("r[P1]=max(r[P1],r[P2])"),
25220 /* 137 */ "IfPos" OpHelp("if r[P1]>0 goto P2"),
25221 /* 138 */ "IfNeg" OpHelp("r[P1]+=P3, if r[P1]<0 goto P2"),
25222 /* 139 */ "IfNotZero" OpHelp("if r[P1]!=0 then r[P1]+=P3, goto P2"),
25223 /* 140 */ "DecrJumpZero" OpHelp("if (--r[P1])==0 goto P2"),
25224 /* 141 */ "JumpZeroIncr" OpHelp("if (r[P1]++)==0 ) goto P2"),
25225 /* 142 */ "AggFinal" OpHelp("accum=r[P1] N=P2"),
25228 /* 145 */ "TableLock" OpHelp("iDb=P1 root=P2 write=P3"),
25233 /* 150 */ "VColumn" OpHelp("r[P3]=vcolumn(P2)"),
25238 /* 155 */ "Init" OpHelp("Start at P2"),
64925 ** p1, p2, p3 Operands
64931 SQLITE_PRIVATE int sqlite3VdbeAddOp3(Vdbe *p, int op, int p1, int p2, int p3){
64948 pOp->p2 = p2;
64985 SQLITE_PRIVATE int sqlite3VdbeAddOp2(Vdbe *p, int op, int p1, int p2){
64986 return sqlite3VdbeAddOp3(p, op, p1, p2, 0);
64997 int p2, /* The P2 operand */
65002 int addr = sqlite3VdbeAddOp3(p, op, p1, p2, p3);
65029 int p2, /* The P2 operand */
65033 int addr = sqlite3VdbeAddOp3(p, op, p1, p2, p3);
65041 ** label can be used as the P2 value of an operation. Later, when
65043 ** through its operation list and change all values of P2 which match
65046 ** The VDBE knows that a P2 value is a label because labels are
65047 ** always negative and P2 values are suppose to be non-negative.
65048 ** Hence, a negative P2 value is a label that has yet to be resolved.
65165 ** * OP_Halt with P1=SQLITE_CONSTRAINT and P2=OE_Abort.
65166 ** * OP_HaltIfNull with P1=SQLITE_CONSTRAINT and P2=OE_Abort.
65170 ** * OP_FkCounter with P2==0 (immediate foreign key constraint)
65191 && ((pOp->p1&0xff)==SQLITE_CONSTRAINT && pOp->p2==OE_Abort))
65197 if( opcode==OP_FkCounter && pOp->p1==0 && pOp->p2==1 ){
65214 ** Loop through the program looking for P2 values that are negative
65216 ** label by setting the P2 value to its correct non-zero value.
65220 ** Variable *pMaxFuncArgs is set to the maximum value of any P2 argument
65246 if( pOp->p2!=0 ) p->readOnly = 0;
65265 if( pOp->p2>nMaxArgs ) nMaxArgs = pOp->p2;
65293 if( (pOp->opflags & OPFLG_JUMP)!=0 && pOp->p2<0 ){
65294 assert( -1-pOp->p2<pParse->nLabel );
65295 pOp->p2 = aLabel[-1-pOp->p2];
65352 int p2 = pIn->p2;
65356 if( p2<0 ){
65358 pOut->p2 = addr + ADDR(p2);
65360 pOut->p2 = p2;
65427 ** Change the value of the P2 operand for a specific instruction.
65433 p->aOp[addr].p2 = val;
65460 ** Change the P2 operand of instruction addr so that it points to
65738 if( c=='2' ) return pOp->p2;
66029 sqlite3OpcodeName(pOp->opcode), pOp->p1, pOp->p2, pOp->p3, zP4, pOp->p5,
66234 pMem->u.i = pOp->p2; /* P2 */
71351 ** Return the register of pOp->p2 after first preparing it to be
71356 assert( pOp->p2>0 );
71357 assert( pOp->p2<=(p->nMem-p->nCursor) );
71358 pOut = &p->aMem[pOp->p2];
71496 assert( pOp->p2>0 );
71497 assert( pOp->p2<=(p->nMem-p->nCursor) );
71498 assert( memIsValid(&aMem[pOp->p2]) );
71499 assert( sqlite3VdbeCheckMemInvariants(&aMem[pOp->p2]) );
71500 REGISTER_TRACE(pOp->p2, &aMem[pOp->p2]);
71510 assert( pOp->p2>0 );
71511 assert( pOp->p2<=(p->nMem-p->nCursor) );
71512 memAboutToChange(p, &aMem[pOp->p2]);
71561 /* Opcode: Goto * P2 * * *
71563 ** An unconditional jump to address P2.
71565 ** the one at index P2 from the beginning of
71570 ** that this Goto is the bottom of a loop and that the lines from P2 down
71575 pOp = &aOp[pOp->p2 - 1];
71609 /* Opcode: Gosub P1 P2 * * *
71612 ** and then jump to address P2.
71626 pOp = &aOp[pOp->p2 - 1];
71643 /* Opcode: InitCoroutine P1 P2 P3 * *
71648 ** If P2!=0 then the coroutine implementation immediately follows
71650 ** address P2.
71656 assert( pOp->p2>=0 && pOp->p2<p->nOp );
71662 if( pOp->p2 ) goto jump_to_p2;
71669 ** Jump to the P2 parameter of that Yield.
71681 assert( pCaller->p2>=0 && pCaller->p2<p->nOp );
71682 pOp = &aOp[pCaller->p2 - 1];
71687 /* Opcode: Yield P1 P2 * * *
71695 ** EndCoroutine, then jump to P2 rather than continuing with the
71712 /* Opcode: HaltIfNull P1 P2 P3 P4 P5
71716 ** parameter P1, P2, and P4 as if this were a Halt instruction. If the
71726 /* Opcode: Halt P1 P2 * P4 P5
71733 ** For errors, it can be some other value. If P1!=0 then P2 will determine
71735 ** if P2==OE_Fail. Do the rollback if P2==OE_Rollback. If P2==OE_Abort,
71771 if( pOp->p2==OE_Ignore ){
71773 ** currently being halted. If the p2 instruction of this OP_Halt
71776 ** as the p2 of the calling OP_Program. */
71777 pcx = p->aOp[pcx].p2-1;
71785 p->errorAction = (u8)pOp->p2;
71824 /* Opcode: Integer P1 P2 * * *
71825 ** Synopsis: r[P2]=P1
71827 ** The 32-bit integer value P1 is written into register P2.
71835 /* Opcode: Int64 * P2 * P4 *
71836 ** Synopsis: r[P2]=P4
71839 ** Write that value into register P2.
71849 /* Opcode: Real * P2 * P4 *
71850 ** Synopsis: r[P2]=P4
71853 ** Write that value into register P2.
71864 /* Opcode: String8 * P2 * P4 *
71865 ** Synopsis: r[P2]='P4'
71901 /* Opcode: String P1 P2 P3 P4 P5
71902 ** Synopsis: r[P2]='P4' (len=P1)
71904 P2.
71907 ** the datatype of the register P2 is converted to BLOB. The content is
71929 /* Opcode: Null P1 P2 P3 * *
71930 ** Synopsis: r[P2..P3]=NULL
71932 ** Write a NULL into registers P2. If P3 greater than P2, then also write
71933 ** NULL into register P3 and every register in between P2 and P3. If P3
71934 ** is less than P2 (typically P3 is zero) then only register P2 is
71945 cnt = pOp->p3-pOp->p2;
71973 /* Opcode: Blob P1 P2 * P4 *
71974 ** Synopsis: r[P2]=P4 (len=P1)
71977 ** blob in register P2.
71988 /* Opcode: Variable P1 P2 * P4 *
71989 ** Synopsis: r[P2]=parameter(P1,P4)
71991 ** Transfer the values of bound parameter P1 into register P2
72011 /* Opcode: Move P1 P2 P3 * *
72012 ** Synopsis: r[P2@P3]=r[P1@P3]
72015 ** registers P2..P2+P3-1. Registers P1..P1+P3-1 are
72017 ** P1..P1+P3-1 and P2..P2+P3-1 to overlap. It is an error
72023 int p2; /* Register to copy to */
72027 p2 = pOp->p2;
72028 assert( n>0 && p1>0 && p2>0 );
72029 assert( p1+n<=p2 || p2+n<=p1 );
72032 pOut = &aMem[p2];
72041 pOut->pScopyFrom += pOp->p2 - p1;
72045 REGISTER_TRACE(p2++, pOut);
72052 /* Opcode: Copy P1 P2 P3 * *
72053 ** Synopsis: r[P2@P3+1]=r[P1@P3+1]
72055 ** Make a copy of registers P1..P1+P3 into registers P2..P2+P3.
72065 pOut = &aMem[pOp->p2];
72073 REGISTER_TRACE(pOp->p2+pOp->p3-n, pOut);
72081 /* Opcode: SCopy P1 P2 * * *
72082 ** Synopsis: r[P2]=r[P1]
72084 ** Make a shallow copy of register P1 into register P2.
72096 pOut = &aMem[pOp->p2];
72105 /* Opcode: ResultRow P1 P2 * * *
72106 ** Synopsis: output=r[P1@P2]
72108 ** The registers P1 through P1+P2-1 contain a single row of
72111 ** structure to provide access to the r(P1)..r(P1+P2-1) values as
72117 assert( p->nResColumn==pOp->p2 );
72119 assert( pOp->p1+pOp->p2<=(p->nMem-p->nCursor)+1 );
72171 for(i=0; i<pOp->p2; i++){
72188 /* Opcode: Concat P1 P2 P3 * *
72189 ** Synopsis: r[P3]=r[P2]+r[P1]
72192 ** register P2 and store the result in register P3.
72193 ** If either the P1 or P2 text are NULL then store NULL in P3.
72195 ** P3 = P2 || P1
72198 ** if P3 is the same register as P2, the implementation is able
72205 pIn2 = &aMem[pOp->p2];
72236 /* Opcode: Add P1 P2 P3 * *
72237 ** Synopsis: r[P3]=r[P1]+r[P2]
72239 ** Add the value in register P1 to the value in register P2
72243 /* Opcode: Multiply P1 P2 P3 * *
72244 ** Synopsis: r[P3]=r[P1]*r[P2]
72247 ** Multiply the value in register P1 by the value in register P2
72251 /* Opcode: Subtract P1 P2 P3 * *
72252 ** Synopsis: r[P3]=r[P2]-r[P1]
72254 ** Subtract the value in register P1 from the value in register P2
72258 /* Opcode: Divide P1 P2 P3 * *
72259 ** Synopsis: r[P3]=r[P2]/r[P1]
72261 ** Divide the value in register P1 by the value in register P2
72262 ** and store the result in register P3 (P3=P2/P1). If the value in
72266 /* Opcode: Remainder P1 P2 P3 * *
72267 ** Synopsis: r[P3]=r[P2]%r[P1]
72269 ** Compute the remainder after integer register P2 is divided by
72290 pIn2 = &aMem[pOp->p2];
72386 /* Opcode: Function P1 P2 P3 P4 P5
72387 ** Synopsis: r[P3]=func(r[P2@P5])
72390 ** defines the function) with P5 arguments taken from register P2 and
72417 assert( n==0 || (pOp->p2>0 && pOp->p2+n<=(p->nMem-p->nCursor)+1) );
72418 assert( pOp->p3<pOp->p2 || pOp->p3>=pOp->p2+n );
72419 pArg = &aMem[pOp->p2];
72424 REGISTER_TRACE(pOp->p2+i, pArg);
72457 /* Opcode: BitAnd P1 P2 P3 * *
72458 ** Synopsis: r[P3]=r[P1]&r[P2]
72460 ** Take the bit-wise AND of the values in register P1 and P2 and
72464 /* Opcode: BitOr P1 P2 P3 * *
72465 ** Synopsis: r[P3]=r[P1]|r[P2]
72467 ** Take the bit-wise OR of the values in register P1 and P2 and
72471 /* Opcode: ShiftLeft P1 P2 P3 * *
72472 ** Synopsis: r[P3]=r[P2]<<r[P1]
72474 ** Shift the integer value in register P2 to the left by the
72479 /* Opcode: ShiftRight P1 P2 P3 * *
72480 ** Synopsis: r[P3]=r[P2]>>r[P1]
72482 ** Shift the integer value in register P2 to the right by the
72497 pIn2 = &aMem[pOp->p2];
72539 /* Opcode: AddImm P1 P2 * * *
72540 ** Synopsis: r[P1]=r[P1]+P2
72542 ** Add the constant P2 to the value in register P1.
72551 pIn1->u.i += pOp->p2;
72555 /* Opcode: MustBeInt P1 P2 * * *
72559 ** without data loss, then jump immediately to P2, or if P2==0
72568 if( pOp->p2==0 ){
72600 /* Opcode: Cast P1 P2 * * *
72603 ** Force the value in register P1 to be the type defined by P2.
72616 assert( pOp->p2>=SQLITE_AFF_NONE && pOp->p2<=SQLITE_AFF_REAL );
72617 testcase( pOp->p2==SQLITE_AFF_TEXT );
72618 testcase( pOp->p2==SQLITE_AFF_NONE );
72619 testcase( pOp->p2==SQLITE_AFF_NUMERIC );
72620 testcase( pOp->p2==SQLITE_AFF_INTEGER );
72621 testcase( pOp->p2==SQLITE_AFF_REAL );
72625 sqlite3VdbeMemCast(pIn1, pOp->p2, encoding);
72631 /* Opcode: Lt P1 P2 P3 P4 P5
72632 ** Synopsis: if r[P1]<r[P3] goto P2
72635 ** jump to address P2.
72660 ** store a boolean result (either 0, or 1, or NULL) in register P2.
72666 /* Opcode: Ne P1 P2 P3 P4 P5
72667 ** Synopsis: if r[P1]!=r[P3] goto P2
72679 /* Opcode: Eq P1 P2 P3 P4 P5
72680 ** Synopsis: if r[P1]==r[P3] goto P2
72692 /* Opcode: Le P1 P2 P3 P4 P5
72693 ** Synopsis: if r[P1]<=r[P3] goto P2
72699 /* Opcode: Gt P1 P2 P3 P4 P5
72700 ** Synopsis: if r[P1]>r[P3] goto P2
72706 /* Opcode: Ge P1 P2 P3 P4 P5
72707 ** Synopsis: if r[P1]>=r[P3] goto P2
72752 pOut = &aMem[pOp->p2];
72754 REGISTER_TRACE(pOp->p2, pOut);
72817 pOut = &aMem[pOp->p2];
72821 REGISTER_TRACE(pOp->p2, pOut);
72847 /* Opcode: Compare P1 P2 P3 P4 P5
72848 ** Synopsis: r[P1@P3] <-> r[P2@P3]
72851 ** vector "A") and in reg(P2)..reg(P2+P3-1) ("B"). Save the result of
72871 int p2;
72883 p2 = pOp->p2;
72889 assert( p2>0 && p2+mx<=(p->nMem-p->nCursor)+1 );
72892 assert( p2>0 && p2+n<=(p->nMem-p->nCursor)+1 );
72898 assert( memIsValid(&aMem[p2+idx]) );
72900 REGISTER_TRACE(p2+idx, &aMem[p2+idx]);
72904 iCompare = sqlite3MemCompare(&aMem[p1+idx], &aMem[p2+idx], pColl);
72914 /* Opcode: Jump P1 P2 P3 * *
72916 ** Jump to the instruction at address P1, P2, or P3 depending on whether
72918 ** equal to, or greater than the P2 vector, respectively.
72924 VdbeBranchTaken(1,3); pOp = &aOp[pOp->p2 - 1];
72931 /* Opcode: And P1 P2 P3 * *
72932 ** Synopsis: r[P3]=(r[P1] && r[P2])
72934 ** Take the logical AND of the values in registers P1 and P2 and
72937 ** If either P1 or P2 is 0 (false) then the result is 0 even if
72941 /* Opcode: Or P1 P2 P3 * *
72942 ** Synopsis: r[P3]=(r[P1] || r[P2])
72944 ** Take the logical OR of the values in register P1 and P2 and
72947 ** If either P1 or P2 is nonzero (true) then the result is 1 (true)
72962 pIn2 = &aMem[pOp->p2];
72985 /* Opcode: Not P1 P2 * * *
72986 ** Synopsis: r[P2]= !r[P1]
72989 ** boolean complement in register P2. If the value in register P1 is
72990 ** NULL, then a NULL is stored in P2.
72994 pOut = &aMem[pOp->p2];
73003 /* Opcode: BitNot P1 P2 * * *
73007 ** ones-complement of the P1 value into register P2. If P1 holds
73008 ** a NULL then store a NULL in P2.
73012 pOut = &aMem[pOp->p2];
73021 /* Opcode: Once P1 P2 * * *
73023 ** Check the "once" flag number P1. If it is set, jump to instruction P2.
73025 ** In other words, this opcode causes all following opcodes up through P2
73026 ** (but not including P2) to run just once and to be skipped on subsequent
73043 /* Opcode: If P1 P2 P3 * *
73045 ** Jump to P2 if the value in register P1 is true. The value
73049 /* Opcode: IfNot P1 P2 P3 * *
73051 ** Jump to P2 if the value in register P1 is False. The value
73076 /* Opcode: IsNull P1 P2 * * *
73077 ** Synopsis: if r[P1]==NULL goto P2
73079 ** Jump to P2 if the value in register P1 is NULL.
73090 /* Opcode: NotNull P1 P2 * * *
73091 ** Synopsis: if r[P1]!=NULL goto P2
73093 ** Jump to P2 if the value in register P1 is not NULL.
73104 /* Opcode: Column P1 P2 P3 P4 P5
73109 ** information about the format of the data.) Extract the P2-th column
73110 ** from this record. If there are less that (P2+1)
73115 ** If the column contains fewer than P2 fields, then extract a NULL. Or,
73131 int p2; /* column number to retrieve */
73149 p2 = pOp->p2;
73156 assert( p2<pC->nField );
73241 assert( pC->nHdrParsed<=p2 ); /* Conditional skipped */
73245 /* Make sure at least the first p2+1 entries of the header have been
73248 if( pC->nHdrParsed<=p2 ){
73250 ** to extract additional fields up through the p2+1-th field
73267 /* Fill in pC->aType[i] and aOffset[i] values through the p2-th field. */
73272 assert( i<=p2 && zHdr<zEndHdr );
73289 }while( i<=p2 && zHdr<zEndHdr );
73314 ** still not up to p2, that means that the record has fewer than p2
73317 if( pC->nHdrParsed<=p2 ){
73327 /* Extract the content for the p2+1-th column. Control can only
73328 ** reach this point if aOffset[p2], aOffset[p2+1], and pC->aType[p2] are
73331 assert( p2<pC->nHdrParsed );
73335 t = pC->aType[p2];
73336 if( pC->szRow>=aOffset[p2+1] ){
73339 sqlite3VdbeSerialGet(pC->aRow+aOffset[p2], t, pDest);
73356 rc = sqlite3VdbeMemFromBtree(pCrsr, aOffset[p2], len, !pC->isTable,
73389 /* Opcode: Affinity P1 P2 * P4 *
73390 ** Synopsis: affinity(r[P1@P2])
73392 ** Apply affinities to a range of P2 registers starting with P1.
73394 ** P4 is a string that is P2 characters long. The nth character of the
73404 assert( zAffinity[pOp->p2]==0 );
73415 /* Opcode: MakeRecord P1 P2 P3 P4 *
73416 ** Synopsis: r[P3]=mkrec(r[P1@P2])
73418 ** Convert P2 registers beginning with P1 into the [record format]
73422 ** P4 may be a string that is P2 characters long. The nth character of the
73469 assert( nField>0 && pOp->p2>0 && pOp->p2+nField<=(p->nMem-p->nCursor)+1 );
73471 nField = pOp->p2;
73476 assert( pOp->p3<pOp->p1 || pOp->p3>=pOp->p1+pOp->p2 );
73573 /* Opcode: Count P1 P2 * * *
73574 ** Synopsis: r[P2]=count()
73577 ** opened by cursor P1 in register P2
73771 /* Opcode: AutoCommit P1 P2 * * *
73773 ** Set the database auto-commit flag to P1 (1 or 0). If P2 is true, roll
73786 iRollback = pOp->p2;
73846 /* Opcode: Transaction P1 P2 P3 P4 P5
73850 ** If P2 is non-zero, then a write-transaction is started, or if a
73852 ** If P2 is zero, then a read-transaction is started.
73886 assert( p->readOnly==0 || pOp->p2==0 );
73889 if( pOp->p2 && (db->flags & SQLITE_QueryOnly)!=0 ){
73896 rc = sqlite3BtreeBeginTrans(pBt, pOp->p2);
73906 if( pOp->p2 && p->usesStmtJournal
73965 /* Opcode: ReadCookie P1 P2 P3 * *
73967 ** Read cookie number P3 from database P1 and write it into register P2.
73996 /* Opcode: SetCookie P1 P2 P3 * *
73999 ** into cookie number P2 of database P1. P2==1 is the schema version.
74000 ** P2==2 is the database format. P2==3 is the recommended pager cache
74008 assert( pOp->p2<SQLITE_N_BTREE_META );
74018 rc = sqlite3BtreeUpdateMeta(pDb->pBt, pOp->p2, (int)pIn3->u.i);
74019 if( pOp->p2==BTREE_SCHEMA_VERSION ){
74023 }else if( pOp->p2==BTREE_FILE_FORMAT ){
74036 /* Opcode: OpenRead P1 P2 P3 P4 P5
74037 ** Synopsis: root=P2 iDb=P3
74040 ** P2 in a database file. The database file is determined by P3.
74047 ** If P5!=0 then use the content of register P2 as the root page, not
74048 ** the value of P2 itself.
74067 /* Opcode: ReopenIdx P1 P2 P3 P4 P5
74068 ** Synopsis: root=P2 iDb=P3
74072 ** number of P2 and if it is this opcode becomes a no-op. In other words,
74081 /* Opcode: OpenWrite P1 P2 P3 P4 P5
74082 ** Synopsis: root=P2 iDb=P3
74085 ** page is P2. Or if P5!=0 use the content of register P2 to find the
74104 int p2;
74114 if( pCur && pCur->pgnoRoot==(u32)pOp->p2 ){
74136 p2 = pOp->p2;
74153 assert( p2>0 );
74154 assert( p2<=(p->nMem-p->nCursor) );
74155 pIn2 = &aMem[p2];
74159 p2 = (int)pIn2->u.i;
74160 /* The p2 value always comes from a prior OP_CreateTable opcode and
74161 ** that opcode will always set the p2 value to 2 or more or else fail.
74164 if( NEVER(p2<2) ) {
74184 pCur->pgnoRoot = p2;
74185 rc = sqlite3BtreeCursor(pX, p2, wrFlag, pKeyInfo, pCur->pCursor);
74201 /* Opcode: OpenEphemeral P1 P2 * P4 P5
74202 ** Synopsis: nColumn=P2
74209 ** P2 is the number of columns in the ephemeral table.
74219 /* Opcode: OpenAutoindex P1 P2 * P4 *
74220 ** Synopsis: nColumn=P2
74239 assert( pOp->p2>=0 );
74240 pCx = allocateCursor(p, pOp->p1, pOp->p2, -1, 1);
74276 /* Opcode: SorterOpen P1 P2 P3 P4 *
74290 assert( pOp->p2>=0 );
74291 pCx = allocateCursor(p, pOp->p1, pOp->p2, -1, 1);
74300 /* Opcode: SequenceTest P1 P2 * * *
74301 ** Synopsis: if( cursor[P1].ctr++ ) pc = P2
74304 ** to P2. Regardless of whether or not the jump is taken, increment the
74318 /* Opcode: OpenPseudo P1 P2 P3 * *
74319 ** Synopsis: P3 columns in r[P2]
74323 ** register P2. In other words, cursor P1 becomes an alias for the
74324 ** MEM_Blob content contained in register P2.
74342 pCx->pseudoTableReg = pOp->p2;
74360 /* Opcode: SeekGE P1 P2 P3 P4 *
74370 ** greater than or equal to the key and P2 is not zero, then jump to P2.
74378 /* Opcode: SeekGT P1 P2 P3 P4 *
74388 ** the key and P2 is not zero, then jump to P2.
74396 /* Opcode: SeekLT P1 P2 P3 P4 *
74406 ** the key and P2 is not zero, then jump to P2.
74414 /* Opcode: SeekLE P1 P2 P3 P4 *
74424 ** less than or equal to the key and P2 is not zero, then jump to P2.
74444 assert( pOp->p2!=0 );
74468 assert( pOp[1].p2==pOp[0].p2 );
74489 ** then the seek is not possible, so jump to P2 */
74578 assert( pOp->p2>0 );
74586 /* Opcode: Seek P1 P2 * * *
74587 ** Synopsis: intkey=r[P2]
74589 ** P1 is an open table cursor and P2 is a rowid integer. Arrange
74590 ** for P1 to move so that it points to the rowid given by P2.
74605 pIn2 = &aMem[pOp->p2];
74612 /* Opcode: Found P1 P2 P3 P4 *
74620 ** is a prefix of any entry in P1 then a jump is made to P2 and
74629 /* Opcode: NotFound P1 P2 P3 P4 *
74637 ** is not the prefix of any entry in P1 then a jump is made to P2. If P1
74648 /* Opcode: NoConflict P1 P2 P3 P4 *
74656 ** contains any NULL value, jump immediately to P2. If all terms of the
74659 ** immediately to P2. If there is a match, fall through and leave the P1
74753 /* Opcode: NotExists P1 P2 P3 * *
74758 ** rowid P3 then jump immediately to P2. If P1 does contain a record
74802 /* Opcode: Sequence P1 P2 * * *
74803 ** Synopsis: r[P2]=cursor[P1].ctr++
74806 ** Write the sequence number into register P2.
74819 /* Opcode: NewRowid P1 P2 P3 * *
74820 ** Synopsis: r[P2]=rowid
74825 ** written to register P2.
74953 /* Opcode: Insert P1 P2 P3 P4 P5
74954 ** Synopsis: intkey=r[P3] data=r[P2]
74959 ** number P2. The key is stored in register P3. The key must
74984 ** (WARNING/TODO: If P1 is a pseudo-cursor and P2 is dynamically
74985 ** allocated, then ownership of P2 is transferred to the pseudo-cursor
74986 ** and register P2 becomes ephemeral. If the cursor is changed, the
74987 ** value of register P2 will then change. Make sure this does not
74993 /* Opcode: InsertInt P1 P2 P3 P4 P5
74994 ** Synopsis: intkey=P3 data=r[P2]
75011 pData = &aMem[pOp->p2];
75019 REGISTER_TRACE(pOp->p2, pData);
75065 /* Opcode: Delete P1 P2 * P4 *
75074 ** If the OPFLAG_NCHANGE flag of P2 is set, then the row change count is
75114 if( pOp->p2 & OPFLAG_NCHANGE ) p->nChange++;
75130 /* Opcode: SorterCompare P1 P2 P3 P4
75131 ** Synopsis: if key(P1)!=trim(r[P3],P4) goto P2
75143 ** each other. Jump to P2 if they are different.
75162 /* Opcode: SorterData P1 P2 P3 * *
75163 ** Synopsis: r[P2]=data
75165 ** Write into register P2 the current sorter data for sorter cursor P1.
75177 pOut = &aMem[pOp->p2];
75187 /* Opcode: RowData P1 P2 * * *
75188 ** Synopsis: r[P2]=data
75190 ** Write into register P2 the complete row data for cursor P1.
75192 ** It is just copied onto the P2 register exactly as
75198 /* Opcode: RowKey P1 P2 * * *
75199 ** Synopsis: r[P2]=key
75201 ** Write into register P2 the complete row key for cursor P1.
75203 ** The key is copied onto the P2 register exactly as
75216 pOut = &aMem[pOp->p2];
75273 p2, pOut);
75277 /* Opcode: Rowid P1 P2 * * *
75278 ** Synopsis: r[P2]=rowid
75280 ** Store in register P2 an integer which is the key of the table entry that
75346 /* Opcode: Last P1 P2 P3 * *
75350 ** If the table or index is empty and P2>0, then jump immediately to P2.
75351 ** If P2 is 0 or if the table or index is not empty, fall through
75377 if( pOp->p2>0 ){
75385 /* Opcode: Sort P1 P2 * * *
75406 /* Opcode: Rewind P1 P2 * * *
75410 ** If the table or index is empty, jump immediately to P2.
75441 assert( pOp->p2>0 && pOp->p2<p->nOp );
75447 /* Opcode: Next P1 P2 P3 P4 P5
75452 ** jump immediately to P2.
75474 /* Opcode: NextIfOpen P1 P2 P3 P4 P5
75479 /* Opcode: Prev P1 P2 P3 P4 P5
75484 ** jump immediately to P2.
75505 /* Opcode: PrevIfOpen P1 P2 P3 P4 P5
75565 /* Opcode: IdxInsert P1 P2 P3 * P5
75566 ** Synopsis: key=r[P2]
75568 ** Register P2 holds an SQL index key made using the
75597 pIn2 = &aMem[pOp->p2];
75620 /* Opcode: IdxDelete P1 P2 P3 * *
75621 ** Synopsis: key=r[P2@P3]
75623 ** The content of P3 registers starting at register P2 form
75634 assert( pOp->p2>0 && pOp->p2+pOp->p3<=(p->nMem-p->nCursor)+1 );
75644 r.aMem = &aMem[pOp->p2];
75657 /* Opcode: IdxRowid P1 P2 * * *
75658 ** Synopsis: r[P2]=rowid
75660 ** Write into register P2 an integer which is the last entry in the record at
75700 /* Opcode: IdxGE P1 P2 P3 P4 P5
75709 ** then jump to P2. Otherwise fall through to the next instruction.
75711 /* Opcode: IdxGT P1 P2 P3 P4 P5
75720 ** then jump to P2. Otherwise fall through to the next instruction.
75722 /* Opcode: IdxLT P1 P2 P3 P4 P5
75730 ** If the P1 index entry is less than the key value then jump to P2.
75733 /* Opcode: IdxLE P1 P2 P3 P4 P5
75742 ** to P2. Otherwise fall through to the next instruction.
75788 /* Opcode: Destroy P1 P2 P3 * *
75801 ** is stored in register P2. If no page
75803 ** the last one in the database) then a zero is stored in register P2.
75804 ** If AUTOVACUUM is disabled then a zero is stored in register P2.
75837 /* Opcode: Clear P1 P2 P3
75843 ** The table being clear is in the main database file if P2==0. If
75844 ** P2==1 then the table to be clear is in the auxiliary database file
75860 assert( DbMaskTest(p->btreeMask, pOp->p2) );
75862 db->aDb[pOp->p2].pBt, pOp->p1, (pOp->p3 ? &nChange : 0)
75898 /* Opcode: CreateTable P1 P2 * * *
75899 ** Synopsis: r[P2]=root iDb=P1
75904 ** register P2
75912 /* Opcode: CreateIndex P1 P2 * * *
75913 ** Synopsis: r[P2]=root iDb=P1
75918 ** register P2.
76056 /* Opcode: IntegrityCk P1 P2 P3 * P5
76068 ** stored in reg(P1), reg(P1+1), reg(P1+2), .... There are P2 tables
76085 nRoot = pOp->p2;
76118 /* Opcode: RowSetAdd P1 P2 * * *
76119 ** Synopsis: rowset(P1)=r[P2]
76121 ** Insert the integer value held by register P2 into a boolean index
76124 ** An assertion fails if P2 is not an integer.
76128 pIn2 = &aMem[pOp->p2];
76138 /* Opcode: RowSetRead P1 P2 P3 * *
76143 ** unchanged and jump to instruction P2.
76164 /* Opcode: RowSetTest P1 P2 P3 P4
76165 ** Synopsis: if r[P3] in rowset(P1) goto P2
76169 ** the value held in P3, jump to register P2. Otherwise, insert the
76221 /* Opcode: Program P1 P2 P3 P4 P5
76226 ** cell in an array of values used as arguments to the sub-program. P2
76349 /* Opcode: Param P1 P2 * * *
76353 ** cell of the calling (parent) frame to cell P2 in the current frames
76374 /* Opcode: FkCounter P1 P2 * * *
76375 ** Synopsis: fkctr[P1]+=P2
76377 ** Increment a "constraint counter" by P2 (P2 may be negative or positive).
76384 db->nDeferredImmCons += pOp->p2;
76386 db->nDeferredCons += pOp->p2;
76388 p->nFkConstraint += pOp->p2;
76393 /* Opcode: FkIfZero P1 P2 * * *
76394 ** Synopsis: if fkctr[P1]==0 goto P2
76397 ** If so, jump to instruction P2. Otherwise, fall through to the next
76418 /* Opcode: MemMax P1 P2 * * *
76419 ** Synopsis: r[P1]=max(r[P1],r[P2])
76424 ** its current value and the value in register P2.
76439 pIn2 = &aMem[pOp->p2];
76448 /* Opcode: IfPos P1 P2 * * *
76449 ** Synopsis: if r[P1]>0 goto P2
76452 ** If the value of register P1 is 1 or greater, jump to P2 and
76466 /* Opcode: IfNeg P1 P2 P3 * *
76467 ** Synopsis: r[P1]+=P3, if r[P1]<0 goto P2
76470 ** register P1 then if the value of register P1 is less than zero, jump to P2.
76481 /* Opcode: IfNotZero P1 P2 P3 * *
76482 ** Synopsis: if r[P1]!=0 then r[P1]+=P3, goto P2
76485 ** initially nonzero, then add P3 to P1 and jump to P2. If register P1 is
76499 /* Opcode: DecrJumpZero P1 P2 * * *
76500 ** Synopsis: if (--r[P1])==0 goto P2
76503 ** then jump to P2 if the new value is exactly zero.
76515 /* Opcode: JumpZeroIncr P1 P2 * * *
76516 ** Synopsis: if (r[P1]++)==0 ) goto P2
76519 ** zero, then jump to P2. Increment register P1 regardless of whether or
76530 /* Opcode: AggStep * P2 P3 P4 P5
76531 ** Synopsis: accum=r[P3] step(r[P2@P5])
76538 ** The P5 arguments are taken from register P2 and its
76552 pRec = &aMem[pOp->p2];
76584 /* Opcode: AggFinal P1 P2 * P4 *
76585 ** Synopsis: accum=r[P1] N=P2
76590 ** P2 is the number of arguments that the step function takes and
76591 ** P4 is a pointer to the FuncDef for this function. The P2
76615 /* Opcode: Checkpoint P1 P2 P3 * *
76618 ** WAL mode. Parameter P2 is one of SQLITE_CHECKPOINT_PASSIVE, FULL,
76634 assert( pOp->p2==SQLITE_CHECKPOINT_PASSIVE
76635 || pOp->p2==SQLITE_CHECKPOINT_FULL
76636 || pOp->p2==SQLITE_CHECKPOINT_RESTART
76637 || pOp->p2==SQLITE_CHECKPOINT_TRUNCATE
76639 rc = sqlite3Checkpoint(db, pOp->p1, pOp->p2, &aRes[1], &aRes[2]);
76652 /* Opcode: JournalMode P1 P2 P3 * *
76661 ** Write a string containing the final journal-mode to register P2.
76772 /* Opcode: IncrVacuum P1 P2 * * *
76776 ** P2. Otherwise, fall through to the next instruction.
76815 /* Opcode: TableLock P1 P2 P3 P4 *
76816 ** Synopsis: iDb=P1 root=P2 write=P3
76825 ** P2 contains the root-page of the table to lock.
76837 rc = sqlite3BtreeLockTable(db->aDb[p1].pBt, pOp->p2, isWriteLock);
76867 /* Opcode: VCreate P1 P2 * * *
76869 ** P2 is a register that holds the name of a virtual table in database
76878 /* Because P2 is always a static string, it is impossible for the
76880 assert( (aMem[pOp->p2].flags & MEM_Str)!=0 );
76881 assert( (aMem[pOp->p2].flags & MEM_Static)!=0 );
76882 rc = sqlite3VdbeMemCopy(&sMem, &aMem[pOp->p2]);
76952 /* Opcode: VFilter P1 P2 P3 P4 *
76955 ** P1 is a cursor opened using VOpen. P2 is an address to jump to if
76969 ** A jump is made to P2 if the result set after filtering would be empty.
77018 /* Opcode: VColumn P1 P2 P3 * *
77019 ** Synopsis: r[P3]=vcolumn(P2)
77021 ** Store the value of the P2-th column of
77046 rc = pModule->xColumn(pCur->pVtabCursor, &sContext, pOp->p2);
77063 /* Opcode: VNext P1 P2 * * *
77066 ** jump to instruction P2. Or, if the virtual table has reached
77098 /* If there is data, jump to P2 */
77137 /* Opcode: VUpdate P1 P2 P3 P4 P5
77138 ** Synopsis: data=r[P3@P2]
77141 ** This opcode invokes the corresponding xUpdate method. P2 values
77143 ** invocation. The value in register (P3+P2-1) corresponds to the
77154 ** If P2==1 then no insert is performed. argv[0] is the rowid of
77173 assert( pOp->p2==1 || pOp->p5==OE_Fail || pOp->p5==OE_Rollback
77183 nArg = pOp->p2;
77218 /* Opcode: Pagecount P1 P2 * * *
77220 ** Write the current number of pages in database P1 to memory cell P2.
77231 /* Opcode: MaxPgcnt P1 P2 P3 * *
77237 ** Store the maximum page count after the change in register P2.
77256 /* Opcode: Init * P2 * P4 *
77257 ** Synopsis: Start at P2
77266 ** If P2 is not zero, jump to instruction P2.
77299 if( pOp->p2 ) goto jump_to_p2;
77348 registerTrace(pOrigOp->p2, &aMem[pOrigOp->p2]);
77712 /* Remove either the OP_OpenWrite or OpenRead. Set the P2
78708 const u8 * const p2 = (const u8 * const)pKey2;
78710 const u8 * const v2 = &p2[ p2[0] ]; /* Pointer to value 2 */
78717 getVarint32(&p2[1], n2); n2 = (n2 - 13) / 2;
78749 const u8 * const p2 = (const u8 * const)pKey2;
78751 const int s2 = p2[1]; /* Right hand serial type */
78753 const u8 * const v2 = &p2[ p2[0] ]; /* Pointer to value 2 */
79231 ** Merge the two sorted lists p1 and p2 into a single list.
79237 SorterRecord *p2, /* Second list to merge */
79244 while( p1 && p2 ){
79247 pTask, &bCached, SRVAL(p1), p1->nVal, SRVAL(p2), p2->nVal
79255 *pp = p2;
79256 pp = &p2->u.pNext;
79257 p2 = p2->u.pNext;
79261 *pp = p1 ? p1 : p2;
79915 PmaReader *p2;
79928 p2 = &pMerger->aReadr[i2];
79932 }else if( p2->pFd==0 ){
79940 pTask, &bCached, p1->aKey, p1->nKey, p2->aKey, p2->nKey
86417 && pOp->p2+pOp->p3+1==target+i
90993 DbMaskTest(pParse->writeMask,iDb), /* P2 */
96676 ** substr(x,p1,p2) returns p2 characters of x[] beginning with p1.
96683 ** If p2 is negative, return the p2 characters preceding p1.
96694 i64 p1, p2;
96729 p2 = sqlite3_value_int(argv[2]);
96730 if( p2<0 ){
96731 p2 = -p2;
96735 p2 = sqlite3_context_db_handle(context)->aLimit[SQLITE_LIMIT_LENGTH];
96740 p2 += p1;
96741 if( p2<0 ) p2 = 0;
96746 }else if( p2>0 ){
96747 p2--;
96750 p1 -= p2;
96752 p2 += p1;
96756 assert( p1>=0 && p2>=0 );
96762 for(z2=z; *z2 && p2; p2--){
96768 if( p1+p2>len ){
96769 p2 = len-p1;
96770 if( p2<0 ) p2 = 0;
96772 sqlite3_result_blob64(context, (char*)&z[p1], (u64)p2, SQLITE_TRANSIENT);
99798 int tnum = pOp->p2;
100511 pOp->p2 = regRowid;
106223 "addr", "opcode", "p1", "p2", "p3", "p4", "p5", "comment",
107008 pOp->p2 = nKey + nData;
107212 pOp->p2 = regPrev;
115797 int p1, p2; /* Operands of the opcode used to ends the loop */
118473 sqlite3_value *p2 = 0; /* Value extracted from pUpper */
118482 rc = sqlite3Stat4ValueFromExpr(pParse, pUpper->pExpr->pRight, aff, &p2);
118483 nUpper = p2 ? 0 : p->nSample;
118486 if( p1 || p2 ){
118495 if( rc==SQLITE_OK && p2 ){
118496 int res = sqlite3MemCompare(p2, pVal, pColl);
118521 sqlite3ValueFree(p2);
119481 pLevel->p2 = sqlite3VdbeAddOp2(v, OP_Yield, regYield, addrBrk);
119524 pLevel->p2 = sqlite3VdbeCurrentAddr(v);
119632 pLevel->p2 = start;
119870 pLevel->p2 = sqlite3VdbeCurrentAddr(v);
120223 pLevel->p2 = 1 + sqlite3VdbeAddOp2(v, aStart[bRev], iCur, addrBrk);
123063 sqlite3VdbeAddOp3(v, pLevel->op, pLevel->p1, pLevel->p2, pLevel->p3);
123148 pOp->p1 = pOp->p2 + pTabItem->regResult;
123149 pOp->p2 = pOp->p3;
123204 int x = pOp->p2;
123212 pOp->p2 = x;
131833 sqlite3 *p2;
131839 for(p2=sqlite3BlockedList; p2!=p; p2=p2->pNextBlocked){
131840 if( p2->xUnlockNotify==p->xUnlockNotify ) seen = 1;
131841 assert( p2->xUnlockNotify==p->xUnlockNotify || !seen );
135083 char *p2 = *pp2;
135085 while( *p1 || *p2 ){
135093 if( *p2==POS_COLUMN ) fts3GetVarint32(&p2[1], &iCol2);
135094 else if( *p2==POS_END ) iCol2 = POSITION_LIST_END;
135103 p2 += n;
135105 /* At this point, both p1 and p2 point to the start of column-lists
135115 fts3GetDeltaVarint(&p2, &i2);
135121 fts3ReadNextPos(&p2, &i2);
135125 fts3ReadNextPos(&p2, &i2);
135132 p2 += fts3PutColNumber(&p, iCol2);
135133 fts3ColumnlistCopy(&p, &p2);
135140 *pp2 = p2 + 1;
135176 char *p2 = *pp2;
135183 assert( p!=0 && *p1!=0 && *p2!=0 );
135188 if( *p2==POS_COLUMN ){
135189 p2++;
135190 p2 += fts3GetVarint32(p2, &iCol2);
135206 assert( *p2!=POS_END && *p2!=POS_COLUMN );
135208 fts3GetDeltaVarint(&p2, &iPos2); iPos2 -= 2;
135221 if( (*p2&0xFE)==0 ) break;
135222 fts3GetDeltaVarint(&p2, &iPos2); iPos2 -= 2;
135235 fts3ColumnlistCopy(0, &p2);
135236 assert( (*p1&0xFE)==0 && (*p2&0xFE)==0 );
135237 if( 0==*p1 || 0==*p2 ) break;
135241 p2++;
135242 p2 += fts3GetVarint32(p2, &iCol2);
135245 /* Advance pointer p1 or p2 (whichever corresponds to the smaller of
135256 fts3ColumnlistCopy(0, &p2);
135257 if( 0==*p2 ) break;
135258 p2++;
135259 p2 += fts3GetVarint32(p2, &iCol2);
135263 fts3PoslistCopy(0, &p2);
135266 *pp2 = p2;
135299 char *p2 = *pp2;
135309 *pp2 = p2;
135440 char *p2 = a2;
135482 fts3GetDeltaVarint3(&p2, pEnd2, 0, &i2);
135483 while( p1 || p2 ){
135486 if( p2 && p1 && iDiff==0 ){
135488 fts3PoslistMerge(&p, &p1, &p2);
135490 fts3GetDeltaVarint3(&p2, pEnd2, bDescDoclist, &i2);
135491 }else if( !p2 || (p1 && iDiff<0) ){
135497 fts3PoslistCopy(&p, &p2);
135498 fts3GetDeltaVarint3(&p2, pEnd2, bDescDoclist, &i2);
135533 char *p2 = aRight;
135548 fts3GetDeltaVarint3(&p2, pEnd2, 0, &i2);
135550 while( p1 && p2 ){
135558 if( 0==fts3PoslistPhraseMerge(&p, nDist, 0, 1, &p1, &p2) ){
135564 fts3GetDeltaVarint3(&p2, pEnd2, bDescDoclist, &i2);
135569 fts3PoslistCopy(0, &p2);
135570 fts3GetDeltaVarint3(&p2, pEnd2, bDescDoclist, &i2);
137132 char *p2 = aOut;
137135 fts3PoslistPhraseMerge(&aOut, iToken-iPrev, 0, 1, &p1, &p2);
137160 char *p2;
137165 p2 = pPhrase->doclist.pList;
137169 p2 = aPoslist;
137180 if( fts3PoslistPhraseMerge(&aOut, nDistance, 0, 1, &p1, &p2) ){
138009 char *p2;
138015 p2 = pOut = pPhrase->doclist.pList;
138017 &pOut, aTmp, nParam1, nParam2, paPoslist, &p2
142178 const sqlite3_tokenizer_module *p2;
142186 rc = queryTokenizer(db, "simple", &p2);
142188 assert( p1==p2 );
142189 rc = queryTokenizer(db, "nosuchtokenizer", &p2);
142191 assert( p2==0 );
142197 rc = queryTokenizer(db, "nosuchtokenizer", &p2);
142199 assert( p2==p1 );
152733 ** Store the union of cells p1 and p2 in p1.
152735 static void cellUnion(Rtree *pRtree, RtreeCell *p1, RtreeCell *p2){
152739 p2->aCoord[ii].f);
152740 p1->aCoord[ii+1].f = MAX(p1->aCoord[ii+1].f, p2->aCoord[ii+1].f);
152744 p1->aCoord[ii].i = MIN(p1->aCoord[ii].i, p2->aCoord[ii].i);
152745 p1->aCoord[ii+1].i = MAX(p1->aCoord[ii+1].i, p2->aCoord[ii+1].i);
152751 ** Return true if the area covered by p2 is a subset of the area covered
152754 static int cellContains(Rtree *pRtree, RtreeCell *p1, RtreeCell *p2){
152759 RtreeCoord *a2 = &p2->aCoord[ii];