diff options
author | drh <drh@noemail.net> | 2018-12-29 02:26:59 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2018-12-29 02:26:59 +0000 |
commit | ec4ccdbcb1bd9d129888b38f209ed36bbe38a5d8 (patch) | |
tree | aff455cde56406dac489f5097da7ff4eaa480ebb /src/update.c | |
parent | 81f9159b5ec0e19d9aafee9c03a13bc4e7735cd8 (diff) | |
download | sqlite-ec4ccdbcb1bd9d129888b38f209ed36bbe38a5d8.tar.gz sqlite-ec4ccdbcb1bd9d129888b38f209ed36bbe38a5d8.zip |
A new implementation of sqlite3VdbeMakeLabel() is faster and makes fewer
memory allocations by deferring memory allocation until
sqlite3VdbeResolveLabel() is called, at which point the code generator has
a better idea of how big the relocation table needs to be.
The sqlite3VdbeMakeLabel() routine now takes a Parse* parameter instead of
Vdbe*.
FossilOrigin-Name: 4a0929ac76d8aa5dd65eac3b83d6bbf41e505e01d175ca0fb2b19ba02d439415
Diffstat (limited to 'src/update.c')
-rw-r--r-- | src/update.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/update.c b/src/update.c index 70f4f676d..0cf15a091 100644 --- a/src/update.c +++ b/src/update.c @@ -441,7 +441,7 @@ void sqlite3Update( #endif /* Jump to labelBreak to abandon further processing of this UPDATE */ - labelContinue = labelBreak = sqlite3VdbeMakeLabel(v); + labelContinue = labelBreak = sqlite3VdbeMakeLabel(pParse); /* Not an UPSERT. Normal processing. Begin by ** initialize the count of updated rows */ @@ -576,13 +576,13 @@ void sqlite3Update( VdbeCoverage(v); } if( eOnePass!=ONEPASS_SINGLE ){ - labelContinue = sqlite3VdbeMakeLabel(v); + labelContinue = sqlite3VdbeMakeLabel(pParse); } sqlite3VdbeAddOp2(v, OP_IsNull, pPk ? regKey : regOldRowid, labelBreak); VdbeCoverageIf(v, pPk==0); VdbeCoverageIf(v, pPk!=0); }else if( pPk ){ - labelContinue = sqlite3VdbeMakeLabel(v); + labelContinue = sqlite3VdbeMakeLabel(pParse); sqlite3VdbeAddOp2(v, OP_Rewind, iEph, labelBreak); VdbeCoverage(v); addrTop = sqlite3VdbeAddOp2(v, OP_RowData, iEph, regKey); sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, labelContinue, regKey, 0); |