diff options
author | drh <drh@noemail.net> | 2019-02-08 14:55:30 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2019-02-08 14:55:30 +0000 |
commit | 1cf197583de15d352dc169437f619d2e4631cf4b (patch) | |
tree | fdb5c38ef260c5263604a91f905fe51394d0148b /src/sqliteInt.h | |
parent | 8851e10017893cfaf88acf80e223149fea1a1a37 (diff) | |
download | sqlite-1cf197583de15d352dc169437f619d2e4631cf4b.tar.gz sqlite-1cf197583de15d352dc169437f619d2e4631cf4b.zip |
Give the sqlite3 object a pointer to the current Parse so that if an OOM
occurs, it can automatically set the Parse.rc value to SQLITE_NOMEM. This
avoids a frequent extra test of db.mallocFailed in the innermost parser loop.
FossilOrigin-Name: 5c6638040b3017c6be016441422d965a3ca00dd6ae1f78cadc0b54562978f64e
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 774d3e501..e56867775 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -1431,6 +1431,7 @@ struct sqlite3 { void (*xRollbackCallback)(void*); /* Invoked at every commit. */ void *pUpdateArg; void (*xUpdateCallback)(void*,int, const char*,const char*,sqlite_int64); + Parse *pParse; /* Current parse */ #ifdef SQLITE_ENABLE_PREUPDATE_HOOK void *pPreUpdateArg; /* First argument to xPreUpdateCallback */ void (*xPreUpdateCallback)( /* Registered using sqlite3_preupdate_hook() */ @@ -3094,6 +3095,7 @@ struct Parse { AutoincInfo *pAinc; /* Information about AUTOINCREMENT counters */ Parse *pToplevel; /* Parse structure for main program (or NULL) */ Table *pTriggerTab; /* Table triggers are being coded for */ + Parse *pParentParse; /* Parent parser if this parser is nested */ int addrCrTab; /* Address of OP_CreateBtree opcode on CREATE TABLE */ u32 nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */ u32 oldmask; /* Mask of old.* columns referenced */ |