mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Improved comments and function names. No logic changes.
FossilOrigin-Name: 8f460b3b15bf4b88a224907d2f83e4ed6bf84d6b3f480008a1b187ea49c6ce1d
This commit is contained in:
@@ -1189,7 +1189,7 @@ typedef struct FuncDef FuncDef;
|
||||
typedef struct FuncDefHash FuncDefHash;
|
||||
typedef struct IdList IdList;
|
||||
typedef struct Index Index;
|
||||
typedef struct IndexExpr IndexExpr;
|
||||
typedef struct IndexedExpr IndexedExpr;
|
||||
typedef struct IndexSample IndexSample;
|
||||
typedef struct KeyClass KeyClass;
|
||||
typedef struct KeyInfo KeyInfo;
|
||||
@@ -2617,7 +2617,8 @@ struct Index {
|
||||
unsigned bNoQuery:1; /* Do not use this index to optimize queries */
|
||||
unsigned bAscKeyBug:1; /* True if the bba7b69f9849b5bf bug applies */
|
||||
unsigned bHasVCol:1; /* Index references one or more VIRTUAL columns */
|
||||
unsigned bHasExpr:1; /* This is an index on an expression */
|
||||
unsigned bHasExpr:1; /* Index contains an expression, either a literal
|
||||
** expression, or a reference to a VIRTUAL column */
|
||||
#ifdef SQLITE_ENABLE_STAT4
|
||||
int nSample; /* Number of elements in aSample[] */
|
||||
int nSampleCol; /* Size of IndexSample.anEq[] and so on */
|
||||
@@ -3566,21 +3567,22 @@ struct TriggerPrg {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** If there is an index on an expression in scope such that the value
|
||||
** of the expression pExpr can be read out of the index with cursor iCur
|
||||
** at column iCol, then an instance of this object records that fact.
|
||||
** For each index X that has as one of its arguments either an expression
|
||||
** or the name of a virtual generated column, and if X is in scope such that
|
||||
** the value of the expression can simply be read from the index, then
|
||||
** there is an instance of this object on the Parse.pIdxExpr list.
|
||||
**
|
||||
** A linked list of these objects is attached to Parse and records all
|
||||
** expressions that can be short-circuited by extracting a valid from
|
||||
** an index.
|
||||
** During code generation, while generating code to evaluate expressions,
|
||||
** this list is consulted and if a matching expression is found, the value
|
||||
** is read from the index rather than being recomputed.
|
||||
*/
|
||||
struct IndexExpr {
|
||||
struct IndexedExpr {
|
||||
Expr *pExpr; /* The expression contained in the index */
|
||||
int iDataCur; /* The data cursor associated with the index */
|
||||
int iIdxCur; /* The index cursor */
|
||||
int iIdxCol; /* The column of the index that contains pExpr */
|
||||
int iIdxCol; /* The index column that contains value of pExpr */
|
||||
u8 bMaybeNullRow; /* True if we need an OP_IfNullRow check */
|
||||
IndexExpr *pIENext; /* Next in a list of all indexed expressions */
|
||||
IndexedExpr *pIENext; /* Next in a list of all indexed expressions */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -3641,7 +3643,7 @@ struct Parse {
|
||||
int nLabelAlloc; /* Number of slots in aLabel */
|
||||
int *aLabel; /* Space to hold the labels */
|
||||
ExprList *pConstExpr;/* Constant expressions */
|
||||
IndexExpr *pIdxExpr; /* List of all expression in active indexes */
|
||||
IndexedExpr *pIdxExpr;/* List of expressions used by active indexes */
|
||||
Token constraintName;/* Name of the constraint currently being parsed */
|
||||
yDbMask writeMask; /* Start a write transaction on these databases */
|
||||
yDbMask cookieMask; /* Bitmask of schema verified databases */
|
||||
|
||||
Reference in New Issue
Block a user