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/where.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/where.c')
-rw-r--r-- | src/where.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/where.c b/src/where.c index 8e016604d..4a8bf35af 100644 --- a/src/where.c +++ b/src/where.c @@ -837,7 +837,7 @@ static void constructAutomaticIndex( addrTop = sqlite3VdbeAddOp1(v, OP_Rewind, pLevel->iTabCur); VdbeCoverage(v); } if( pPartial ){ - iContinue = sqlite3VdbeMakeLabel(v); + iContinue = sqlite3VdbeMakeLabel(pParse); sqlite3ExprIfFalse(pParse, pPartial, iContinue, SQLITE_JUMPIFNULL); pLoop->wsFlags |= WHERE_PARTIALIDX; } @@ -4643,7 +4643,7 @@ WhereInfo *sqlite3WhereBegin( pWInfo->pResultSet = pResultSet; pWInfo->aiCurOnePass[0] = pWInfo->aiCurOnePass[1] = -1; pWInfo->nLevel = nTabList; - pWInfo->iBreak = pWInfo->iContinue = sqlite3VdbeMakeLabel(v); + pWInfo->iBreak = pWInfo->iContinue = sqlite3VdbeMakeLabel(pParse); pWInfo->wctrlFlags = wctrlFlags; pWInfo->iLimit = iAuxArg; pWInfo->savedNQueryLoop = pParse->nQueryLoop; |