| Index: third_party/sqlite/src/src/vdbe.h
|
| diff --git a/third_party/sqlite/src/src/vdbe.h b/third_party/sqlite/src/src/vdbe.h
|
| index 68a4f6b2a89217a973d60cff81c5091e3d7d85a0..a35f3be3443be2f2554a2cdb25384cfa56fecc13 100644
|
| --- a/third_party/sqlite/src/src/vdbe.h
|
| +++ b/third_party/sqlite/src/src/vdbe.h
|
| @@ -15,8 +15,8 @@
|
| ** or VDBE. The VDBE implements an abstract machine that runs a
|
| ** simple program to access and modify the underlying database.
|
| */
|
| -#ifndef _SQLITE_VDBE_H_
|
| -#define _SQLITE_VDBE_H_
|
| +#ifndef SQLITE_VDBE_H
|
| +#define SQLITE_VDBE_H
|
| #include <stdio.h>
|
|
|
| /*
|
| @@ -41,8 +41,7 @@ typedef struct SubProgram SubProgram;
|
| struct VdbeOp {
|
| u8 opcode; /* What operation to perform */
|
| signed char p4type; /* One of the P4_xxx constants for p4 */
|
| - u8 opflags; /* Mask of the OPFLG_* flags in opcodes.h */
|
| - u8 p5; /* Fifth parameter is an unsigned character */
|
| + u16 p5; /* Fifth parameter is an unsigned 16-bit integer */
|
| int p1; /* First operand */
|
| int p2; /* Second parameter (often the jump destination) */
|
| int p3; /* The third parameter */
|
| @@ -60,6 +59,7 @@ struct VdbeOp {
|
| KeyInfo *pKeyInfo; /* Used when p4type is P4_KEYINFO */
|
| int *ai; /* Used when p4type is P4_INTARRAY */
|
| SubProgram *pProgram; /* Used when p4type is P4_SUBPROGRAM */
|
| + Table *pTab; /* Used when p4type is P4_TABLE */
|
| #ifdef SQLITE_ENABLE_CURSOR_HINTS
|
| Expr *pExpr; /* Used when p4type is P4_EXPR */
|
| #endif
|
| @@ -87,7 +87,6 @@ struct SubProgram {
|
| int nOp; /* Elements in aOp[] */
|
| int nMem; /* Number of memory cells required */
|
| int nCsr; /* Number of cursors required */
|
| - int nOnce; /* Number of OP_Once instructions */
|
| void *token; /* id that may be used to recursive triggers */
|
| SubProgram *pNext; /* Next sub-program already visited */
|
| };
|
| @@ -110,21 +109,21 @@ typedef struct VdbeOpList VdbeOpList;
|
| #define P4_NOTUSED 0 /* The P4 parameter is not used */
|
| #define P4_DYNAMIC (-1) /* Pointer to a string obtained from sqliteMalloc() */
|
| #define P4_STATIC (-2) /* Pointer to a static string */
|
| -#define P4_COLLSEQ (-4) /* P4 is a pointer to a CollSeq structure */
|
| -#define P4_FUNCDEF (-5) /* P4 is a pointer to a FuncDef structure */
|
| -#define P4_KEYINFO (-6) /* P4 is a pointer to a KeyInfo structure */
|
| -#define P4_EXPR (-7) /* P4 is a pointer to an Expr tree */
|
| -#define P4_MEM (-8) /* P4 is a pointer to a Mem* structure */
|
| +#define P4_COLLSEQ (-3) /* P4 is a pointer to a CollSeq structure */
|
| +#define P4_FUNCDEF (-4) /* P4 is a pointer to a FuncDef structure */
|
| +#define P4_KEYINFO (-5) /* P4 is a pointer to a KeyInfo structure */
|
| +#define P4_EXPR (-6) /* P4 is a pointer to an Expr tree */
|
| +#define P4_MEM (-7) /* P4 is a pointer to a Mem* structure */
|
| #define P4_TRANSIENT 0 /* P4 is a pointer to a transient string */
|
| -#define P4_VTAB (-10) /* P4 is a pointer to an sqlite3_vtab structure */
|
| -#define P4_MPRINTF (-11) /* P4 is a string obtained from sqlite3_mprintf() */
|
| -#define P4_REAL (-12) /* P4 is a 64-bit floating point value */
|
| -#define P4_INT64 (-13) /* P4 is a 64-bit signed integer */
|
| -#define P4_INT32 (-14) /* P4 is a 32-bit signed integer */
|
| -#define P4_INTARRAY (-15) /* P4 is a vector of 32-bit integers */
|
| -#define P4_SUBPROGRAM (-18) /* P4 is a pointer to a SubProgram structure */
|
| -#define P4_ADVANCE (-19) /* P4 is a pointer to BtreeNext() or BtreePrev() */
|
| -#define P4_FUNCCTX (-20) /* P4 is a pointer to an sqlite3_context object */
|
| +#define P4_VTAB (-8) /* P4 is a pointer to an sqlite3_vtab structure */
|
| +#define P4_REAL (-9) /* P4 is a 64-bit floating point value */
|
| +#define P4_INT64 (-10) /* P4 is a 64-bit signed integer */
|
| +#define P4_INT32 (-11) /* P4 is a 32-bit signed integer */
|
| +#define P4_INTARRAY (-12) /* P4 is a vector of 32-bit integers */
|
| +#define P4_SUBPROGRAM (-13) /* P4 is a pointer to a SubProgram structure */
|
| +#define P4_ADVANCE (-14) /* P4 is a pointer to BtreeNext() or BtreePrev() */
|
| +#define P4_TABLE (-15) /* P4 is a pointer to a Table structure */
|
| +#define P4_FUNCCTX (-16) /* P4 is a pointer to an sqlite3_context object */
|
|
|
| /* Error message codes for OP_Halt */
|
| #define P5_ConstraintNotNull 1
|
| @@ -180,22 +179,32 @@ int sqlite3VdbeAddOp3(Vdbe*,int,int,int,int);
|
| int sqlite3VdbeAddOp4(Vdbe*,int,int,int,int,const char *zP4,int);
|
| int sqlite3VdbeAddOp4Dup8(Vdbe*,int,int,int,int,const u8*,int);
|
| int sqlite3VdbeAddOp4Int(Vdbe*,int,int,int,int,int);
|
| -int sqlite3VdbeAddOpList(Vdbe*, int nOp, VdbeOpList const *aOp, int iLineno);
|
| +void sqlite3VdbeEndCoroutine(Vdbe*,int);
|
| +#if defined(SQLITE_DEBUG) && !defined(SQLITE_TEST_REALLOC_STRESS)
|
| + void sqlite3VdbeVerifyNoMallocRequired(Vdbe *p, int N);
|
| + void sqlite3VdbeVerifyNoResultRow(Vdbe *p);
|
| +#else
|
| +# define sqlite3VdbeVerifyNoMallocRequired(A,B)
|
| +# define sqlite3VdbeVerifyNoResultRow(A)
|
| +#endif
|
| +VdbeOp *sqlite3VdbeAddOpList(Vdbe*, int nOp, VdbeOpList const *aOp, int iLineno);
|
| void sqlite3VdbeAddParseSchemaOp(Vdbe*,int,char*);
|
| void sqlite3VdbeChangeOpcode(Vdbe*, u32 addr, u8);
|
| void sqlite3VdbeChangeP1(Vdbe*, u32 addr, int P1);
|
| void sqlite3VdbeChangeP2(Vdbe*, u32 addr, int P2);
|
| void sqlite3VdbeChangeP3(Vdbe*, u32 addr, int P3);
|
| -void sqlite3VdbeChangeP5(Vdbe*, u8 P5);
|
| +void sqlite3VdbeChangeP5(Vdbe*, u16 P5);
|
| void sqlite3VdbeJumpHere(Vdbe*, int addr);
|
| -void sqlite3VdbeChangeToNoop(Vdbe*, int addr);
|
| +int sqlite3VdbeChangeToNoop(Vdbe*, int addr);
|
| int sqlite3VdbeDeletePriorOpcode(Vdbe*, u8 op);
|
| void sqlite3VdbeChangeP4(Vdbe*, int addr, const char *zP4, int N);
|
| +void sqlite3VdbeAppendP4(Vdbe*, void *pP4, int p4type);
|
| void sqlite3VdbeSetP4KeyInfo(Parse*, Index*);
|
| void sqlite3VdbeUsesBtree(Vdbe*, int);
|
| VdbeOp *sqlite3VdbeGetOp(Vdbe*, int);
|
| int sqlite3VdbeMakeLabel(Vdbe*);
|
| void sqlite3VdbeRunOnlyOnce(Vdbe*);
|
| +void sqlite3VdbeReusable(Vdbe*);
|
| void sqlite3VdbeDelete(Vdbe*);
|
| void sqlite3VdbeClearObject(sqlite3*,Vdbe*);
|
| void sqlite3VdbeMakeReady(Vdbe*,Parse*);
|
| @@ -225,7 +234,7 @@ int sqlite3MemCompare(const Mem*, const Mem*, const CollSeq*);
|
| void sqlite3VdbeRecordUnpack(KeyInfo*,int,const void*,UnpackedRecord*);
|
| int sqlite3VdbeRecordCompare(int,const void*,UnpackedRecord*);
|
| int sqlite3VdbeRecordCompareWithSkip(int, const void *, UnpackedRecord *, int);
|
| -UnpackedRecord *sqlite3VdbeAllocUnpackedRecord(KeyInfo *, char *, int, char **);
|
| +UnpackedRecord *sqlite3VdbeAllocUnpackedRecord(KeyInfo*);
|
|
|
| typedef int (*RecordCompare)(int,const void*,UnpackedRecord*);
|
| RecordCompare sqlite3VdbeFindCompare(UnpackedRecord*);
|
| @@ -300,4 +309,4 @@ void sqlite3VdbeScanStatus(Vdbe*, int, int, int, LogEst, const char*);
|
| # define sqlite3VdbeScanStatus(a,b,c,d,e)
|
| #endif
|
|
|
| -#endif
|
| +#endif /* SQLITE_VDBE_H */
|
|
|