aboutsummaryrefslogtreecommitdiff
path: root/src/vdbeInt.h
diff options
context:
space:
mode:
authordrh <>2022-01-03 01:43:28 +0000
committerdrh <>2022-01-03 01:43:28 +0000
commitb248668bc9353ce90915b653fbf592d748ccb9d6 (patch)
treee87f559bd1fbfc0c9fd10763c66593b568701ba5 /src/vdbeInt.h
parent80d99e19b69814b7a9bebcc792fc9b7e959bbd0e (diff)
downloadsqlite-b248668bc9353ce90915b653fbf592d748ccb9d6.tar.gz
sqlite-b248668bc9353ce90915b653fbf592d748ccb9d6.zip
Small performance and size optimization to allocateCursor().
FossilOrigin-Name: 23f042669aff535afa6ee9de367656848d01e90a1c9dab9359fa938a615b4195
Diffstat (limited to 'src/vdbeInt.h')
-rw-r--r--src/vdbeInt.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vdbeInt.h b/src/vdbeInt.h
index 481c93ddb..376c9edac 100644
--- a/src/vdbeInt.h
+++ b/src/vdbeInt.h
@@ -75,7 +75,7 @@ typedef struct AuxData AuxData;
typedef struct VdbeCursor VdbeCursor;
struct VdbeCursor {
u8 eCurType; /* One of the CURTYPE_* values above */
- i8 iDb; /* Index of cursor database in db->aDb[] (or -1) */
+ i8 iDb; /* Index of cursor database in db->aDb[] */
u8 nullRow; /* True if pointing to a row with no data */
u8 deferredMoveto; /* A call to sqlite3BtreeMoveto() is needed */
u8 isTable; /* True for rowid tables. False for indexes */
@@ -88,9 +88,11 @@ struct VdbeCursor {
Bool isOrdered:1; /* True if the table is not BTREE_UNORDERED */
Bool hasBeenDuped:1; /* This cursor was source or target of OP_OpenDup */
u16 seekHit; /* See the OP_SeekHit and OP_IfNoHope opcodes */
- Btree *pBtx; /* Separate file holding temporary table */
+ union { /* pBtx for isEphermeral. pAltMap otherwise */
+ Btree *pBtx; /* Separate file holding temporary table */
+ u32 *aAltMap; /* Mapping from table to index column numbers */
+ } ub;
i64 seqCount; /* Sequence counter */
- u32 *aAltMap; /* Mapping from table to index column numbers */
/* Cached OP_Column parse information is only valid if cacheStatus matches
** Vdbe.cacheCtr. Vdbe.cacheCtr will never take on the value of