mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Add new assert() statements, which if they had existed three years ago,
would have detected the code generator problem fixed by the previous check-in. FossilOrigin-Name: 166d1e5d26ef88e995f44182144891f60bd51c1aa585b4a148f01a920b2a8eea
This commit is contained in:
28
src/vdbe.c
28
src/vdbe.c
@@ -1129,7 +1129,7 @@ case OP_Return: { /* in1 */
|
||||
**
|
||||
** See also: EndCoroutine
|
||||
*/
|
||||
case OP_InitCoroutine: { /* jump */
|
||||
case OP_InitCoroutine: { /* jump0 */
|
||||
assert( pOp->p1>0 && pOp->p1<=(p->nMem+1 - p->nCursor) );
|
||||
assert( pOp->p2>=0 && pOp->p2<p->nOp );
|
||||
assert( pOp->p3>=0 && pOp->p3<p->nOp );
|
||||
@@ -1182,7 +1182,7 @@ case OP_EndCoroutine: { /* in1 */
|
||||
**
|
||||
** See also: InitCoroutine
|
||||
*/
|
||||
case OP_Yield: { /* in1, jump */
|
||||
case OP_Yield: { /* in1, jump0 */
|
||||
int pcDest;
|
||||
pIn1 = &aMem[pOp->p1];
|
||||
assert( VdbeMemDynamic(pIn1)==0 );
|
||||
@@ -2041,7 +2041,7 @@ case OP_AddImm: { /* in1 */
|
||||
** without data loss, then jump immediately to P2, or if P2==0
|
||||
** raise an SQLITE_MISMATCH exception.
|
||||
*/
|
||||
case OP_MustBeInt: { /* jump, in1 */
|
||||
case OP_MustBeInt: { /* jump0, in1 */
|
||||
pIn1 = &aMem[pOp->p1];
|
||||
if( (pIn1->flags & MEM_Int)==0 ){
|
||||
applyAffinity(pIn1, SQLITE_AFF_NUMERIC, encoding);
|
||||
@@ -4725,10 +4725,10 @@ case OP_ColumnsUsed: {
|
||||
**
|
||||
** See also: Found, NotFound, SeekGt, SeekGe, SeekLt
|
||||
*/
|
||||
case OP_SeekLT: /* jump, in3, group, ncycle */
|
||||
case OP_SeekLE: /* jump, in3, group, ncycle */
|
||||
case OP_SeekGE: /* jump, in3, group, ncycle */
|
||||
case OP_SeekGT: { /* jump, in3, group, ncycle */
|
||||
case OP_SeekLT: /* jump0, in3, group, ncycle */
|
||||
case OP_SeekLE: /* jump0, in3, group, ncycle */
|
||||
case OP_SeekGE: /* jump0, in3, group, ncycle */
|
||||
case OP_SeekGT: { /* jump0, in3, group, ncycle */
|
||||
int res; /* Comparison result */
|
||||
int oc; /* Opcode */
|
||||
VdbeCursor *pC; /* The cursor to seek */
|
||||
@@ -5395,7 +5395,7 @@ case OP_Found: { /* jump, in3, ncycle */
|
||||
**
|
||||
** See also: Found, NotFound, NoConflict, SeekRowid
|
||||
*/
|
||||
case OP_SeekRowid: { /* jump, in3, ncycle */
|
||||
case OP_SeekRowid: { /* jump0, in3, ncycle */
|
||||
VdbeCursor *pC;
|
||||
BtCursor *pCrsr;
|
||||
int res;
|
||||
@@ -6154,7 +6154,7 @@ case OP_NullRow: {
|
||||
** configured to use Prev, not Next.
|
||||
*/
|
||||
case OP_SeekEnd: /* ncycle */
|
||||
case OP_Last: { /* jump, ncycle */
|
||||
case OP_Last: { /* jump0, ncycle */
|
||||
VdbeCursor *pC;
|
||||
BtCursor *pCrsr;
|
||||
int res;
|
||||
@@ -6271,7 +6271,7 @@ case OP_Sort: { /* jump ncycle */
|
||||
** from the beginning toward the end. In other words, the cursor is
|
||||
** configured to use Next, not Prev.
|
||||
*/
|
||||
case OP_Rewind: { /* jump, ncycle */
|
||||
case OP_Rewind: { /* jump0, ncycle */
|
||||
VdbeCursor *pC;
|
||||
BtCursor *pCrsr;
|
||||
int res;
|
||||
@@ -7279,7 +7279,9 @@ case OP_RowSetTest: { /* jump, in1, in3 */
|
||||
** P1 contains the address of the memory cell that contains the first memory
|
||||
** cell in an array of values used as arguments to the sub-program. P2
|
||||
** contains the address to jump to if the sub-program throws an IGNORE
|
||||
** exception using the RAISE() function. Register P3 contains the address
|
||||
** exception using the RAISE() function. P2 might be zero, if there is
|
||||
** no possibility that an IGNORE exception will be raised.
|
||||
** Register P3 contains the address
|
||||
** of a memory cell in this (the parent) VM that is used to allocate the
|
||||
** memory required by the sub-vdbe at runtime.
|
||||
**
|
||||
@@ -7287,7 +7289,7 @@ case OP_RowSetTest: { /* jump, in1, in3 */
|
||||
**
|
||||
** If P5 is non-zero, then recursive program invocation is enabled.
|
||||
*/
|
||||
case OP_Program: { /* jump */
|
||||
case OP_Program: { /* jump0 */
|
||||
int nMem; /* Number of memory registers for sub-program */
|
||||
int nByte; /* Bytes of runtime space required for sub-program */
|
||||
Mem *pRt; /* Register to allocate runtime space */
|
||||
@@ -8836,7 +8838,7 @@ case OP_Filter: { /* jump */
|
||||
** error is encountered.
|
||||
*/
|
||||
case OP_Trace:
|
||||
case OP_Init: { /* jump */
|
||||
case OP_Init: { /* jump0 */
|
||||
int i;
|
||||
#ifndef SQLITE_OMIT_TRACE
|
||||
char *zTrace;
|
||||
|
Reference in New Issue
Block a user