diff options
Diffstat (limited to 'src/vdbeInt.h')
-rw-r--r-- | src/vdbeInt.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/vdbeInt.h b/src/vdbeInt.h index 2fcd0a448..79b6b51a5 100644 --- a/src/vdbeInt.h +++ b/src/vdbeInt.h @@ -208,6 +208,19 @@ struct Keylist { }; /* +** A Context stores the last insert rowid, the last statement change count, +** and the current statement change count (i.e. changes since last statement). +** Elements of Context structure type make up the ContextStack, which is +** updated by the ContextPush and ContextPop opcodes (used by triggers) +*/ +typedef struct Context Context; +struct Context { + int lastRowid; /* Last insert rowid (from db->lastRowid) */ + int lsChange; /* Last statement change count (from db->lsChange) */ + int csChange; /* Current statement change count (from db->csChange) */ +}; + +/* ** An instance of the virtual machine. This structure contains the complete ** state of the virtual machine. ** @@ -250,6 +263,8 @@ struct Vdbe { Keylist *pList; /* A list of ROWIDs */ int keylistStackDepth; /* The size of the "keylist" stack */ Keylist **keylistStack; /* The stack used by opcodes ListPush & ListPop */ + int contextStackDepth; /* The size of the "context" stack */ + Context *contextStack; /* Stack used by opcodes ContextPush & ContextPop*/ int pc; /* The program counter */ int rc; /* Value to return */ unsigned uniqueCnt; /* Used by OP_MakeRecord when P2!=0 */ |