Lines Matching defs:opcode

767 #define SQLITE_NOTFOUND    12   /* Unknown opcode in sqlite3_file_control() */
1087 ** integer opcode. The third argument is a generic pointer intended to
1171 ** KEYWORDS: {file control opcodes} {file control opcode}
1179 ** The [SQLITE_FCNTL_LOCKSTATE] opcode is used for debugging. This
1180 ** opcode causes the xFileControl method to write the current state of
1187 ** The [SQLITE_FCNTL_SIZE_HINT] opcode is used by SQLite to give the VFS
1195 ** The [SQLITE_FCNTL_SIZE_LIMIT] opcode is used by in-memory VFS that
1204 ** The [SQLITE_FCNTL_CHUNK_SIZE] opcode is used to request that the VFS
1213 ** The [SQLITE_FCNTL_FILE_POINTER] opcode is used to obtain a pointer
1218 ** The [SQLITE_FCNTL_JOURNAL_POINTER] opcode is used to obtain a pointer
1227 ** The [SQLITE_FCNTL_SYNC] opcode is generated internally by SQLite and
1236 ** do not need this signal should silently ignore this opcode. Applications
1237 ** should not call [sqlite3_file_control()] with this opcode as doing so may
1241 ** The [SQLITE_FCNTL_COMMIT_PHASETWO] opcode is generated internally by SQLite
1244 ** should silently ignore this opcode. Applications should not call
1245 ** [sqlite3_file_control()] with this opcode as doing so may disrupt the
1249 ** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic
1256 ** opcode allows these two values (10 retries and 25 milliseconds of delay)
1266 ** ^The [SQLITE_FCNTL_PERSIST_WAL] opcode is used to set or query the
1276 ** [sqlite3_file_control()] for this opcode should be a pointer to an integer.
1282 ** ^The [SQLITE_FCNTL_POWERSAFE_OVERWRITE] opcode is used to set or query the
1286 ** [sqlite3_file_control()] for this opcode should be a pointer to an integer.
1292 ** ^The [SQLITE_FCNTL_OVERWRITE] opcode is invoked by SQLite after opening
1298 ** ^The [SQLITE_FCNTL_VFSNAME] opcode can be used to obtain the names of
1310 ** ^The [SQLITE_FCNTL_VFS_POINTER] opcode finds a pointer to the top-level
1315 ** ^When there are multiple VFS shims in the stack, this opcode finds the
1389 ** The [SQLITE_FCNTL_WIN32_GET_HANDLE] opcode can be used to obtain the
1395 ** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This
1396 ** opcode causes the xFileControl method to swap the file handle with the one
1408 ** The [SQLITE_FCNTL_ZIPVFS] opcode is implemented by zipvfs only. All other
1409 ** VFS should return SQLITE_NOTFOUND for this opcode.
1412 ** The [SQLITE_FCNTL_RBU] opcode is implemented by the special VFS used by
1414 ** this opcode.
1417 ** If the [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] opcode returns SQLITE_OK, then
1430 ** The [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE] opcode causes all write
1442 ** The [SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE] opcode causes all write
1451 ** The [SQLITE_FCNTL_LOCK_TIMEOUT] opcode is used to configure a VFS
1459 ** The [SQLITE_FCNTL_DATA_VERSION] opcode is used to detect changes to
1479 ** The [SQLITE_FCNTL_CKPT_START] opcode is invoked from within a checkpoint
1484 ** The [SQLITE_FCNTL_CKPT_DONE] opcode is invoked from within a checkpoint
1491 ** The EXPERIMENTAL [SQLITE_FCNTL_EXTERNAL_READER] opcode is used to detect
1499 ** other process. This opcode cannot be used to detect transactions opened
8355 ** the main database. The [SQLITE_FCNTL_VFS_POINTER] opcode returns
8971 ** is ignored when the opcode is SQLITE_STMTSTATUS_MEMUSED.
15878 ** A single instruction of the virtual machine has an opcode
15883 u8 opcode; /* What operation to perform */
15916 u32 iSrcLine; /* Source-code line that generated this opcode
15941 u8 opcode; /* What operation to perform */
16005 ** header file that defines a number for each opcode used by the VDBE.
16200 ** comments following the "case" for each opcode in the vdbe.c
16236 ** the value of the largest JUMP opcode. The smaller the maximum
16237 ** JUMP opcode the better, so the mkopcodeh.tcl script that
16241 #define SQLITE_MX_JUMP_OPCODE 64 /* Maximum JUMP opcode */
16376 ** each VDBE opcode.
17561 ** opcode. The storage column index is less than
17994 ** the OP_MakeRecord opcode of the VDBE and is disassembled by the
17995 ** OP_Column opcode.
18245 ** Expr.op is the opcode. The integer parser token codes are reused
18391 #define EP_IfNullRow 0x040000 /* The TK_IF_NULL_ROW opcode */
18861 #define SF_UsesEphemeral 0x0000020 /* Uses the OpenEphemeral opcode */
18906 ** opcode) for each row in the result set.
19194 int addrExplain; /* Address of current OP_Explain opcode */
21052 ** It uses the RDTSC opcode to read the cycle count value out of the
22054 ** consulting sqlite3aLTb[opcode], sqlite3aEQb[opcode], or
22055 ** sqlite3aGTb[opcode] depending on whether the result of compare(A,B)
22056 ** is negative, zero, or positive, where opcode is the specific opcode.
22758 int iAuxOp; /* Instruction number of OP_Function opcode */
22848 Mem *aVar; /* Values for the OP_Variable opcode. */
32100 /* If the opcode is TK_TRIGGER, then the expression is a reference
52507 ** by 0, 1, or 3 operands, depending on the opcode. Another
52508 ** opcode follows immediately after the last operand.
52511 ** "halt" opcode and causes the test to end.
62910 /* This routine is only called from the OP_JournalMode opcode, and
69427 ** such as is generated by the OP_MakeRecord opcode. Unpack the
74667 ** opcode, and it that case the cursor will always be valid and
82737 ** fire after each opcode is inserted and displayed using
82761 ** op The opcode for this instruction
82789 pOp->opcode = (u8)op;
82869 ** Add an opcode that includes the p4 value as a pointer.
82872 Vdbe *p, /* Add the opcode to this VM */
82873 int op, /* The new opcode */
82886 ** Add an OP_Function or OP_PureFunc opcode.
82930 ** Add an opcode that includes the p4 value with a P4_INT64 or
82934 Vdbe *p, /* Add the opcode to this VM */
82935 int op, /* The new opcode */
82971 ** Add a new OP_Explain opcode.
82973 ** If the bPush flag is true, then make this opcode the parent for
83011 ** Add an OP_ParseSchema opcode. This routine is broken out from
83027 ** Add an opcode that includes the p4 value as an integer.
83030 Vdbe *p, /* Add the opcode to this VM */
83031 int op, /* The new opcode */
83142 if( ALWAYS(p->aOp[i].opcode==OP_Expire) ){
83143 p->aOp[1].opcode = OP_Noop;
83256 int opcode = pOp->opcode;
83257 if( opcode==OP_Destroy || opcode==OP_VUpdate || opcode==OP_VRename
83258 || opcode==OP_VDestroy
83259 || opcode==OP_VCreate
83260 || opcode==OP_ParseSchema
83261 || opcode==OP_Function || opcode==OP_PureFunc
83262 || ((opcode==OP_Halt || opcode==OP_HaltIfNull)
83268 if( opcode==OP_CreateBtree && pOp->p3==BTREE_INTKEY ) hasCreateTable = 1;
83274 if( opcode==OP_CreateBtree && pOp->p3==BTREE_BLOBKEY ) hasCreateIndex = 1;
83275 if( opcode==OP_Clear ) hasCreateIndex = 1;
83277 if( opcode==OP_InitCoroutine ) hasInitCoroutine = 1;
83279 if( opcode==OP_FkCounter && pOp->p1==0 && pOp->p2==1 ){
83352 assert( p->aOp[0].opcode==OP_Init );
83353 while( 1 /* Loop termates when it reaches the OP_Init opcode */ ){
83356 ** all these opcodes together near the front of the opcode list. Skip
83357 ** any opcode that does not need processing by virtual of the fact that
83360 if( pOp->opcode<=SQLITE_MX_JUMP_OPCODE ){
83363 switch( pOp->opcode ){
83394 assert( pOp[-1].opcode==OP_Integer );
83406 assert( (sqlite3OpcodeProperty[pOp->opcode] & OPFLG_JUMP)!=0 );
83416 assert( (sqlite3OpcodeProperty[pOp->opcode]&OPFLG_JUMP)==0 || pOp->p2>=0);
83448 ** to detect invalid escapes out of a subroutine. The OP_Halt opcode
83454 int iFirst, /* First opcode of the subroutine */
83455 int iLast, /* Last opcode of the subroutine */
83470 if( (sqlite3OpcodeProperty[pOp->opcode] & OPFLG_JUMP)!=0 ){
83473 if( pOp->opcode==OP_Gosub ) continue;
83486 if( pX->opcode==OP_Return ){
83490 if( pX->opcode==OP_Noop ) continue;
83491 if( pX->opcode==OP_Explain ) continue;
83524 ** Verify that at least N opcode slots are available in p without
83539 ** an OP_ResultRow opcode. Fail an assert() if it does. This is used
83548 assert( p->aOp[i].opcode!=OP_ResultRow );
83554 ** Generate code (a single OP_Abortable opcode) that will
83599 int iLineno /* Source-file line number of first opcode */
83610 pOut->opcode = aOp->opcode;
83614 if( (sqlite3OpcodeProperty[aOp->opcode] & OPFLG_JUMP)!=0 && aOp->p2>0 ){
83668 ** Change the value of the opcode, or P1, P2, P3, or P5 operands
83673 sqlite3VdbeGetOp(p,addr)->opcode = iNewOpcode;
83693 ** If the previous opcode is an OP_Column that delivers results
83695 ** opcode.
83699 if( pOp->p3==iDest && pOp->opcode==OP_Column ){
83714 ** the jump lands on the next opcode. Or if the jump instruction was
83715 ** the previous opcode (and is thus a no-op) then simply back up
83717 ** overwritten by the next inserted opcode.
83727 assert( p->aOp[addr].opcode==OP_Once
83728 || p->aOp[addr].opcode==OP_If
83729 || p->aOp[addr].opcode==OP_FkIfZero );
83847 ** Change the opcode at addr into OP_Noop
83857 pOp->opcode = OP_Noop;
83862 ** If the last opcode is "op" and it is not a jump destination,
83863 ** then remove it. Return true if and only if an opcode was removed.
83866 if( p->nOp>0 && p->aOp[p->nOp-1].opcode==op ){
83875 ** Generate an OP_ReleaseReg opcode to indicate that a range of
84004 ** Set the P4 on the most recently added opcode to the KeyInfo for the
84061 ** Return the opcode for a given address. The address must be non-negative.
84062 ** See sqlite3VdbeGetLastOp() to get the most recently added opcode.
84065 ** routine, then a pointer to a dummy VdbeOp will be returned. That opcode
84067 ** The return of a dummy opcode allows the call to continue functioning
84069 ** this routine is a valid pointer. But because the dummy.opcode is 0,
84086 /* Return the most recently added opcode
84094 ** Return an integer value for one of the parameters to the opcode pOp
84106 ** Compute a string for the "comment" field of a VDBE opcode listing.
84110 ** absence of other comments, this synopsis becomes the comment on the opcode.
84120 const Op *pOp, /* The opcode to be commented */
84131 zOpName = sqlite3OpcodeName(pOp->opcode);
84205 ** Translate the P4.pExpr value for an OP_CursorHint opcode into text
84280 ** Compute a string that describes the P4 parameter for an opcode.
84478 ** Print a single opcode. This routine is used for debugging only.
84498 sqlite3OpcodeName(pOp->opcode), pOp->p1, pOp->p2, pOp->p3,
84622 ** Locate the next opcode to be displayed in EXPLAIN or EXPLAIN
84634 Op **paOp /* OUT: Write the opcode array here */
84677 ** pick up the appropriate opcode. */
84689 /* When an OP_Program opcode is encounter (the only opcode that has
84717 if( pOp->opcode==OP_OpenRead ) break;
84718 if( pOp->opcode==OP_OpenWrite && (pOp->p5 & OPFLAG_P2ISREG)==0 ) break;
84719 if( pOp->opcode==OP_ReopenIdx ) break;
84724 if( aOp[i].opcode==OP_Explain ) break;
84725 if( aOp[i].opcode==OP_Init && iPc>1 ) break;
84738 ** allocated by the OP_Program opcode in sqlite3VdbeExec().
84782 Op *pOp; /* Current opcode */
84788 /* Even though this opcode does not use dynamic strings for
84813 /* Figure out which opcode is next to display */
84832 sqlite3VdbeMemSetStr(pMem+1, (char*)sqlite3OpcodeName(pOp->opcode),
84874 if( pOp->opcode==OP_Init && pOp->p4.z!=0 ){
84893 if( pOp->opcode==OP_Init && pOp->p4.z!=0 ){
84934 ** opcode array of prepared state for other memory needs of the prepared
84969 /* There should be at least one opcode.
85049 ** opcode array. This extra memory will be reallocated for other elements
85052 n = ROUND8P(sizeof(Op)*p->nOp); /* Bytes of opcode memory used */
85053 x.pSpace = &((u8*)p->aOp)[n]; /* Unused opcode memory */
85063 "addr", "opcode", "p1", "p2", "p3", "p4", "p5", "comment",
85087 ** end of the opcode array. If we are unable to satisfy all memory
85088 ** requirements by reusing the opcode array tail, then the second
85092 ** the leftover memory at the end of the opcode array. This can significantly
86007 fprintf(out, "%02x", p->aOp[i].opcode);
86061 ** function invoked by the OP_Function opcode at instruction iOp of
86256 #if 0 /* Inlined into the OP_MakeRecord opcode */
86263 ** opcode in the byte-code engine. But by moving this routine in-line, we
86264 ** can omit some redundant tests and make that opcode a lot faster. So
86850 ** by the OP_MakeRecord opcode, and such Blobs never get passed into
87047 ** created by the OP_MakeRecord opcode of the VDBE. The pPKey2
87502 ** pCur points at an index entry created using the OP_MakeRecord opcode.
87731 if( pOp->opcode==OP_PureFunc ){
90143 ** statement for the corresponding OP_Variable opcode. Once the host
90333 ** The next global variable is incremented each type the OP_Sort opcode
90345 ** or MEM_Str that has been used by a VDBE opcode. The test procedures
90370 ** The next global variable is incremented each time the OP_Found opcode
90393 ** each opcode is printed. Variables "pc" (program counter) and pOp are
90439 ** Bit 0x08 of the flags indicates an OP_Jump opcode that is only
90503 /* Return true if the cursor was opened using the OP_OpenSorter opcode. */
91065 u64 start; /* CPU clock count at start of opcode */
91111 if( aOp[i].opcode==OP_Explain ){
91161 u8 opProperty = sqlite3OpcodeProperty[pOp->opcode];
91199 switch( pOp->opcode ){
91214 ** opcode and the opcodes.c file is filled with an array of strings where
91215 ** each string is the symbolic name for the corresponding opcode. If the
91217 ** that comment is used to determine the particular value of the opcode.
91226 ** comment lines are used in the generation of the opcode.html documentation
91243 ** The P1 parameter is not actually used by this opcode. However, it
91258 assert( pOp[1].opcode==OP_ReleaseReg );
91274 ** checks on every opcode. This helps sqlite3_step() to run about 1.5%
91321 ** values, otherwise execution falls through to the next opcode, and the
91324 ** this opcode is used in combination with OP_BeginSubrtn, and set to 0
91327 ** The value in register P1 is unchanged by this opcode.
91331 ** formatter in the CLI will indent all opcodes from the P2 opcode up
91332 ** to be not including the current Return. P2 should be the first opcode
91333 ** in the subroutine from which this opcode is returning. Thus the P2
91354 ** this opcode. So jump over the coroutine implementation to
91392 assert( pCaller->opcode==OP_Yield );
91581 ** P4 points to a nul terminated UTF-8 string. This opcode is transformed
91582 ** into a String opcode before it is executed for the first time. During
91612 pOp->opcode = OP_String;
91655 ** is the same as the P2 operand to this opcode and that has P3 set to 1.
91663 ** the OP_Return opcode has a P3 value of 1). Thus if the subroutine is
91668 ** This opcode is identical to OP_Null. It has a different name
91820 ** destination. The 0x0001 bit of P5 indicates that this Copy opcode cannot
91900 ** exits. This opcode is used to raise foreign key constraint errors prior
91915 ** results. This opcode causes the sqlite3_step() call to terminate
92120 switch( pOp->opcode ){
92148 switch( pOp->opcode ){
92197 ** to retrieve the collation sequence set by this opcode is not available
92256 op = pOp->opcode;
92337 ** This opcode is used when extracting information from a column that
92400 ** back into the input registers P1 and P3. So this opcode can cause
92419 ** This opcode saves the result of comparison for use by the new
92420 ** OP_Jump opcode.
92425 ** This works just like the Eq opcode except that the jump is taken if
92426 ** the operands in registers P1 and P3 are not equal. See the Eq opcode for
92444 ** back into the input registers P1 and P3. So this opcode can cause
92457 ** This opcode saves the result of comparison for use by the new
92458 ** OP_Jump opcode.
92463 ** This works just like the Lt opcode except that the jump is taken if
92465 ** register P1. See the Lt opcode for additional information.
92470 ** This works just like the Lt opcode except that the jump is taken if
92472 ** register P1. See the Lt opcode for additional information.
92477 ** This works just like the Lt opcode except that the jump is taken if
92479 ** register P1. See the Lt opcode for additional information.
92500 if( sqlite3aGTb[pOp->opcode] ){
92506 if( sqlite3aLTb[pOp->opcode] ){
92512 if( sqlite3aEQb[pOp->opcode] ){
92597 res2 = sqlite3aLTb[pOp->opcode];
92599 res2 = sqlite3aEQb[pOp->opcode];
92601 res2 = sqlite3aGTb[pOp->opcode];
92620 ** This opcode must follow an OP_Lt or OP_Gt comparison operator. There
92633 /* Verify the preconditions of this opcode - that it follows an OP_Lt or
92637 if( aOp[iAddr].opcode==OP_ReleaseReg ) continue;
92638 assert( aOp[iAddr].opcode==OP_Lt || aOp[iAddr].opcode==OP_Gt );
92653 ** The permutation is only valid for the next opcode which must be
92662 assert( pOp[1].opcode==OP_Compare );
92687 ** This opcode must be immediately followed by an OP_Jump opcode.
92704 assert( pOp[-1].opcode==OP_Permutation );
92746 assert( pOp[1].opcode==OP_Jump );
92756 ** This opcode must immediately follow an OP_Compare opcode.
92770 assert( pOp>aOp && pOp[-1].opcode==OP_Compare );
92808 if( pOp->opcode==OP_And ){
92828 ** This opcode implements the IS TRUE, IS FALSE, IS NOT TRUE, and
92892 ** Fall through to the next instruction the first time this opcode is
92897 ** operand against the P1 operand on the OP_Init opcode at the beginning
92899 ** the P1 of this opcode equal to the P1 of OP_Init. If P1 values are
92909 assert( p->aOp[0].opcode==OP_Init );
92979 ** then this opcode might give spurious results.
93097 ** If P1 is not an open cursor, then this opcode is a no-op.
93119 ** This opcode does not use P2 itself, but the P2 value is used by the
93120 ** code generator. The P1, P2, and P3 operands to this opcode are the
93123 ** This opcode is only available if SQLite is compiled with the
93152 ** the MakeRecord instruction. (See the MakeRecord opcode for additional
93465 ** This opcode is similar to OP_Affinity except that this opcode
93614 ** in an index. The OP_Column opcode can decode the record later.
93632 ** OPFLAG_NOCHNG_MAGIC if the OP_MakeRecord opcode is allowed to
94248 ** If P5!=0 then this opcode also checks the schema cookie against P3
94399 ** A transaction must be started before executing this opcode.
94469 ** The ReopenIdx opcode works like OP_OpenRead except that it first
94471 ** b-tree and if it is this opcode becomes a no-op. In other words,
94474 ** The ReopenIdx opcode may only be used with P5==0 or P5==OPFLAG_SEEKEQ
94546 assert( pOp->opcode==OP_OpenWrite || pOp->p5==0 || pOp->p5==OPFLAG_SEEKEQ );
94548 assert( pOp->opcode==OP_OpenRead || pOp->opcode==OP_ReopenIdx
94565 if( pOp->opcode==OP_OpenWrite ){
94578 assert( pOp->opcode==OP_OpenWrite );
94584 /* The p2 value always comes from a prior OP_CreateBtree opcode and
94585 ** that opcode will always set the p2 value to 2 or more or else fail.
94633 ** opcode. Only ephemeral cursors may be duplicated.
94660 ** opcode is run, the sqlite3BtreeCursor() cannot fail */
94689 ** that avoids an extra OP_Blob opcode to initialize that register.
94694 ** This opcode works the same as OP_OpenEphemeral. It has a
94696 ** by this opcode will be used for automatically created transient
94716 assert( pOp->opcode==OP_OpenEphemeral );
94777 ** This opcode works like OP_OpenEphemeral except that it opens
94826 ** A pseudo-table created by this opcode is used to hold a single
94828 ** individual columns using the OP_Column opcode. The OP_Column opcode
94829 ** is the only cursor opcode that works with a pseudo-table.
94868 ** This opcode (which only exists if SQLite was compiled with
94898 ** opcode will either land on a record that exactly matches the key, or
94900 ** this opcode must be followed by an IdxLE opcode with the same arguments.
94901 ** The IdxGT opcode will be skipped if this opcode succeeds, but the
94902 ** IdxGT opcode will be used on subsequent loop iterations. The
94906 ** This opcode leaves the cursor configured to move in forward order,
94924 ** This opcode leaves the cursor configured to move in forward order,
94942 ** This opcode leaves the cursor configured to move in reverse order,
94960 ** This opcode leaves the cursor configured to move in reverse order,
94965 ** opcode will either land on a record that exactly matches the key, or
94967 ** this opcode must be followed by an IdxLE opcode with the same arguments.
94968 ** The IdxGE opcode will be skipped if this opcode succeeds, but the
94969 ** IdxGE opcode will be used on subsequent loop iterations. The
94997 oc = pOp->opcode;
95001 pC->seekOp = pOp->opcode;
95071 ** immediately followed by an OP_IdxGT or OP_IdxLT opcode, respectively,
95076 assert( pOp->opcode==OP_SeekGE || pOp->opcode==OP_SeekLE );
95077 assert( pOp[1].opcode==OP_IdxLT || pOp[1].opcode==OP_IdxGT );
95078 assert( pOp->opcode==OP_SeekGE || pOp[1].opcode==OP_IdxLT );
95079 assert( pOp->opcode==OP_SeekLE || pOp[1].opcode==OP_IdxGT );
95169 assert( pOp[1].opcode==OP_IdxLT || pOp[1].opcode==OP_IdxGT );
95179 ** This opcode is a prefix opcode to OP_SeekGE. In other words, this
95180 ** opcode must be immediately followed by OP_SeekGE. This constraint is
95183 ** This opcode uses the P1 through P4 operands of the subsequent
95185 ** OP_SeekGE opcode are denoted as SeekOP.P1 through SeekOP.P4. Only
95186 ** the P1, P2 and P5 operands of this opcode are also used, and are called
95189 ** This opcode helps to optimize IN operators on a multi-column index
95192 ** of the b-tree instead. A correct answer is obtained if this opcode
95200 ** then this opcode is a no-op and control passes through into the OP_SeekGE.
95205 ** currently before the target row, then this opcode attempts to position
95217 ** to setup code prior to the OP_IdxGT or OP_IdxGE opcode that checks for
95220 ** Possible outcomes from this opcode:<ol>
95223 ** fall through into the subsequent OP_SeekGE opcode.
95250 assert( pOp[1].opcode==OP_SeekGE );
95254 ** opcode past the OP_SeekGE itself. */
95262 assert( aOp[pOp->p2-1].opcode==OP_IdxGT
95263 || aOp[pOp->p2-1].opcode==OP_IdxGE );
95264 testcase( aOp[pOp->p2-1].opcode==OP_IdxGE );
95268 assert( aOp[pOp->p2-1].opcode==OP_SeekGE );
95317 /* Jump to This.P2, bypassing the OP_SeekGE opcode */
95361 ** OP_IfNoHope opcode might run to see if the IN loop can be abandoned
95394 ** OP_NullRow opcode, then jump to instruction P2. Otherwise, fall through.
95449 ** In other words, the operands to this opcode are the same as the
95452 ** This opcode is an optimization attempt only. If this opcode always
95463 ** This opcode is used in IN clause processing for a multi-column key.
95470 ** opcode. The opcode name comes from the fact that the
95489 ** This opcode is similar to OP_NotFound with the exceptions that the
95522 if( pOp->opcode!=OP_NoConflict ) sqlite3_found_count++;
95530 pC->seekOp = pOp->opcode;
95552 assert( pOp->opcode!=OP_NoConflict );
95570 if( pOp->opcode==OP_Found ){
95578 if( pOp->opcode==OP_NoConflict ){
95579 /* For the OP_NoConflict opcode, take the jump if any of the
95590 if( pOp->opcode==OP_IfNoHope ){
95608 ** The OP_NotExists opcode performs the same operation, but with OP_NotExists
95610 ** opcode, register P3 might not contain an integer.
95612 ** The OP_NotFound opcode performs the same operation on index btrees
95615 ** This opcode leaves the cursor in a state where it cannot be advanced
95617 ** not work following this opcode.
95631 ** The OP_SeekRowid opcode performs the same operation but also allows the
95633 ** always taken. This opcode requires that P3 always contain an integer.
95635 ** The OP_NotFound opcode performs the same operation on index btrees
95638 ** This opcode leaves the cursor in a state where it cannot be advanced
95640 ** not work following this opcode.
95671 assert( (pIn3->flags & MEM_Int)!=0 || pOp->opcode==OP_SeekRowid );
95678 if( pOp->opcode==OP_SeekRowid ) pC->seekOp = OP_SeekRowid;
95879 ** If the OPFLAG_ISUPDATE flag is set, then this opcode is part of an
95880 ** UPDATE operation. Otherwise (if the flag is clear) then this opcode
95983 ** of table - intkey or index. This opcode is used as part of copying
95988 ** This opcode must be followed by either an Insert or InsertIdx opcode
95995 assert( pOp[1].opcode==OP_Insert || pOp[1].opcode==OP_IdxInsert );
95996 assert( pOp[1].opcode==OP_Insert || pOp->p3==0 );
95997 assert( pOp[1].opcode==OP_IdxInsert || pOp->p3>0 );
96033 ** have been positioned using OP_NotFound prior to invoking this opcode in
96194 ** This opcode is normally use to move a record out of the sorter and into
96197 ** parameter P3. Clearing the P3 column cache as part of this opcode saves
96229 ** If P3!=0 then this opcode is allowed to make an ephemeral pointer
96289 ** be a separate OP_VRowid opcode for use with virtual tables, but this
96290 ** one opcode now works for both table types.
96387 ** This opcode leaves the cursor configured to move in reverse order,
96405 pC->seekOp = pOp->opcode;
96407 if( pOp->opcode==OP_SeekEnd ){
96457 ** identified by P1, invoke this opcode to actually do the sorting.
96460 ** This opcode is an alias for OP_Sort and OP_Rewind that is used
96465 ** This opcode does exactly the same thing as OP_Rewind except that
96470 ** end. We use the OP_Sort opcode instead of OP_Rewind to do the
96493 ** This opcode leaves the cursor configured to move in forward order,
96506 assert( isSorter(pC)==(pOp->opcode==OP_SorterSort) );
96536 ** The Next opcode is only valid following an SeekGT, SeekGE, or
96537 ** OP_Rewind opcode used to position the cursor. Next is not allowed
96541 ** been opened prior to this opcode or the program will segfault.
96561 ** The Prev opcode is only valid following an SeekLT, SeekLE, or
96562 ** OP_Last opcode used to position the cursor. Prev is not allowed
96578 ** This opcode works just like OP_Next except that P1 must be a
96579 ** sorter object for which the OP_SorterSort opcode has been
96580 ** invoked. This opcode advances the cursor to the next sorted
96642 ** MakeRecord instructions. This opcode writes that key
96700 ** MakeRecord instructions. This opcode writes that key
96725 ** an unpacked index key. This opcode removes that entry from the
96774 ** table. This opcode does a deferred seek of the P3 table cursor
96811 assert( !pC->nullRow || pOp->opcode==OP_IdxRowid );
96828 if( pOp->opcode==OP_DeferredSeek ){
96849 assert( pOp->opcode==OP_IdxRowid );
96935 if( pOp->opcode<OP_IdxLT ){
96936 assert( pOp->opcode==OP_IdxLE || pOp->opcode==OP_IdxGT );
96939 assert( pOp->opcode==OP_IdxGE || pOp->opcode==OP_IdxLT );
96978 if( (pOp->opcode&1)==(OP_IdxLT&1) ){
96979 assert( pOp->opcode==OP_IdxLE || pOp->opcode==OP_IdxLT );
96982 assert( pOp->opcode==OP_IdxGE || pOp->opcode==OP_IdxGT );
97009 ** This opcode throws an error if there are any active reader VMs when
97093 ** This opcode only works for cursors used for sorting and
97160 ** This opcode invokes the parser to create a new virtual machine,
97161 ** then runs the new virtual machine. It is thus a re-entrant opcode.
97169 /* Any prepared statement that invokes this opcode will hold mutexes
97215 /* The OP_ParseSchema opcode with a non-NULL P4 argument should parse
97253 ** is dropped from disk (using the Destroy opcode) in order to keep
97267 ** is dropped from disk (using the Destroy opcode)
97281 ** is dropped from disk (using the Destroy opcode) in order to keep
97310 ** This opcode is used to implement the integrity_check pragma.
97403 ** next opcode.
97600 ** This opcode is only ever present in sub-programs called via the
97645 ** This opcode tests if a foreign key constraint-counter is currently zero.
97721 ** This opcode performs a commonly used computation associated with
97723 ** holds the offset counter. The opcode computes the combined value
97841 ** This opcode is initially coded as OP_AggStep0. On first evaluation,
97843 ** the opcode is changed. In this way, the initialization of the
97874 assert( pOp->p1==(pOp->opcode==OP_AggInverse) );
97876 pOp->opcode = OP_AggStep1;
97933 assert( pOp[-1].opcode==OP_CollSeq );
97957 ** argument is not used by this opcode. It is only there to disambiguate
97969 ** argument is not used by this opcode. It is only there to disambiguate
97978 assert( pOp->p3==0 || pOp->opcode==OP_AggValue );
98350 ** P1 is a cursor number. This opcode opens a cursor to the virtual
98428 ** This opcode invokes the xFilter method on the virtual table specified
98489 ** If the VColumn opcode is being used to fetch the value of
98588 ** This opcode invokes the corresponding xRename method. The value
98624 ** This opcode invokes the corresponding xUpdate method. P2 values
98756 ** invocation of this opcode.
98775 ** invocation of this opcode.
98777 ** This opcode works exactly like OP_Function. The only difference is in
98778 ** its name. This opcode is used in places where the function must be
98932 ** Programs contain a single instance of this opcode as the very first
98933 ** opcode.
98966 assert( pOp==p->aOp || pOp->opcode==OP_Trace );
99008 if( pOp->opcode==OP_Trace ) break;
99010 if( p->aOp[i].opcode==OP_Once ) p->aOp[i].p1 = 0;
99046 ** might cause database corruption. This opcode only appears in debugging
99063 ** the registers is unreliable after this opcode completes.
99078 ** P5 ought to be set on every call to this opcode.
99084 ** This opcode is only available in testing and debugging builds. It is
99085 ** not generated for release builds. The purpose of this opcode is to help
99086 ** validate the generated bytecode. This opcode does not actually contribute
99113 ** The magic Explain opcode are only inserted when explain==2 (which
99115 ** This opcode records information from the optimizer. It is the
99119 assert( pOp->opcode==OP_Noop || pOp->opcode==OP_Explain );
99150 u8 opProperty = sqlite3OpcodeProperty[pOrigOp->opcode];
99183 if( aOp[0].opcode==OP_Trace ){
99328 assert( v->aOp[v->pc].opcode==OP_NotExists );
99550 aOp[0].opcode = OP_Noop;
99562 if( wrFlag ) aOp[1].opcode = OP_OpenWrite;
102505 ** This routine forms the core of the OP_SorterCompare opcode, which in
102609 "opcode TEXT,"
102783 case 1: /* opcode */
102784 sqlite3_result_text(ctx, (char*)sqlite3OpcodeName(pOp->opcode),
102815 assert( aOp[0].opcode==OP_Init );
102836 sqlite3_result_int(ctx, pOp->opcode==OP_OpenWrite);
105641 ** set and the opcode is changed from TK_FUNCTION to TK_AGG_FUNCTION.
106131 ** opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2.
106198 int opcode, /* The comparison opcode */
106215 addr = sqlite3VdbeAddOp4(pParse->pVdbe, opcode, in2, dest, in1,
106653 int op, /* Expression opcode */
106701 int op, /* Expression opcode */
106759 int op, /* Expression opcode */
109039 assert( sqlite3VdbeGetOp(v,pExpr->y.sub.iAddr-1)->opcode==OP_BeginSubrtn
109170 assert( sqlite3VdbeGetOp(v,pExpr->y.sub.iAddr-1)->opcode==OP_BeginSubrtn
109247 int addrTruthOp; /* Address of opcode that determines the IN is true */
109395 ** into a single opcode. */
109402 /* Combine Step 3 and Step 5 into a single opcode */
109661 if( pOp->opcode==OP_Column ) pOp->p5 = p5;
109725 ** If the last opcode is a OP_Copy, then set the do-not-merge flag (p5)
109729 if( sqlite3VdbeGetLastOp(v)->opcode==OP_Copy ){
109913 int op; /* The opcode being coded */
110326 ** set the P5 parameter to the OP_Column opcode to OPFLAG_LENGTHARG
110469 /* If the opcode is TK_TRIGGER, then the expression is a reference
110476 ** The expression is implemented using an OP_Param opcode. The p1
110694 ** guard them with an OP_Once opcode to ensure that the code is only executed
110898 && (pOp=sqlite3VdbeGetLastOp(v))->opcode==OP_Copy
111000 ** are the same as opcode values (ex: OP_Eq) that implement the corresponding
114820 ** because the OpenWrite opcode below will be needing it. */
115548 /* Add a comment to the most recent VDBE opcode that is the name
117666 assert( pParse->nErr>0 || sqlite3VdbeGetOp(v, 0)->opcode==OP_Init );
118652 ** Insert a single OP_JournalMode query opcode in order to force the
118909 ** The trigger has the Trigger.bReturning flag and an opcode of
119830 /* Convert the P3 operand of the OP_CreateBtree opcode from BTREE_INTKEY
120765 ** "OP_Destroy 4 0" opcode. The subsequent "OP_Destroy 5 0" would hit
121285 /* This OP_SeekEnd opcode makes index insert for a REINDEX go much
124446 u8 opSeek; /* Seek opcode */
124690 ** representation) then converted to REAL by an OP_RealAffinity opcode.
124693 ** OP_RealAffinity opcode if it is present */
124747 assert( pOp->opcode==OP_CollSeq );
128633 int opcode /* OP_OpenRead or OP_OpenWrite */
128639 assert( opcode==OP_OpenWrite || opcode==OP_OpenRead );
128641 (opcode==OP_OpenWrite)?1:0, pTab->zName);
128643 sqlite3VdbeAddOp4Int(v, opcode, iCur, pTab->tnum, iDb, pTab->nNVCol);
128649 sqlite3VdbeAddOp3(v, opcode, iCur, pPk->tnum, iDb);
128750 ** Otherwise if iReg>0 then code an OP_Affinity opcode that will set the
128752 ** then just set the P4 operand of the previous opcode (which should be
128768 ** Generate an appropropriate OP_TypeCheck opcode that will verify the
128770 ** means an OP_MakeRecord opcode has already been generated and should be
128771 ** the last opcode generated. The new OP_TypeCheck needs to be inserted
128782 /* Move the previous opcode (which should be OP_MakeRecord) forward
128789 assert( pPrev->opcode==OP_MakeRecord || sqlite3VdbeDb(v)->mallocFailed );
128790 pPrev->opcode = OP_TypeCheck;
128814 assert( sqlite3VdbeGetLastOp(v)->opcode==OP_MakeRecord
128838 if( pOp->opcode==OP_OpenRead && pOp->p3==iDb ){
128851 if( pOp->opcode==OP_VOpen && pOp->p4.pVtab==pVTab ){
128901 if( pOp->opcode==OP_Affinity ){
128918 }else if( pOp->opcode==OP_TypeCheck ){
129879 /* The row that the VUpdate opcode will delete: none */
130000 if( sqlite3VdbeGetOp(v, addrCont-1)->opcode==OP_ReleaseReg ){
130001 assert( sqlite3VdbeGetOp(v, addrCont)->opcode==OP_Yield );
130718 /* This OP_Delete opcode fires the pre-update-hook only. It does
130769 int addrConflictCk; /* First opcode in the conflict check logic */
131013 VdbeOp x; /* Conflict check opcode to copy */
131014 /* The sqlite3VdbeAddOp4() call might reallocate the opcode array.
131015 ** Hence, make a complete copy of the opcode, rather than using
131016 ** a pointer to the opcode. */
131018 if( x.opcode!=OP_IdxRowid ){
131019 int p2; /* New P2 value for copied conflict check opcode */
131021 if( sqlite3OpcodeProperty[x.opcode]&OPFLG_JUMP ){
131027 sqlite3VdbeAddOp4(v, x.opcode, x.p1, p2, x.p3, zP4, x.p4type);
131099 ** Change the P5 operand on the last opcode (which should be an OP_MakeRecord)
131710 ** of every OP_IdxInsert opcode, an OP_SeekEnd is added before the
135395 ** compiler (eg. count_changes). So add an opcode to expire all
136085 int p1, p3, p4; /* Operands to the OP_IsType opcode */
136428 ** mode. Change the OP_SetCookie opcode into a no-op. */
136429 aOp[1].opcode = OP_Noop;
136588 char *zSubSql; /* SQL statement for the OP_SqlExec opcode */
137227 ** This routine is also called from the OP_ParseSchema opcode of the VDBE.
138237 int addrTnct; /* Address of OP_OpenEphemeral opcode for tabTnct */
138954 int addrFirst; /* Address of the OP_IfNot opcode */
138955 int addrJmp; /* Address of the OP_Jump opcode */
139156 ** adjustments to the OP_OpenEphemeral opcode that the codeDistinct()
139169 ** OP_OpenEphemeral opcode into an OP_Noop.
139188 if( sqlite3VdbeGetOp(v, iOpenEphAddr+1)->opcode==OP_Explain ){
139197 pOp->opcode = OP_Null;
141536 ** Then the OP_ResultRow opcode is used to cause sqlite3_step() to
141982 ** it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode
144508 ** Invoke the OP_AggFinalize opcode for every aggregate function
146817 u8 op, /* Trigger opcode */
147674 /* Code the OP_Program opcode in the parent VDBE. P4 of the OP_Program
147898 ** integer. In that case, add an OP_RealAffinity opcode to make sure
148179 int bFinishSeek = 1; /* The OP_FinishSeek opcode is needed */
148885 /* We must run the OP_FinishSeek opcode to resolve a prior
149651 ** This routine implements the OP_Vacuum opcode of the VDBE.
151361 int endSubrtn; /* The last opcode in the interior subroutine */
151398 u8 op, p3, p5; /* Opcode, P3 & P5 of the opcode that ends the loop */
151399 int p1, p2; /* Operands of the opcode used to end the loop */
151829 WhereLevel *pLevel, /* Scan to write OP_Explain opcode for */
152041 ** defined at compile-time. If it is not a no-op, a single OP_Explain opcode
152044 ** If an OP_Explain opcode is added to the VM, its address is returned.
152050 WhereLevel *pLevel, /* Scan to write OP_Explain opcode for */
152153 ** Add a single OP_Explain opcode that describes a Bloom filter.
152159 ** If an OP_Explain opcode is added to the VM, its address is returned.
152303 ** Code an OP_Affinity opcode to apply the column affinity string zAff
152334 /* Code the OP_Affinity opcode if there is anything left to do. */
152800 ** set P3 and P5 on the OP_String opcode so that the string will be cast
152824 assert( pOp->opcode==OP_String8
153069 ** to 0. The OP_Column opcode can check this array to see if the column it
153411 if( (pOp->opcode==OP_Column && pOp->p3==iReg+j+2)
153412 || (pOp->opcode==OP_Rowid && pOp->p2==iReg+j+2)
153414 testcase( pOp->opcode==OP_Rowid );
153415 sqlite3VdbeAddOp3(v, pOp->opcode, pOp->p1, pOp->p2, pOp->p3);
153655 int op; /* Instruction opcode */
153820 /* TUNING: The OP_SeekScan opcode seeks to reduce the number
154030 ** Gosub opcode and jumps straight to the code generated by WhereEnd().
154170 /* The extra 0x10000 bit on the opcode is masked off and does not
154330 /* Set the P2 operand of the OP_Return opcode that will end the current
156731 ** Return TRUE if the WHERE loop uses the OP_DeferredSeek opcode to move
157213 ** cursor iTabCur are transformed into OP_Sequence opcode for the
157219 int iStart, /* Translate from this opcode to the end */
157230 if( pOp->opcode==OP_Column ){
157231 pOp->opcode = OP_Copy;
157236 }else if( pOp->opcode==OP_Rowid ){
157237 pOp->opcode = OP_Sequence;
157241 pOp->opcode = OP_Null;
162580 ** the P4 operand of the OP_OpenRead/Write opcode. */
162790 if( pOp->opcode==OP_Close ) return 0;
162791 if( pOp->opcode==OP_OpenRead ) return 1;
162792 if( pOp->opcode==OP_OpenWrite ) return 1;
162793 if( pOp->opcode==OP_OpenDup ) return 1;
162794 if( pOp->opcode==OP_OpenAutoindex ) return 1;
162795 if( pOp->opcode==OP_OpenEphemeral ) return 1;
162883 assert( sqlite3VdbeGetOp(v, pIn->addrInTop+1)->opcode==OP_IsNull
162911 ** OP_IsNull also bypasses the OP_Affinity opcode that is
163043 assert( pOp->opcode!=OP_Column || pOp->p1!=pLevel->iTabCur );
163044 assert( pOp->opcode!=OP_Rowid || pOp->p1!=pLevel->iTabCur );
163045 assert( pOp->opcode!=OP_IfNullRow || pOp->p1!=pLevel->iTabCur );
163053 }else if( pOp->opcode==OP_Column
163055 || pOp->opcode==OP_Offset
163061 if( pOp->opcode==OP_Offset ){
163086 || pOp->opcode==OP_Offset
163094 }else if( pOp->opcode==OP_Rowid ){
163096 pOp->opcode = OP_IdxRowid;
163098 }else if( pOp->opcode==OP_IfNullRow ){
164857 if( pOp->opcode==OP_Column && pOp->p1==pMWin->iEphCsr ){
174367 int op; /* The opcode */