Home | History | Annotate | Download | only in dist

Lines Matching refs:p1

7719   int p1;             /* First operand */
7766 signed char p1; /* First operand */
7992 #define OPFLG_IN1 0x0004 /* in1: P1 is an input */
8033 SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, int addr, int P1);
9200 ** and as the P1 argument to the OP_Savepoint instruction.
10046 int p1, p2; /* Operands of the opcode used to ends the loop */
20620 /* b: p1 (unmasked) */
20653 /* b: p1<<14 | p3 (unmasked) */
20666 /* b: p1<<14 | p3 (unmasked) */
20667 /* 1:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) */
20690 /* 2:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) */
20693 /* s: p0<<21 | p1<<14 | p2<<7 | p3 (masked) */
20698 /* b: p1<<28 | p3<<14 | p5 (unmasked) */
20796 /* b: p1 (unmasked) */
20854 /* b: p1<<14 | p3 (unmasked) */
55447 ** p1, p2, p3 Operands
55453 SQLITE_PRIVATE int sqlite3VdbeAddOp3(Vdbe *p, int op, int p1, int p2, int p3){
55469 pOp->p1 = p1;
55488 SQLITE_PRIVATE int sqlite3VdbeAddOp1(Vdbe *p, int op, int p1){
55489 return sqlite3VdbeAddOp3(p, op, p1, 0, 0);
55491 SQLITE_PRIVATE int sqlite3VdbeAddOp2(Vdbe *p, int op, int p1, int p2){
55492 return sqlite3VdbeAddOp3(p, op, p1, p2, 0);
55502 int p1, /* The P1 operand */
55508 int addr = sqlite3VdbeAddOp3(p, op, p1, p2, p3);
55519 int p1, /* The P1 operand */
55524 int addr = sqlite3VdbeAddOp3(p, op, p1, p2, p3);
55656 ** * OP_Halt with P1=SQLITE_CONSTRAINT and P2=OE_Abort.
55657 ** * OP_HaltIfNull with P1=SQLITE_CONSTRAINT and P2=OE_Abort.
55681 || (opcode==OP_FkCounter && pOp->p1==0 && pOp->p2==1)
55684 && (pOp->p1==SQLITE_CONSTRAINT && pOp->p2==OE_Abort))
55735 n = pOp[-1].p1;
55801 pOut->p1 = pIn->p1;
55824 ** Change the value of the P1 operand for a specific instruction.
55833 p->aOp[addr].p1 = val;
56290 sqlite3OpcodeName(pOp->opcode), pOp->p1, pOp->p2, pOp->p3, zP4, pOp->p5,
56491 pMem->u.i = pOp->p1; /* P1 */
59639 assert( pOp->p1>0 && pOp->p1<=p->nVar );
59640 p->azVar[pOp->p1-1] = pOp->p4.z;
59949 ** and 5 operands. Operands P1, P2, and P3 are integers. Operand P4
60600 int p1; /* Register to copy from */
60637 int p1;
60654 int p1; /* P1 value of the opcode */
60701 int p1; /* Value of P1 operand */
61085 assert( pOp->p1>0 );
61086 assert( pOp->p1<=p->nMem );
61087 assert( memIsValid(&aMem[pOp->p1]) );
61088 REGISTER_TRACE(pOp->p1, &aMem[pOp->p1]);
61164 /* Opcode: Gosub P1 P2 * * *
61166 ** Write the current address onto register P1
61170 pIn1 = &aMem[pOp->p1];
61175 REGISTER_TRACE(pOp->p1, pIn1);
61180 /* Opcode: Return P1 * * * *
61182 ** Jump to the next instruction after the address in register P1.
61185 pIn1 = &aMem[pOp->p1];
61191 /* Opcode: Yield P1 * * * *
61193 ** Swap the program counter with the value in register P1.
61199 pIn1 = &aMem[pOp->p1];
61204 REGISTER_TRACE(pOp->p1, pIn1);
61209 /* Opcode: HaltIfNull P1 P2 P3 P4 *
61212 ** parameter P1, P2, and P4 as if this were a Halt instruction. If the
61221 /* Opcode: Halt P1 P2 * P4 *
61226 ** P1 is the result code returned by sqlite3_exec(), sqlite3_reset(),
61228 ** For errors, it can be some other value. If P1!=0 then P2 will determine
61241 if( pOp->p1==SQLITE_OK && p->pFrame ){
61261 p->rc = pOp->p1;
61268 sqlite3_log(pOp->p1, "abort at %d in [%s]: %s", pc, p->zSql, pOp->p4.z);
61271 sqlite3_log(pOp->p1, "constraint failed at %d in [%s]", pc, p->zSql);
61285 /* Opcode: Integer P1 P2 * * *
61287 ** The 32-bit integer value P1 is written into register P2.
61290 pOut->u.i = pOp->p1;
61327 pOp->p1 = sqlite3Strlen30(pOp->p4.z);
61344 pOp->p1 = pOut->n;
61347 if( pOp->p1>db->aLimit[SQLITE_LIMIT_LENGTH] ){
61353 /* Opcode: String P1 P2 * P4 *
61355 ** The string value P4 of length P1 (bytes) is stored in register P2.
61361 pOut->n = pOp->p1;
61377 /* Opcode: Blob P1 P2 * P4
61379 ** P4 points to a blob of data P1 bytes long. Store this
61383 assert( pOp->p1 <= SQLITE_MAX_LENGTH );
61384 sqlite3VdbeMemSetStr(pOut, pOp->p4.z, pOp->p1, 0, 0);
61390 /* Opcode: Variable P1 P2 * P4 *
61392 ** Transfer the values of bound parameter P1 into register P2
61402 assert( pOp->p1>0 && pOp->p1<=p->nVar );
61403 u.ab.pVar = &p->aVar[pOp->p1 - 1];
61412 /* Opcode: Move P1 P2 P3 * *
61414 ** Move the values in register P1..P1+P3-1 over into
61415 ** registers P2..P2+P3-1. Registers P1..P1+P1-1 are
61417 ** P1..P1+P3-1 and P2..P2+P3-1 to overlap.
61423 int p1; /* Register to copy from */
61428 u.ac.p1 = pOp->p1;
61430 assert( u.ac.n>0 && u.ac.p1>0 && u.ac.p2>0 );
61431 assert( u.ac.p1+u.ac.n<=u.ac.p2 || u.ac.p2+u.ac.n<=u.ac.p1 );
61433 pIn1 = &aMem[u.ac.p1];
61451 /* Opcode: Copy P1 P2 * * *
61453 ** Make a copy of register P1 into register P2.
61459 pIn1 = &aMem[pOp->p1];
61468 /* Opcode: SCopy P1 P2 * * *
61470 ** Make a shallow copy of register P1 into register P2.
61481 pIn1 = &aMem[pOp->p1];
61492 /* Opcode: ResultRow P1 P2 * * *
61494 ** The registers P1 through P1+P2-1 contain a single row of
61497 ** structure to provide access to the top P1 values as the result
61506 assert( pOp->p1>0 );
61507 assert( pOp->p1+pOp->p2<=p->nMem+1 );
61546 u.ad.pMem = p->pResultSet = &aMem[pOp->p1];
61554 REGISTER_TRACE(pOp->p1+u.ad.i, &u.ad.pMem[u.ad.i]);
61565 /* Opcode: Concat P1 P2 P3 * *
61567 ** Add the text in register P1 onto the end of the text in
61569 ** If either the P1 or P2 text are NULL then store NULL in P3.
61571 ** P3 = P2 || P1
61573 ** It is illegal for P1 and P3 to be the same register. Sometimes,
61582 pIn1 = &aMem[pOp->p1];
61614 /* Opcode: Add P1 P2 P3 * *
61616 ** Add the value in register P1 to the value in register P2
61620 /* Opcode: Multiply P1 P2 P3 * *
61623 ** Multiply the value in register P1 by the value in register P2
61627 /* Opcode: Subtract P1 P2 P3 * *
61629 ** Subtract the value in register P1 from the value in register P2
61633 /* Opcode: Divide P1 P2 P3 * *
61635 ** Divide the value in register P1 by the value in register P2
61636 ** and store the result in register P3 (P3=P2/P1). If the value in
61637 ** register P1 is zero, then the result is NULL. If either input is
61640 /* Opcode: Remainder P1 P2 P3 * *
61643 ** register P1 by the value in register P2 and store the result in P3.
61660 pIn1 = &aMem[pOp->p1];
61755 /* Opcode: Function P1 P2 P3 P4 P5
61762 ** P1 is a 32-bit bitmask indicating whether or not each argument to the
61764 ** argument was constant then bit 0 of P1 is set. This is used to determine
61841 sqlite3VdbeDeleteAuxData(u.ag.ctx.pVdbeFunc, pOp->p1);
61863 /* Opcode: BitAnd P1 P2 P3 * *
61865 ** Take the bit-wise AND of the values in register P1 and P2 and
61869 /* Opcode: BitOr P1 P2 P3 * *
61871 ** Take the bit-wise OR of the values in register P1 and P2 and
61875 /* Opcode: ShiftLeft P1 P2 P3 * *
61878 ** number of bits specified by the integer in register P1.
61882 /* Opcode: ShiftRight P1 P2 P3 * *
61885 ** number of bits specified by the integer in register P1.
61898 pIn1 = &aMem[pOp->p1];
61919 /* Opcode: AddImm P1 P2 * * *
61921 ** Add the constant P2 to the value in register P1.
61927 pIn1 = &aMem[pOp->p1];
61934 /* Opcode: MustBeInt P1 P2 * * *
61936 ** Force the value in register P1 to be an integer. If the value
61937 ** in P1 is not an integer and cannot be converted into an integer
61942 pIn1 = &aMem[pOp->p1];
61958 /* Opcode: RealAffinity P1 * * * *
61960 ** If register P1 holds an integer convert it to a real value.
61968 pIn1 = &aMem[pOp->p1];
61977 /* Opcode: ToText P1 * * * *
61979 ** Force the value in register P1 to be text.
61987 pIn1 = &aMem[pOp->p1];
62000 /* Opcode: ToBlob P1 * * * *
62002 ** Force the value in register P1 to be a BLOB.
62010 pIn1 = &aMem[pOp->p1];
62023 /* Opcode: ToNumeric P1 * * * *
62025 ** Force the value in register P1 to be numeric (either an
62034 pIn1 = &aMem[pOp->p1];
62040 /* Opcode: ToInt P1 * * * *
62042 ** Force the value in register P1 to be an integer. If
62050 pIn1 = &aMem[pOp->p1];
62058 /* Opcode: ToReal P1 * * * *
62060 ** Force the value in register P1 to be a floating point number.
62068 pIn1 = &aMem[pOp->p1];
62077 /* Opcode: Lt P1 P2 P3 P4 P5
62079 ** Compare the values in register P1 and P3. If reg(P3)<reg(P1) then
62082 ** If the SQLITE_JUMPIFNULL bit of P5 is set and either reg(P1) or
62091 ** back into the input registers P1 and P3. So this opcode can cause
62092 ** persistent changes to registers P1 and P3.
62107 /* Opcode: Ne P1 P2 P3 P4 P5
62110 ** the operands in registers P1 and P3 are not equal. See the Lt opcode for
62119 /* Opcode: Eq P1 P2 P3 P4 P5
62122 ** the operands in registers P1 and P3 are equal.
62131 /* Opcode: Le P1 P2 P3 P4 P5
62135 ** register P1. See the Lt opcode for additional information.
62137 /* Opcode: Gt P1 P2 P3 P4 P5
62141 ** register P1. See the Lt opcode for additional information.
62143 /* Opcode: Ge P1 P2 P3 P4 P5
62147 ** register P1. See the Lt opcode for additional information.
62162 pIn1 = &aMem[pOp->p1];
62244 /* Opcode: Compare P1 P2 P3 P4 *
62246 ** Compare two vectors of registers in reg(P1)..reg(P1+P3-1) (call this
62262 int p1;
62274 u.aj.p1 = pOp->p1;
62280 assert( u.aj.p1>0 && u.aj.p1+mx<=p->nMem+1 );
62283 assert( u.aj.p1>0 && u.aj.p1+u.aj.n<=p->nMem+1 );
62289 assert( memIsValid(&aMem[u.aj.p1+u.aj.idx]) );
62291 REGISTER_TRACE(u.aj.p1+u.aj.idx, &aMem[u.aj.p1+u.aj.idx]);
62296 iCompare = sqlite3MemCompare(&aMem[u.aj.p1+u.aj.idx], &aMem[u.aj.p2+u.aj.idx], u.aj.pColl);
62306 /* Opcode: Jump P1 P2 P3 * *
62308 ** Jump to the instruction at address P1, P2, or P3 depending on whether
62309 ** in the most recent OP_Compare instruction the P1 vector was less than
62314 pc = pOp->p1 - 1;
62323 /* Opcode: And P1 P2 P3 * *
62325 ** Take the logical AND of the values in registers P1 and P2 and
62328 ** If either P1 or P2 is 0 (false) then the result is 0 even if
62332 /* Opcode: Or P1 P2 P3 * *
62334 ** Take the logical OR of the values in register P1 and P2 and
62337 ** If either P1 or P2 is nonzero (true) then the result is 1 (true)
62348 pIn1 = &aMem[pOp->p1];
62377 /* Opcode: Not P1 P2 * * *
62379 ** Interpret the value in register P1 as a boolean value. Store the
62380 ** boolean complement in register P2. If the value in register P1 is
62384 pIn1 = &aMem[pOp->p1];
62394 /* Opcode: BitNot P1 P2 * * *
62396 ** Interpret the content of register P1 as an integer. Store the
62397 ** ones-complement of the P1 value into register P2. If P1 holds
62401 pIn1 = &aMem[pOp->p1];
62411 /* Opcode: If P1 P2 P3 * *
62413 ** Jump to P2 if the value in register P1 is true. The value is
62415 ** in P1 is NULL then take the jump if P3 is true.
62417 /* Opcode: IfNot P1 P2 P3 * *
62419 ** Jump to P2 if the value in register P1 is False. The value is
62421 ** in P1 is NULL then take the jump if P3 is true.
62428 pIn1 = &aMem[pOp->p1];
62445 /* Opcode: IsNull P1 P2 * * *
62447 ** Jump to P2 if the value in register P1 is NULL.
62450 pIn1 = &aMem[pOp->p1];
62457 /* Opcode: NotNull P1 P2 * * *
62459 ** Jump to P2 if the value in register P1 is not NULL.
62462 pIn1 = &aMem[pOp->p1];
62469 /* Opcode: Column P1 P2 P3 P4 P5
62471 ** Interpret the data that cursor P1 points to as a structure built using
62483 ** If the OPFLAG_CLEARCACHE bit is set on P5 and P1 is a pseudo-table cursor,
62492 int p1; /* P1 value of the opcode */
62515 u.am.p1 = pOp->p1;
62519 assert( u.am.p1<p->nCursor );
62538 u.am.pC = p->apCsr[u.am.p1];
62775 /* Opcode: Affinity P1 P2 * P4 *
62777 ** Apply affinities to a range of P2 registers starting with P1.
62792 pIn1 = &aMem[pOp->p1];
62803 /* Opcode: MakeRecord P1 P2 P3 P4 *
62805 ** Convert P2 registers beginning with P1 into the [record format]
62844 ** Data(0) is taken from register P1. Data(1) comes from register P1+1
62856 u.ao.nField = pOp->p1;
62865 assert( pOp->p3<pOp->p1 || pOp->p3>=pOp->p1+pOp->p2 );
62938 /* Opcode: Count P1 P2 * * *
62941 ** opened by cursor P1 in register P2
62950 u.ap.pCrsr = p->apCsr[pOp->p1]->pCursor;
62961 /* Opcode: Savepoint P1 * * P4 *
62964 ** on the value of P1. To open a new savepoint, P1==0. To release (commit) an
62965 ** existing savepoint, P1==1, or to rollback an existing savepoint P1==2.
62969 int p1; /* Value of P1 operand */
62979 u.aq.p1 = pOp->p1;
62982 /* Assert that the u.aq.p1 parameter is valid. Also that if there is no open
62986 assert( u.aq.p1==SAVEPOINT_BEGIN||u.aq.p1==SAVEPOINT_RELEASE||u.aq.p1==SAVEPOINT_ROLLBACK );
62990 if( u.aq.p1==SAVEPOINT_BEGIN ){
63038 db->writeVdbeCnt>0 || (u.aq.p1==SAVEPOINT_ROLLBACK && db->activeVdbeCnt>1)
63046 (u.aq.p1==SAVEPOINT_ROLLBACK ? "rollback": "release")
63056 if( isTransaction && u.aq.p1==SAVEPOINT_RELEASE ){
63072 rc = sqlite3BtreeSavepoint(db->aDb[u.aq.ii].pBt, u.aq.p1, u.aq.iSavepoint);
63077 if( u.aq.p1==SAVEPOINT_ROLLBACK && (db->flags&SQLITE_InternChanges)!=0 ){
63097 if( u.aq.p1==SAVEPOINT_RELEASE ){
63113 /* Opcode: AutoCommit P1 P2 * * *
63115 ** Set the database auto-commit flag to P1 (1 or 0). If P2 is true, roll
63129 u.ar.desiredAutoCommit = pOp->p1;
63186 /* Opcode: Transaction P1 P2 * * *
63192 ** P1 is the index of the database file on which the transaction is
63222 assert( pOp->p1>=0 && pOp->p1<db->nDb );
63223 assert( (p->btreeMask & (1<<pOp->p1))!=0 );
63224 u.as.pBt = db->aDb[pOp->p1].pBt;
63257 /* Opcode: ReadCookie P1 P2 P3 * *
63259 ** Read cookie number P3 from database P1 and write it into register P2.
63261 ** P3==3 is the recommended pager cache size, and so forth. P1==0 is
63262 ** the main database file and P1==1 is the database file used to store
63276 u.at.iDb = pOp->p1;
63288 /* Opcode: SetCookie P1 P2 P3 * *
63291 ** into cookie number P2 of database P1. P2==1 is the schema version.
63293 ** size, and so forth. P1==0 is the main database file and P1==1 is the
63303 assert( pOp->p1>=0 && pOp->p1<db->nDb );
63304 assert( (p->btreeMask & (1<<pOp->p1))!=0 );
63305 u.au.pDb = &db->aDb[pOp->p1];
63319 if( pOp->p1==1 ){
63328 /* Opcode: VerifyCookie P1 P2 *
63332 ** P1 is the database number which is 0 for the main database file
63349 assert( pOp->p1>=0 && pOp->p1<db->nDb );
63350 assert( (p->btreeMask & (1<<pOp->p1))!=0 );
63351 u.av.pBt = db->aDb[pOp->p1].pBt;
63373 if( db->aDb[pOp->p1].pSchema->schema_cookie!=u.av.iMeta ){
63374 sqlite3ResetInternalSchema(db, pOp->p1);
63383 /* Opcode: OpenRead P1 P2 P3 P4 P5
63389 ** database. Give the new cursor an identifier of P1. The P1
63390 ** values need not be contiguous but all P1 values should be small integers.
63391 ** It is an error for P1 to be negative.
63413 /* Opcode: OpenWrite P1 P2 P3 P4 P5
63415 ** Open a read/write cursor named P1 on the table or index whose root
63491 assert( pOp->p1>=0 );
63492 u.aw.pCur = allocateCursor(p, pOp->p1, u.aw.nField, u.aw.iDb, 1);
63518 /* Opcode: OpenEphemeral P1 P2 * P4 *
63520 ** Open a new cursor P1 to a transient table.
63536 /* Opcode: OpenAutoindex P1 P2 * P4 *
63555 assert( pOp->p1>=0 );
63556 u.ax.pCx = allocateCursor(p, pOp->p1, pOp->p2, -1, 1);
63592 /* Opcode: OpenPseudo P1 P2 P3 * *
63596 ** register P2. In other words, cursor P1 becomes an alias for the
63612 assert( pOp->p1>=0 );
63613 u.ay.pCx = allocateCursor(p, pOp->p1, pOp->p3, -1, 0);
63622 /* Opcode: Close P1 * * * *
63624 ** Close a cursor previously opened as P1. If P1 is not
63628 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
63629 sqlite3VdbeFreeCursor(p, p->apCsr[pOp->p1]);
63630 p->apCsr[pOp->p1] = 0;
63634 /* Opcode: SeekGe P1 P2 P3 P4 *
63636 ** If cursor P1 refers to an SQL table (B-Tree that uses integer keys),
63637 ** use the value in register P3 as the key. If cursor P1 refers
63641 ** Reposition cursor P1 so that it points to the smallest entry that
63647 /* Opcode: SeekGt P1 P2 P3 P4 *
63649 ** If cursor P1 refers to an SQL table (B-Tree that uses integer keys),
63650 ** use the value in register P3 as a key. If cursor P1 refers
63654 ** Reposition cursor P1 so that it points to the smallest entry that
63660 /* Opcode: SeekLt P1 P2 P3 P4 *
63662 ** If cursor P1 refers to an SQL table (B-Tree that uses integer keys),
63663 ** use the value in register P3 as a key. If cursor P1 refers
63667 ** Reposition cursor P1 so that it points to the largest entry that
63673 /* Opcode: SeekLe P1 P2 P3 P4 *
63675 ** If cursor P1 refers to an SQL table (B-Tree that uses integer keys),
63676 ** use the value in register P3 as a key. If cursor P1 refers
63680 ** Reposition cursor P1 so that it points to the largest entry that
63699 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
63701 u.az.pC = p->apCsr[pOp->p1];
63840 /* Opcode: Seek P1 P2 * * *
63842 ** P1 is an open table cursor and P2 is a rowid integer. Arrange
63843 ** for P1 to move so that it points to the rowid given by P2.
63854 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
63855 u.ba.pC = p->apCsr[pOp->p1];
63869 /* Opcode: Found P1 P2 P3 P4 *
63875 ** Cursor P1 is on an index btree. If the record identified by P3 and P4
63876 ** is a prefix of any entry in P1 then a jump is made to P2 and
63877 ** P1 is left pointing at the matching entry.
63879 /* Opcode: NotFound P1 P2 P3 P4 *
63885 ** Cursor P1 is on an index btree. If the record identified by P3 and P4
63886 ** is not the prefix of any entry in P1 then a jump is made to P2. If P1
63888 ** falls through to the next instruction and P1 is left pointing at the
63909 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
63911 u.bb.pC = p->apCsr[pOp->p1];
63955 /* Opcode: IsUnique P1 P2 P3 P4 *
63957 ** Cursor P1 is open on an index b-tree - that is to say, a btree which
63964 ** that make up an unpacked index key that can be used with cursor P1.
63972 ** Otherwise, this instruction checks if cursor P1 contains an entry
63994 /* Assert that the values of parameters P1 and P4 are in range. */
63997 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
64000 u.bc.pCx = p->apCsr[pOp->p1];
64044 /* Opcode: NotExists P1 P2 P3 * *
64047 ** with that key does not exist in table of P1, then jump to P2.
64052 ** operation assumes the key is an integer and that P1 is a table whereas
64054 ** P1 is an index.
64068 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
64069 u.bd.pC = p->apCsr[pOp->p1];
64099 /* Opcode: Sequence P1 P2 * * *
64101 ** Find the next available sequence number for cursor P1.
64107 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
64108 assert( p->apCsr[pOp->p1]!=0 );
64109 pOut->u.i = p->apCsr[pOp->p1]->seqCount++;
64114 /* Opcode: NewRowid P1 P2 P3 * *
64118 ** table that cursor P1 points to. The new record number is written
64140 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
64141 u.be.pC = p->apCsr[pOp->p1];
64266 /* Opcode: Insert P1 P2 P3 P4 P5
64268 ** Write an entry into the table of cursor P1. A new entry is
64296 ** (WARNING/TODO: If P1 is a pseudo-cursor and P2 is dynamically
64305 /* Opcode: InsertInt P1 P2 P3 P4 P5
64325 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
64327 u.bf.pC = p->apCsr[pOp->p1];
64380 /* Opcode: Delete P1 P2 * P4 *
64382 ** Delete the record at which the P1 cursor is currently pointing.
64392 ** P1 must not be pseudo-table. It has to be a real table with
64395 ** If P4 is not NULL, then it is the name of the table that P1 is
64397 P1 cursor must have been positioned
64407 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
64408 u.bg.pC = p->apCsr[pOp->p1];
64459 /* Opcode: RowData P1 P2 * * *
64461 ** Write into register P2 the complete row data for cursor P1.
64466 ** If the P1 cursor must be pointing to a valid row (not a NULL row)
64469 /* Opcode: RowKey P1 P2 * * *
64471 ** Write into register P2 the complete row key for cursor P1.
64476 ** If the P1 cursor must be pointing to a valid row (not a NULL row)
64492 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
64493 u.bh.pC = p->apCsr[pOp->p1];
64542 /* Opcode: Rowid P1 P2 * * *
64545 ** P1 is currently point to.
64547 ** P1 can be either an ordinary table or a virtual table. There used to
64559 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
64560 u.bi.pC = p->apCsr[pOp->p1];
64591 /* Opcode: NullRow P1 * * * *
64593 ** Move the cursor P1 to a null row. Any OP_Column operations
64602 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
64603 u.bj.pC = p->apCsr[pOp->p1];
64613 /* Opcode: Last P1 P2 * * *
64615 ** The next use of the Rowid or Column or Next instruction for P1
64628 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
64629 u.bk.pC = p->apCsr[pOp->p1];
64648 /* Opcode: Sort P1 P2 * * *
64668 /* Opcode: Rewind P1 P2 * * *
64670 ** The next use of the Rowid or Column or Next instruction for P1
64683 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
64684 u.bl.pC = p->apCsr[pOp->p1];
64702 /* Opcode: Next P1 P2 * * P5
64704 ** Advance cursor P1 so that it points to the next key/data pair in its
64709 ** The P1 cursor must be for a real table, not a pseudo-table.
64716 /* Opcode: Prev P1 P2 * * P5
64718 ** Back up cursor P1 so that it points to the previous key/data pair in its
64723 ** The P1 cursor must be for a real table, not a pseudo-table.
64737 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
64739 u.bm.pC = p->apCsr[pOp->p1];
64765 /* Opcode: IdxInsert P1 P2 P3 * P5
64769 ** into the index P1. Data for the entry is nil.
64785 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
64786 u.bn.pC = p->apCsr[pOp->p1];
64807 /* Opcode: IdxDelete P1 P2 P3 * *
64811 ** index opened by cursor P1.
64823 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
64824 u.bo.pC = p->apCsr[pOp->p1];
64845 /* Opcode: IdxRowid P1 P2 * * *
64848 ** the end of the index key pointed to by cursor P1. This integer should be
64860 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
64861 u.bp.pC = p->apCsr[pOp->p1];
64882 /* Opcode: IdxGE P1 P2 P3 P4 P5
64886 ** that P1 is currently pointing to, ignoring the ROWID on the P1 index.
64888 ** If the P1 index entry is greater than or equal to the key value
64896 /* Opcode: IdxLT P1 P2 P3 P4 P5
64900 ** that P1 is currently pointing to, ignoring the ROWID on the P1 index.
64902 ** If the P1 index entry is less than the key value then jump to P2.
64916 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
64917 u.bq.pC = p->apCsr[pOp->p1];
64949 /* Opcode: Destroy P1 P2 P3 * *
64952 ** file is given by P1.
64994 rc = sqlite3BtreeDropTable(db->aDb[u.br.iDb].pBt, pOp->p1, &u.br.iMoved);
64999 sqlite3RootPageMoved(&db->aDb[u.br.iDb], u.br.iMoved, pOp->p1);
65007 /* Opcode: Clear P1 P2 P3
65010 ** in the database file is given by P1. But, unlike Destroy, do not
65033 db->aDb[pOp->p2].pBt, pOp->p1, (pOp->p3 ? &u.bs.nChange : 0)
65046 /* Opcode: CreateTable P1 P2 * * *
65048 ** Allocate a new table in the main database file if P1==0 or in the
65049 ** auxiliary database file if P1==1 or in an attached database if
65050 ** P1>1. Write the root page number of the new table into
65059 /* Opcode: CreateIndex P1 P2 * * *
65061 ** Allocate a new index in the main database file if P1==0 or in the
65062 ** auxiliary database file if P1==1 or in an attached database if
65063 ** P1>1. Write the root page number of the new table into
65077 assert( pOp->p1>=0 && pOp->p1<db->nDb );
65078 assert( (p->btreeMask & (1<<pOp->p1))!=0 );
65079 u.bt.pDb = &db->aDb[pOp->p1];
65092 /* Opcode: ParseSchema P1 P2 * P4 *
65094 ** Read and parse all entries from the SQLITE_MASTER table of database P1
65112 u.bu.iDb = pOp->p1;
65141 u.bu.initData.iDb = pOp->p1;
65167 /* Opcode: LoadAnalysis P1 * * * *
65169 ** Read the sqlite_stat1 table for database P1 and load the content
65174 assert( pOp->p1>=0 && pOp->p1<db->nDb );
65175 rc = sqlite3AnalysisLoad(db, pOp->p1);
65180 /* Opcode: DropTable P1 * * P4 *
65183 ** the table named P4 in database P1. This is called after a table
65188 sqlite3UnlinkAndDeleteTable(db, pOp->p1, pOp->p4.z);
65192 /* Opcode: DropIndex P1 * * P4 *
65195 ** the index named P4 in database P1. This is called after an index
65200 sqlite3UnlinkAndDeleteIndex(db, pOp->p1, pOp->p4.z);
65204 /* Opcode: DropTrigger P1 * * P4 *
65207 ** the trigger named P4 in database P1. This is called after a trigger
65212 sqlite3UnlinkAndDeleteTrigger(db, pOp->p1, pOp->p4.z);
65218 /* Opcode: IntegrityCk P1 P2 P3 * P5
65221 ** register P1 the text of an error message describing any problems.
65222 ** If no problems are found, store a NULL in register P1.
65226 ** In other words, the analysis stops as soon as reg(P1) errors are
65227 ** seen. Reg(P1) is updated with the number of errors remaining.
65230 ** stored in reg(P1), reg(P1+1), reg(P1+2), .... There are P2 tables
65256 pIn1 = &aMem[pOp->p1];
65281 /* Opcode: RowSetAdd P1 P2 * * *
65284 ** held in register P1.
65289 pIn1 = &aMem[pOp->p1];
65300 /* Opcode: RowSetRead P1 P2 P3 * *
65302 ** Extract the smallest value from boolean index P1 and put that value into
65303 ** register P3. Or, if boolean index P1 is initially empty, leave P3
65311 pIn1 = &aMem[pOp->p1];
65325 /* Opcode: RowSetTest P1 P2 P3 P4
65327 ** Register P3 is assumed to hold a 64-bit integer value. If register P1
65354 pIn1 = &aMem[pOp->p1];
65359 /* If there is anything other than a rowset object in memory cell P1,
65360 ** delete it now and initialize P1 with an empty rowset
65387 /* Opcode: Program P1 P2 P3 P4 *
65391 ** P1 contains the address of the memory cell that contains the first memory
65503 /* Opcode: Param P1 P2 * * *
65512 ** the value of the P1 argument to the value of the P1 argument to the
65521 u.bz.pIn = &u.bz.pFrame->aMem[pOp->p1 + u.bz.pFrame->aOp[u.bz.pFrame->pc].p1];
65529 /* Opcode: FkCounter P1 P2 * * *
65532 ** If P1 is non-zero, the database constraint counter is incremented
65533 ** (deferred foreign key constraints). Otherwise, if P1 is zero, the
65537 if( pOp->p1 ){
65545 /* Opcode: FkIfZero P1 P2 * * *
65551 ** If P1 is non-zero, then the jump is taken if the database constraint-counter
65552 ** is zero (the one that counts deferred constraint violations). If P1 is
65557 if( pOp->p1 ){
65567 /* Opcode: MemMax P1 P2 * * *
65569 ** P1 is a register in the root frame of this VM (the root frame is
65571 ** within a sub-program). Set the value of register P1 to the maximum of
65584 u.ca.pIn1 = &u.ca.pFrame->aMem[pOp->p1];
65586 u.ca.pIn1 = &aMem[pOp->p1];
65599 /* Opcode: IfPos P1 P2 * * *
65601 ** If the value of register P1 is 1 or greater, jump to P2.
65607 pIn1 = &aMem[pOp->p1];
65615 /* Opcode: IfNeg P1 P2 * * *
65617 ** If the value of register P1 is less than zero, jump to P2.
65623 pIn1 = &aMem[pOp->p1];
65631 /* Opcode: IfZero P1 P2 P3 * *
65633 ** The register P1 must contain an integer. Add literal P3 to the
65634 ** value in register P1. If the result is exactly 0, jump to P2.
65640 pIn1 = &aMem[pOp->p1];
65706 /* Opcode: AggFinal P1 P2 * P4 *
65708 ** Execute the finalizer function for an aggregate. P1 is
65722 assert( pOp->p1>0 && pOp->p1<=p->nMem );
65723 u.cc.pMem = &aMem[pOp->p1];
65738 /* Opcode: Checkpoint P1 * * * *
65740 ** Checkpoint database P1. This is a no-op if P1 is not currently in
65744 rc = sqlite3Checkpoint(db, pOp->p1);
65750 /* Opcode: JournalMode P1 P2 P3 * P5
65752 ** Change the journal mode of database P1 to P3. P3 must be one of the
65779 assert( pOp->p1>=0 && pOp->p1<db->nDb );
65792 assert( (p->btreeMask & (1<<pOp->p1))!=0 || p->aMutex.nMutex==0 );
65796 sqlite3VdbeUsesBtree(p, pOp->p1);
65800 u.cd.pBt = db->aDb[pOp->p1].pBt;
65887 /* Opcode: IncrVacuum P1 P2 * * *
65890 ** the P1 database. If the vacuum has finished, jump to instruction
65898 assert( pOp->p1>=0 && pOp->p1<db->nDb );
65899 assert( (p->btreeMask & (1<<pOp->p1))!=0 );
65900 u.ce.pBt = db->aDb[pOp->p1].pBt;
65910 /* Opcode: Expire P1 * * * *
65916 ** If P1 is 0, then all SQL statements become expired. If P1 is non-zero,
65920 if( !pOp->p1 ){
65929 /* Opcode: TableLock P1 P2 P3 P4 *
65934 ** P1 is the index of the database in sqlite3.aDb[] of the database
65946 int p1 = pOp->p1;
65947 assert( p1>=0 && p1<db->nDb );
65948 assert( (p->btreeMask & (1<<p1))!=0 );
65950 rc = sqlite3BtreeLockTable(db->aDb[p1].pBt, pOp->p2, isWriteLock);
65982 /* Opcode: VCreate P1 * * P4 *
65984 ** P4 is the name of a virtual table in database P1. Call the xCreate method
65988 rc = sqlite3VtabCallCreate(db, pOp->p1, pOp->p4.z, &p->zErrMsg);
65994 /* Opcode: VDestroy P1 * * P4 *
65996 ** P4 is the name of a virtual table in database P1. Call the xDestroy method
66001 rc = sqlite3VtabCallDestroy(db, pOp->p1, pOp->p4.z);
66008 /* Opcode: VOpen P1 * * P4 *
66011 ** P1 is a cursor number. This opcode opens a cursor to the virtual
66012 ** table and stores that cursor in P1.
66034 u.cg.pCur = allocateCursor(p, pOp->p1, 0, -1, 0);
66048 /* Opcode: VFilter P1 P2 P3 P4 *
66050 ** P1 is a cursor opened using VOpen. P2 is an address to jump to if
66058 ** by P1. The integer query plan parameter to xFilter is stored in register
66083 u.ch.pCur = p->apCsr[pOp->p1];
66124 /* Opcode: VColumn P1 P2 P3 * *
66128 ** P1 cursor is pointing to into register P3.
66138 VdbeCursor *pCur = p->apCsr[pOp->p1];
66183 /* Opcode: VNext P1 P2 * * *
66185 ** Advance virtual table P1 to the next row in its result set and
66198 u.cj.pCur = p->apCsr[pOp->p1];
66230 /* Opcode: VRename P1 * * P4 *
66234 ** in register P1 is passed as the zName argument to the xRename method.
66243 u.ck.pName = &aMem[pOp->p1];
66246 REGISTER_TRACE(pOp->p1, u.ck.pName);
66257 /* Opcode: VUpdate P1 P2 P3 P4 *
66276 ** P1 is a boolean flag. If it is set to true and the xUpdate call
66307 if( rc==SQLITE_OK && pOp->p1 ){
66318 /* Opcode: Pagecount P1 P2 * * *
66320 ** Write the current number of pages in database P1 to memory cell P2.
66323 pOut->u.i = sqlite3BtreeLastPage(db->aDb[pOp->p1].pBt);
66330 /* Opcode: MaxPgcnt P1 P2 P3 * *
66332 ** Try to set the maximum page count for database P1 to the value in P3.
66342 pBt = db->aDb[pOp->p1].pBt;
71501 ** The expression is implemented using an OP_Param opcode. The p1
71504 ** i is the index of the column. For a new.rowid reference, p1 is
71506 ** For a reference to any other column in the new.* pseudo-table, p1
71513 ** Then p1 is interpreted as follows:
71515 ** p1==0 -> old.rowid p1==3 -> new.rowid
71516 ** p1==1 -> old.a p1==4 -> new.a
71517 ** p1==2 -> old.b p1==5 -> new.b
71520 int p1 = pExpr->iTable * (pTab->nCol+1) + 1 + pExpr->iColumn;
71525 assert( p1>=0 && p1<(pTab->nCol*2+2) );
71527 sqlite3VdbeAddOp2(v, OP_Param, p1, target);
74405 /* Code an OP_Expire. For an ATTACH statement, set P1 to true (expire this
74964 int p1 = p->iDb;
74965 sqlite3VdbeAddOp4(pVdbe, OP_TableLock, p1, p->iTab, p->isWriteLock,
79804 ** substr(x,p1,p2) returns p2 characters of x[] beginning with p1.
79805 ** p1 is 1-indexed. So substr(x,1,1) returns the first character
79809 ** If p1 is negative, then we begin abs(p1) from the end of x[].
79811 ** If p2 is negative, return the p2 characters preceeding p1.
79822 i64 p1, p2;
79832 p1 = sqlite3_value_int(argv[1]);
79842 if( p1<0 ){
79857 if( p1<0 ){
79858 p1 += len;
79859 if( p1<0 ){
79860 p2 += p1;
79862 p1 = 0;
79864 }else if( p1>0 ){
79865 p1--;
79870 p1 -= p2;
79871 if( p1<0 ){
79872 p2 += p1;
79873 p1 = 0;
79876 assert( p1>=0 && p2>=0 );
79878 while( *z && p1 ){
79880 p1--;
79887 if( p1+p2>len ){
79888 p2 = len-p1;
79891 sqlite3_result_blob(context, (char*)&z[p1], (int)p2, SQLITE_TRANSIENT);
83326 pOp->p1 = baseCur;
87615 "addr", "opcode", "p1", "p2", "p3", "p4", "p5", "comment",
98909 pLevel->p1 = iCur;
98999 pLevel->p1 = iCur;
99240 pLevel->p1 = iIdxCur;
99303 pLevel->p1 = regReturn;
99397 pLevel->p1 = iCur;
100102 sqlite3VdbeAddOp2(v, pLevel->op, pLevel->p1, pLevel->p2);
100129 sqlite3VdbeAddOp2(v, OP_Gosub, pLevel->p1, pLevel->addrFirst);
100184 if( pOp->p1!=pLevel->iTabCur ) continue;
100189 pOp->p1 = pLevel->iIdxCur;
100196 pOp->p1 = pLevel->iIdxCur;
109741 char *p1 = *pp1;
109744 while( *p1 || *p2 ){
109748 if( *p1==POS_COLUMN ) sqlite3Fts3GetVarint32(&p1[1], &iCol1);
109749 else if( *p1==POS_END ) iCol1 = POSITION_LIST_END;
109761 p1 += n;
109764 /* At this point, both p1 and p2 point to the start of column-lists
109773 fts3GetDeltaVarint(&p1, &i1);
109779 fts3ReadNextPos(&p1, &i1);
109782 fts3ReadNextPos(&p1, &i1);
109788 p1 += fts3PutColNumber(&p, iCol1);
109789 fts3ColumnlistCopy(&p, &p1);
109798 *pp1 = p1 + 1;
109834 char *p1 = *pp1;
109842 assert( *p1!=0 && *p2!=0 );
109843 if( *p1==POS_COLUMN ){
109844 p1++;
109845 p1 += sqlite3Fts3GetVarint32(p1, &iCol1);
109864 assert( *p1!=POS_END && *p1!=POS_COLUMN );
109866 fts3GetDeltaVarint(&p1, &iPos1); iPos1 -= 2;
109876 fts3PoslistCopy(0, &p1);
109877 *pp1 = p1;
109889 if( (*p1&0xFE)==0 ) break;
109890 fts3GetDeltaVarint(&p1, &iPos1); iPos1 -= 2;
109899 fts3ColumnlistCopy(0, &p1);
109901 assert( (*p1&0xFE)==0 && (*p2&0xFE)==0 );
109902 if( 0==*p1 || 0==*p2 ) break;
109904 p1++;
109905 p1 += sqlite3Fts3GetVarint32(p1, &iCol1);
109910 /* Advance pointer p1 or p2 (whichever corresponds to the smaller of
109916 fts3ColumnlistCopy(0, &p1);
109917 if( 0==*p1 ) break;
109918 p1++;
109919 p1 += sqlite3Fts3GetVarint32(p1, &iCol1);
109929 fts3PoslistCopy(0, &p1);
109930 *pp1 = p1;
109951 char *p1 = *pp1;
109956 *pp1 = p1;
109967 *pp1 = p1;
110023 char *p1 = a1;
110041 fts3GetDeltaVarint2(&p1, pEnd1, &i1);
110047 while( p1 || p2 ){
110048 if( p2 && p1 && i1==i2 ){
110050 if( mergetype==MERGE_POS_OR ) fts3PoslistMerge(&p, &p1, &p2);
110051 fts3GetDeltaVarint2(&p1, pEnd1, &i1);
110053 }else if( !p2 || (p1 && i1<i2) ){
110055 if( mergetype==MERGE_POS_OR ) fts3PoslistCopy(&p, &p1);
110056 fts3GetDeltaVarint2(&p1, pEnd1, &i1);
110066 while( p1 && p2 ){
110069 fts3GetDeltaVarint2(&p1, pEnd1, &i1);
110073 fts3GetDeltaVarint2(&p1, pEnd1, &i1);
110081 while( p1 ){
110083 fts3GetDeltaVarint2(&p1, pEnd1, &i1);
110087 fts3GetDeltaVarint2(&p1, pEnd1, &i1);
110097 while( p1 && p2 ){
110102 if( 0==fts3PoslistPhraseMerge(ppPos, nParam1, 0, 1, &p1, &p2) ){
110108 fts3GetDeltaVarint2(&p1, pEnd1, &i1);
110111 fts3PoslistCopy(0, &p1);
110112 fts3GetDeltaVarint2(&p1, pEnd1, &i1);
110133 while( p1 && p2 ){
110139 if( !fts3PoslistNearMerge(ppPos, aTmp, nParam1, nParam2, &p1, &p2) ){
110144 fts3GetDeltaVarint2(&p1, pEnd1, &i1);
110147 fts3PoslistCopy(0, &p1);
110148 fts3GetDeltaVarint2(&p1, pEnd1, &i1);
114264 const sqlite3_tokenizer_module *p1;
114272 sqlite3Fts3SimpleTokenizerModule(&p1);
114275 assert( p1==p2 );
114282 rc = registerTokenizer(db, "nosuchtokenizer", p1);
114286 assert( p2==p1 );
120588 ** Store the union of cells p1 and p2 in p1.
120590 static void cellUnion(Rtree *pRtree, RtreeCell *p1, RtreeCell *p2){
120594 p1->aCoord[ii].f = MIN(p1->aCoord[ii].f, p2->aCoord[ii].f);
120595 p1->aCoord[ii+1].f = MAX(p1->aCoord[ii+1].f, p2->aCoord[ii+1].f);
120599 p1->aCoord[ii].i = MIN(p1->aCoord[ii].i, p2->aCoord[ii].i);
120600 p1->aCoord[ii+1].i = MAX(p1->aCoord[ii+1].i, p2->aCoord[ii+1].i);
120607 ** by p1. False otherwise.
120609 static int cellContains(Rtree *pRtree, RtreeCell *p1, RtreeCell *p2){
120613 RtreeCoord *a1 = &p1->aCoord[ii];