Reorder the fields in private structures in an effort to reduce alignment
gaps and thus make the structures smaller, and to put frequently accessed fields first. Also update some obsolete comments. Valgrind shows a very slight performance improvement. FossilOrigin-Name: 378a1d13af4a6f4cb2bfa65944b3b0d444b9f21c
This commit is contained in:
parent
b7787eef7a
commit
2e5de2f2b3
22
manifest
22
manifest
@ -1,8 +1,8 @@
|
|||||||
-----BEGIN PGP SIGNED MESSAGE-----
|
-----BEGIN PGP SIGNED MESSAGE-----
|
||||||
Hash: SHA1
|
Hash: SHA1
|
||||||
|
|
||||||
C Enhance\sthe\sshowdb\stool\sto\sshow\soverflow\spage\spointers\sat\sthe\send\sof\noverflow\scells.
|
C Reorder\sthe\sfields\sin\sprivate\sstructures\sin\san\seffort\sto\sreduce\salignment\ngaps\sand\sthus\smake\sthe\sstructures\ssmaller,\sand\sto\sput\sfrequently\saccessed\nfields\sfirst.\s\sAlso\supdate\ssome\sobsolete\scomments.\s\sValgrind\sshows\sa\svery\nslight\sperformance\simprovement.
|
||||||
D 2011-01-06T15:51:19
|
D 2011-01-07T02:50:40
|
||||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||||
F Makefile.in de6498556d536ae60bb8bb10e8c1ba011448658c
|
F Makefile.in de6498556d536ae60bb8bb10e8c1ba011448658c
|
||||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||||
@ -124,7 +124,7 @@ F src/bitvec.c af50f1c8c0ff54d6bdb7a80e2fceca5a93670bef
|
|||||||
F src/btmutex.c 96a12f50f7a17475155971a241d85ec5171573ff
|
F src/btmutex.c 96a12f50f7a17475155971a241d85ec5171573ff
|
||||||
F src/btree.c b70bf1dc563ec532851715ce51aa1ea0c0c592b9
|
F src/btree.c b70bf1dc563ec532851715ce51aa1ea0c0c592b9
|
||||||
F src/btree.h 10f9296bf4edf034f5adce921b7b4383a56a1c90
|
F src/btree.h 10f9296bf4edf034f5adce921b7b4383a56a1c90
|
||||||
F src/btreeInt.h c424f2f131cc61ddf130f9bd736b3df12c8a51f0
|
F src/btreeInt.h 20f73dc93b1eeb83afd7259fbc6bd7dcf2df7fe4
|
||||||
F src/build.c 00a327120d81ace6267e714ae8010c997d55de5d
|
F src/build.c 00a327120d81ace6267e714ae8010c997d55de5d
|
||||||
F src/callback.c a1d1b1c9c85415dff013af033e2fed9c8382d33b
|
F src/callback.c a1d1b1c9c85415dff013af033e2fed9c8382d33b
|
||||||
F src/complete.c dc1d136c0feee03c2f7550bafc0d29075e36deac
|
F src/complete.c dc1d136c0feee03c2f7550bafc0d29075e36deac
|
||||||
@ -233,8 +233,8 @@ F src/util.c ab1c92426494f499f42b9e307537b03e923d75c1
|
|||||||
F src/vacuum.c 924bd1bcee2dfb05376f79845bd3b4cec7b54b2f
|
F src/vacuum.c 924bd1bcee2dfb05376f79845bd3b4cec7b54b2f
|
||||||
F src/vdbe.c 5d310eaf1a4d8383602126fa82e01291ab7d3cf3
|
F src/vdbe.c 5d310eaf1a4d8383602126fa82e01291ab7d3cf3
|
||||||
F src/vdbe.h 4de0efb4b0fdaaa900cf419b35c458933ef1c6d2
|
F src/vdbe.h 4de0efb4b0fdaaa900cf419b35c458933ef1c6d2
|
||||||
F src/vdbeInt.h 1f2137b905969f4de0648256aeb73abdf88f9213
|
F src/vdbeInt.h 6e6f28e9bccc6c703dca1372fd661c57b5c15fb0
|
||||||
F src/vdbeapi.c fb0036185b3c56e15916a5ee96309cd4acf6818f
|
F src/vdbeapi.c 0f898cc77099f0b0b4d6a045e905c3501f9c8b27
|
||||||
F src/vdbeaux.c 33448d23b857654dd69ed2103611f5c733606f68
|
F src/vdbeaux.c 33448d23b857654dd69ed2103611f5c733606f68
|
||||||
F src/vdbeblob.c 18955f0ee6b133cd08e1592010cb9a6b11e9984c
|
F src/vdbeblob.c 18955f0ee6b133cd08e1592010cb9a6b11e9984c
|
||||||
F src/vdbemem.c 411649a35686f54268ccabeda175322c4697f5a6
|
F src/vdbemem.c 411649a35686f54268ccabeda175322c4697f5a6
|
||||||
@ -898,14 +898,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
|||||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||||
P 57ffa07e26a26d2f4527c8e6d7a9c1f48f380bf7
|
P cda5eab18f48d3836dfd3e1f8c76e5f83b43485f
|
||||||
R d89e08a20775097580ea6af4c734a279
|
R b6bb91d8008f3bd40fbfcc333ed6ae8d
|
||||||
U drh
|
U drh
|
||||||
Z 423cd0f908ca695200442e25ae6188b4
|
Z b9332de9f4f0b427c676c0d723aec735
|
||||||
-----BEGIN PGP SIGNATURE-----
|
-----BEGIN PGP SIGNATURE-----
|
||||||
Version: GnuPG v1.4.6 (GNU/Linux)
|
Version: GnuPG v1.4.6 (GNU/Linux)
|
||||||
|
|
||||||
iD8DBQFNJeT6oxKgR168RlERAqIMAJ0R7uEoG6ZDNI1Fi1NrZqeT9QSTlACfX5On
|
iD8DBQFNJn+EoxKgR168RlERArozAJ488YVf31pNpQTakJkJq0sV2ZJnxQCfW6sh
|
||||||
3pJ6qRdQvw3bEFgCv0on13s=
|
hZ8upDwsMRzRPHR7Truah5Q=
|
||||||
=XUQa
|
=G69s
|
||||||
-----END PGP SIGNATURE-----
|
-----END PGP SIGNATURE-----
|
||||||
|
@ -1 +1 @@
|
|||||||
cda5eab18f48d3836dfd3e1f8c76e5f83b43485f
|
378a1d13af4a6f4cb2bfa65944b3b0d444b9f21c
|
@ -414,12 +414,12 @@ struct BtShared {
|
|||||||
u8 autoVacuum; /* True if auto-vacuum is enabled */
|
u8 autoVacuum; /* True if auto-vacuum is enabled */
|
||||||
u8 incrVacuum; /* True if incr-vacuum is enabled */
|
u8 incrVacuum; /* True if incr-vacuum is enabled */
|
||||||
#endif
|
#endif
|
||||||
|
u8 inTransaction; /* Transaction state */
|
||||||
|
u8 doNotUseWAL; /* If true, do not open write-ahead-log file */
|
||||||
u16 maxLocal; /* Maximum local payload in non-LEAFDATA tables */
|
u16 maxLocal; /* Maximum local payload in non-LEAFDATA tables */
|
||||||
u16 minLocal; /* Minimum local payload in non-LEAFDATA tables */
|
u16 minLocal; /* Minimum local payload in non-LEAFDATA tables */
|
||||||
u16 maxLeaf; /* Maximum local payload in a LEAFDATA table */
|
u16 maxLeaf; /* Maximum local payload in a LEAFDATA table */
|
||||||
u16 minLeaf; /* Minimum local payload in a LEAFDATA table */
|
u16 minLeaf; /* Minimum local payload in a LEAFDATA table */
|
||||||
u8 inTransaction; /* Transaction state */
|
|
||||||
u8 doNotUseWAL; /* If true, do not open write-ahead-log file */
|
|
||||||
u32 pageSize; /* Total number of bytes on a page */
|
u32 pageSize; /* Total number of bytes on a page */
|
||||||
u32 usableSize; /* Number of usable bytes on each page */
|
u32 usableSize; /* Number of usable bytes on each page */
|
||||||
int nTransaction; /* Number of open transactions (read + write) */
|
int nTransaction; /* Number of open transactions (read + write) */
|
||||||
@ -446,8 +446,8 @@ struct BtShared {
|
|||||||
*/
|
*/
|
||||||
typedef struct CellInfo CellInfo;
|
typedef struct CellInfo CellInfo;
|
||||||
struct CellInfo {
|
struct CellInfo {
|
||||||
u8 *pCell; /* Pointer to the start of cell content */
|
|
||||||
i64 nKey; /* The key for INTKEY tables, or number of bytes in key */
|
i64 nKey; /* The key for INTKEY tables, or number of bytes in key */
|
||||||
|
u8 *pCell; /* Pointer to the start of cell content */
|
||||||
u32 nData; /* Number of bytes of data */
|
u32 nData; /* Number of bytes of data */
|
||||||
u32 nPayload; /* Total amount of payload */
|
u32 nPayload; /* Total amount of payload */
|
||||||
u16 nHeader; /* Size of the cell content header in bytes */
|
u16 nHeader; /* Size of the cell content header in bytes */
|
||||||
@ -489,20 +489,20 @@ struct BtCursor {
|
|||||||
Pgno pgnoRoot; /* The root page of this tree */
|
Pgno pgnoRoot; /* The root page of this tree */
|
||||||
sqlite3_int64 cachedRowid; /* Next rowid cache. 0 means not valid */
|
sqlite3_int64 cachedRowid; /* Next rowid cache. 0 means not valid */
|
||||||
CellInfo info; /* A parse of the cell we are pointing at */
|
CellInfo info; /* A parse of the cell we are pointing at */
|
||||||
|
i64 nKey; /* Size of pKey, or last integer key */
|
||||||
|
void *pKey; /* Saved key that was cursor's last known position */
|
||||||
|
int skipNext; /* Prev() is noop if negative. Next() is noop if positive */
|
||||||
u8 wrFlag; /* True if writable */
|
u8 wrFlag; /* True if writable */
|
||||||
u8 atLast; /* Cursor pointing to the last entry */
|
u8 atLast; /* Cursor pointing to the last entry */
|
||||||
u8 validNKey; /* True if info.nKey is valid */
|
u8 validNKey; /* True if info.nKey is valid */
|
||||||
u8 eState; /* One of the CURSOR_XXX constants (see below) */
|
u8 eState; /* One of the CURSOR_XXX constants (see below) */
|
||||||
void *pKey; /* Saved key that was cursor's last known position */
|
|
||||||
i64 nKey; /* Size of pKey, or last integer key */
|
|
||||||
int skipNext; /* Prev() is noop if negative. Next() is noop if positive */
|
|
||||||
#ifndef SQLITE_OMIT_INCRBLOB
|
#ifndef SQLITE_OMIT_INCRBLOB
|
||||||
u8 isIncrblobHandle; /* True if this cursor is an incr. io handle */
|
|
||||||
Pgno *aOverflow; /* Cache of overflow page locations */
|
Pgno *aOverflow; /* Cache of overflow page locations */
|
||||||
|
u8 isIncrblobHandle; /* True if this cursor is an incr. io handle */
|
||||||
#endif
|
#endif
|
||||||
i16 iPage; /* Index of current page in apPage */
|
i16 iPage; /* Index of current page in apPage */
|
||||||
MemPage *apPage[BTCURSOR_MAX_DEPTH]; /* Pages from root to current page */
|
|
||||||
u16 aiIdx[BTCURSOR_MAX_DEPTH]; /* Current index in apPage[i] */
|
u16 aiIdx[BTCURSOR_MAX_DEPTH]; /* Current index in apPage[i] */
|
||||||
|
MemPage *apPage[BTCURSOR_MAX_DEPTH]; /* Pages from root to current page */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -39,16 +39,14 @@ typedef unsigned char Bool;
|
|||||||
**
|
**
|
||||||
** Every cursor that the virtual machine has open is represented by an
|
** Every cursor that the virtual machine has open is represented by an
|
||||||
** instance of the following structure.
|
** instance of the following structure.
|
||||||
**
|
|
||||||
** If the VdbeCursor.isTriggerRow flag is set it means that this cursor is
|
|
||||||
** really a single row that represents the NEW or OLD pseudo-table of
|
|
||||||
** a row trigger. The data for the row is stored in VdbeCursor.pData and
|
|
||||||
** the rowid is in VdbeCursor.iKey.
|
|
||||||
*/
|
*/
|
||||||
struct VdbeCursor {
|
struct VdbeCursor {
|
||||||
BtCursor *pCursor; /* The cursor structure of the backend */
|
BtCursor *pCursor; /* The cursor structure of the backend */
|
||||||
|
Btree *pBt; /* Separate file holding temporary table */
|
||||||
|
KeyInfo *pKeyInfo; /* Info about index keys needed by index cursors */
|
||||||
int iDb; /* Index of cursor database in db->aDb[] (or -1) */
|
int iDb; /* Index of cursor database in db->aDb[] (or -1) */
|
||||||
i64 lastRowid; /* Last rowid from a Next or NextIdx operation */
|
int pseudoTableReg; /* Register holding pseudotable content. */
|
||||||
|
int nField; /* Number of fields in the header */
|
||||||
Bool zeroed; /* True if zeroed out and ready for reuse */
|
Bool zeroed; /* True if zeroed out and ready for reuse */
|
||||||
Bool rowidIsValid; /* True if lastRowid is valid */
|
Bool rowidIsValid; /* True if lastRowid is valid */
|
||||||
Bool atFirst; /* True if pointing to first entry */
|
Bool atFirst; /* True if pointing to first entry */
|
||||||
@ -58,14 +56,11 @@ struct VdbeCursor {
|
|||||||
Bool isTable; /* True if a table requiring integer keys */
|
Bool isTable; /* True if a table requiring integer keys */
|
||||||
Bool isIndex; /* True if an index containing keys only - no data */
|
Bool isIndex; /* True if an index containing keys only - no data */
|
||||||
Bool isOrdered; /* True if the underlying table is BTREE_UNORDERED */
|
Bool isOrdered; /* True if the underlying table is BTREE_UNORDERED */
|
||||||
i64 movetoTarget; /* Argument to the deferred sqlite3BtreeMoveto() */
|
|
||||||
Btree *pBt; /* Separate file holding temporary table */
|
|
||||||
int pseudoTableReg; /* Register holding pseudotable content. */
|
|
||||||
KeyInfo *pKeyInfo; /* Info about index keys needed by index cursors */
|
|
||||||
int nField; /* Number of fields in the header */
|
|
||||||
i64 seqCount; /* Sequence counter */
|
|
||||||
sqlite3_vtab_cursor *pVtabCursor; /* The cursor for a virtual table */
|
sqlite3_vtab_cursor *pVtabCursor; /* The cursor for a virtual table */
|
||||||
const sqlite3_module *pModule; /* Module for cursor pVtabCursor */
|
const sqlite3_module *pModule; /* Module for cursor pVtabCursor */
|
||||||
|
i64 seqCount; /* Sequence counter */
|
||||||
|
i64 movetoTarget; /* Argument to the deferred sqlite3BtreeMoveto() */
|
||||||
|
i64 lastRowid; /* Last rowid from a Next or NextIdx operation */
|
||||||
|
|
||||||
/* Result of last sqlite3BtreeMoveto() done by an OP_NotExists or
|
/* Result of last sqlite3BtreeMoveto() done by an OP_NotExists or
|
||||||
** OP_IsUnique opcode on this cursor. */
|
** OP_IsUnique opcode on this cursor. */
|
||||||
@ -137,25 +132,19 @@ struct VdbeFrame {
|
|||||||
/*
|
/*
|
||||||
** Internally, the vdbe manipulates nearly all SQL values as Mem
|
** Internally, the vdbe manipulates nearly all SQL values as Mem
|
||||||
** structures. Each Mem struct may cache multiple representations (string,
|
** structures. Each Mem struct may cache multiple representations (string,
|
||||||
** integer etc.) of the same value. A value (and therefore Mem structure)
|
** integer etc.) of the same value.
|
||||||
** has the following properties:
|
|
||||||
**
|
|
||||||
** Each value has a manifest type. The manifest type of the value stored
|
|
||||||
** in a Mem struct is returned by the MemType(Mem*) macro. The type is
|
|
||||||
** one of SQLITE_NULL, SQLITE_INTEGER, SQLITE_REAL, SQLITE_TEXT or
|
|
||||||
** SQLITE_BLOB.
|
|
||||||
*/
|
*/
|
||||||
struct Mem {
|
struct Mem {
|
||||||
|
sqlite3 *db; /* The associated database connection */
|
||||||
|
char *z; /* String or BLOB value */
|
||||||
|
double r; /* Real value */
|
||||||
union {
|
union {
|
||||||
i64 i; /* Integer value. */
|
i64 i; /* Integer value used when MEM_Int is set in flags */
|
||||||
int nZero; /* Used when bit MEM_Zero is set in flags */
|
int nZero; /* Used when bit MEM_Zero is set in flags */
|
||||||
FuncDef *pDef; /* Used only when flags==MEM_Agg */
|
FuncDef *pDef; /* Used only when flags==MEM_Agg */
|
||||||
RowSet *pRowSet; /* Used only when flags==MEM_RowSet */
|
RowSet *pRowSet; /* Used only when flags==MEM_RowSet */
|
||||||
VdbeFrame *pFrame; /* Used when flags==MEM_Frame */
|
VdbeFrame *pFrame; /* Used when flags==MEM_Frame */
|
||||||
} u;
|
} u;
|
||||||
double r; /* Real value */
|
|
||||||
sqlite3 *db; /* The associated database connection */
|
|
||||||
char *z; /* String or BLOB value */
|
|
||||||
int n; /* Number of characters in string value, excluding '\0' */
|
int n; /* Number of characters in string value, excluding '\0' */
|
||||||
u16 flags; /* Some combination of MEM_Null, MEM_Str, MEM_Dyn, etc. */
|
u16 flags; /* Some combination of MEM_Null, MEM_Str, MEM_Dyn, etc. */
|
||||||
u8 type; /* One of SQLITE_NULL, SQLITE_TEXT, SQLITE_INTEGER, etc */
|
u8 type; /* One of SQLITE_NULL, SQLITE_TEXT, SQLITE_INTEGER, etc */
|
||||||
@ -179,9 +168,6 @@ struct Mem {
|
|||||||
** database (see below for exceptions). If the MEM_Term flag is also
|
** database (see below for exceptions). If the MEM_Term flag is also
|
||||||
** set, then the string is nul terminated. The MEM_Int and MEM_Real
|
** set, then the string is nul terminated. The MEM_Int and MEM_Real
|
||||||
** flags may coexist with the MEM_Str flag.
|
** flags may coexist with the MEM_Str flag.
|
||||||
**
|
|
||||||
** Multiple of these values can appear in Mem.flags. But only one
|
|
||||||
** at a time can appear in Mem.type.
|
|
||||||
*/
|
*/
|
||||||
#define MEM_Null 0x0001 /* Value is NULL */
|
#define MEM_Null 0x0001 /* Value is NULL */
|
||||||
#define MEM_Str 0x0002 /* Value is a string */
|
#define MEM_Str 0x0002 /* Value is a string */
|
||||||
@ -264,23 +250,11 @@ struct sqlite3_context {
|
|||||||
CollSeq *pColl; /* Collating sequence */
|
CollSeq *pColl; /* Collating sequence */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
** A Set structure is used for quick testing to see if a value
|
|
||||||
** is part of a small set. Sets are used to implement code like
|
|
||||||
** this:
|
|
||||||
** x.y IN ('hi','hoo','hum')
|
|
||||||
*/
|
|
||||||
typedef struct Set Set;
|
|
||||||
struct Set {
|
|
||||||
Hash hash; /* A set is just a hash table */
|
|
||||||
HashElem *prev; /* Previously accessed hash elemen */
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** An instance of the virtual machine. This structure contains the complete
|
** An instance of the virtual machine. This structure contains the complete
|
||||||
** state of the virtual machine.
|
** state of the virtual machine.
|
||||||
**
|
**
|
||||||
** The "sqlite3_stmt" structure pointer that is returned by sqlite3_compile()
|
** The "sqlite3_stmt" structure pointer that is returned by sqlite3_prepare()
|
||||||
** is really a pointer to an instance of this structure.
|
** is really a pointer to an instance of this structure.
|
||||||
**
|
**
|
||||||
** The Vdbe.inVtabMethod variable is set to non-zero for the duration of
|
** The Vdbe.inVtabMethod variable is set to non-zero for the duration of
|
||||||
@ -293,31 +267,31 @@ struct Set {
|
|||||||
*/
|
*/
|
||||||
struct Vdbe {
|
struct Vdbe {
|
||||||
sqlite3 *db; /* The database connection that owns this statement */
|
sqlite3 *db; /* The database connection that owns this statement */
|
||||||
Vdbe *pPrev,*pNext; /* Linked list of VDBEs with the same Vdbe.db */
|
|
||||||
int nOp; /* Number of instructions in the program */
|
|
||||||
int nOpAlloc; /* Number of slots allocated for aOp[] */
|
|
||||||
Op *aOp; /* Space to hold the virtual machine's program */
|
Op *aOp; /* Space to hold the virtual machine's program */
|
||||||
int nLabel; /* Number of labels used */
|
Mem *aMem; /* The memory locations */
|
||||||
int nLabelAlloc; /* Number of slots allocated in aLabel[] */
|
|
||||||
int *aLabel; /* Space to hold the labels */
|
|
||||||
Mem **apArg; /* Arguments to currently executing user function */
|
Mem **apArg; /* Arguments to currently executing user function */
|
||||||
Mem *aColName; /* Column names to return */
|
Mem *aColName; /* Column names to return */
|
||||||
Mem *pResultSet; /* Pointer to an array of results */
|
Mem *pResultSet; /* Pointer to an array of results */
|
||||||
|
int nMem; /* Number of memory locations currently allocated */
|
||||||
|
int nOp; /* Number of instructions in the program */
|
||||||
|
int nOpAlloc; /* Number of slots allocated for aOp[] */
|
||||||
|
int nLabel; /* Number of labels used */
|
||||||
|
int nLabelAlloc; /* Number of slots allocated in aLabel[] */
|
||||||
|
int *aLabel; /* Space to hold the labels */
|
||||||
u16 nResColumn; /* Number of columns in one row of the result set */
|
u16 nResColumn; /* Number of columns in one row of the result set */
|
||||||
u16 nCursor; /* Number of slots in apCsr[] */
|
u16 nCursor; /* Number of slots in apCsr[] */
|
||||||
|
u32 magic; /* Magic number for sanity checking */
|
||||||
|
char *zErrMsg; /* Error message written here */
|
||||||
|
Vdbe *pPrev,*pNext; /* Linked list of VDBEs with the same Vdbe.db */
|
||||||
VdbeCursor **apCsr; /* One element of this array for each open cursor */
|
VdbeCursor **apCsr; /* One element of this array for each open cursor */
|
||||||
u8 errorAction; /* Recovery action to do in case of an error */
|
|
||||||
u8 okVar; /* True if azVar[] has been initialized */
|
|
||||||
ynVar nVar; /* Number of entries in aVar[] */
|
|
||||||
Mem *aVar; /* Values for the OP_Variable opcode. */
|
Mem *aVar; /* Values for the OP_Variable opcode. */
|
||||||
char **azVar; /* Name of variables */
|
char **azVar; /* Name of variables */
|
||||||
u32 magic; /* Magic number for sanity checking */
|
ynVar nVar; /* Number of entries in aVar[] */
|
||||||
int nMem; /* Number of memory locations currently allocated */
|
|
||||||
Mem *aMem; /* The memory locations */
|
|
||||||
u32 cacheCtr; /* VdbeCursor row cache generation counter */
|
u32 cacheCtr; /* VdbeCursor row cache generation counter */
|
||||||
int pc; /* The program counter */
|
int pc; /* The program counter */
|
||||||
int rc; /* Value to return */
|
int rc; /* Value to return */
|
||||||
char *zErrMsg; /* Error message written here */
|
u8 errorAction; /* Recovery action to do in case of an error */
|
||||||
|
u8 okVar; /* True if azVar[] has been initialized */
|
||||||
u8 explain; /* True if EXPLAIN present on SQL command */
|
u8 explain; /* True if EXPLAIN present on SQL command */
|
||||||
u8 changeCntOn; /* True to update the change-counter */
|
u8 changeCntOn; /* True to update the change-counter */
|
||||||
u8 expired; /* True if the VM needs to be recompiled */
|
u8 expired; /* True if the VM needs to be recompiled */
|
||||||
@ -329,14 +303,16 @@ struct Vdbe {
|
|||||||
u8 isPrepareV2; /* True if prepared with prepare_v2() */
|
u8 isPrepareV2; /* True if prepared with prepare_v2() */
|
||||||
int nChange; /* Number of db changes made since last reset */
|
int nChange; /* Number of db changes made since last reset */
|
||||||
int btreeMask; /* Bitmask of db->aDb[] entries referenced */
|
int btreeMask; /* Bitmask of db->aDb[] entries referenced */
|
||||||
i64 startTime; /* Time when query started - used for profiling */
|
int iStatement; /* Statement number (or 0 if has not opened stmt) */
|
||||||
BtreeMutexArray aMutex; /* An array of Btree used here and needing locks */
|
|
||||||
int aCounter[3]; /* Counters used by sqlite3_stmt_status() */
|
int aCounter[3]; /* Counters used by sqlite3_stmt_status() */
|
||||||
char *zSql; /* Text of the SQL statement that generated this */
|
BtreeMutexArray aMutex; /* An array of Btree used here and needing locks */
|
||||||
void *pFree; /* Free this when deleting the vdbe */
|
#ifndef SQLITE_OMIT_TRACE
|
||||||
|
i64 startTime; /* Time when query started - used for profiling */
|
||||||
|
#endif
|
||||||
i64 nFkConstraint; /* Number of imm. FK constraints this VM */
|
i64 nFkConstraint; /* Number of imm. FK constraints this VM */
|
||||||
i64 nStmtDefCons; /* Number of def. constraints when stmt started */
|
i64 nStmtDefCons; /* Number of def. constraints when stmt started */
|
||||||
int iStatement; /* Statement number (or 0 if has not opened stmt) */
|
char *zSql; /* Text of the SQL statement that generated this */
|
||||||
|
void *pFree; /* Free this when deleting the vdbe */
|
||||||
#ifdef SQLITE_DEBUG
|
#ifdef SQLITE_DEBUG
|
||||||
FILE *trace; /* Write an execution trace here, if not NULL */
|
FILE *trace; /* Write an execution trace here, if not NULL */
|
||||||
#endif
|
#endif
|
||||||
|
@ -685,7 +685,7 @@ static Mem *columnMem(sqlite3_stmt *pStmt, int i){
|
|||||||
#if defined(SQLITE_DEBUG) && defined(__GNUC__)
|
#if defined(SQLITE_DEBUG) && defined(__GNUC__)
|
||||||
__attribute__((aligned(8)))
|
__attribute__((aligned(8)))
|
||||||
#endif
|
#endif
|
||||||
= {{0}, (double)0, 0, "", 0, MEM_Null, SQLITE_NULL, 0, 0, 0 };
|
= {0, "", (double)0, {0}, 0, MEM_Null, SQLITE_NULL, 0, 0, 0 };
|
||||||
|
|
||||||
if( pVm && ALWAYS(pVm->db) ){
|
if( pVm && ALWAYS(pVm->db) ){
|
||||||
sqlite3_mutex_enter(pVm->db->mutex);
|
sqlite3_mutex_enter(pVm->db->mutex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user