mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Rearrange fields in the Parse object to reduce the amount of initialization
required. FossilOrigin-Name: 361940b44dd17bf2b39fc0e0716c0de6b2b7f4f7
This commit is contained in:
@@ -2890,7 +2890,6 @@ struct Parse {
|
||||
u8 okConstFactor; /* OK to factor out constants */
|
||||
u8 disableLookaside; /* Number of times lookaside has been disabled */
|
||||
u8 nColCache; /* Number of entries in aColCache[] */
|
||||
int aTempReg[8]; /* Holding area for temporary registers */
|
||||
int nRangeReg; /* Size of the temporary register block */
|
||||
int iRangeReg; /* First register in temporary register block */
|
||||
int nErr; /* Number of errors seen */
|
||||
@@ -2920,8 +2919,6 @@ struct Parse {
|
||||
TableLock *aTableLock; /* Required table locks for shared-cache mode */
|
||||
#endif
|
||||
AutoincInfo *pAinc; /* Information about AUTOINCREMENT counters */
|
||||
|
||||
/* Information used while coding trigger programs. */
|
||||
Parse *pToplevel; /* Parse structure for main program (or NULL) */
|
||||
Table *pTriggerTab; /* Table triggers are being coded for */
|
||||
int addrCrTab; /* Address of OP_CreateTable opcode on CREATE TABLE */
|
||||
@@ -2932,11 +2929,13 @@ struct Parse {
|
||||
u8 eOrconf; /* Default ON CONFLICT policy for trigger steps */
|
||||
u8 disableTriggers; /* True to disable triggers */
|
||||
|
||||
/* The column cache comes at the end of the recursive section
|
||||
** When initializing a new Parse object, the header above, and
|
||||
** the non-recursive part that follows the column cache both need
|
||||
** to be zeroed. But the column cache itself does not need zeroing
|
||||
*/
|
||||
/**************************************************************************
|
||||
** Fields above must be initialized to zero. The fields that follow,
|
||||
** down to the beginning of the recursive section, do not need to be
|
||||
** initialized as they will be set before being used. The boundary is
|
||||
** determined by offsetof(Parse,aColCache).
|
||||
**************************************************************************/
|
||||
|
||||
struct yColCache {
|
||||
int iTable; /* Table cursor number */
|
||||
i16 iColumn; /* Table column number */
|
||||
@@ -2945,6 +2944,9 @@ struct Parse {
|
||||
int iReg; /* Reg with value of this column. 0 means none. */
|
||||
int lru; /* Least recently used entry has the smallest value */
|
||||
} aColCache[SQLITE_N_COLCACHE]; /* One for each column cache entry */
|
||||
int aTempReg[8]; /* Holding area for temporary registers */
|
||||
Token sNameToken; /* Token with unqualified schema object name */
|
||||
Token sLastToken; /* The last token parsed */
|
||||
|
||||
/************************************************************************
|
||||
** Above is constant between recursions. Below is reset before and after
|
||||
@@ -2972,8 +2974,6 @@ struct Parse {
|
||||
Table *pNewTable; /* A table being constructed by CREATE TABLE */
|
||||
Trigger *pNewTrigger; /* Trigger under construct by a CREATE TRIGGER */
|
||||
const char *zAuthContext; /* The 6th parameter to db->xAuth callbacks */
|
||||
Token sNameToken; /* Token with unqualified schema object name */
|
||||
Token sLastToken; /* The last token parsed */
|
||||
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||
Token sArg; /* Complete text of a module argument */
|
||||
Table **apVtabLock; /* Pointer to virtual tables needing locking */
|
||||
|
Reference in New Issue
Block a user