diff options
author | drh <drh@noemail.net> | 2014-02-08 01:40:27 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2014-02-08 01:40:27 +0000 |
commit | aceb31b1205c01e933619b05a5f11b0280e2faed (patch) | |
tree | 3503d2ab689ef8186eb3f12dbc6b829ca2b93dac /src/select.c | |
parent | 642364a48b21341a5b23ef9b0cc771cba4f2d7c2 (diff) | |
download | sqlite-aceb31b1205c01e933619b05a5f11b0280e2faed.tar.gz sqlite-aceb31b1205c01e933619b05a5f11b0280e2faed.zip |
Change the OP_Trace opcode to OP_Init and give it the ability to jump to the
initialization code at the bottom of the program, thus avoiding the need for
an extra OP_Goto.
FossilOrigin-Name: 192dea97316144f15f6dd0eabff08a0bf9ef203e
Diffstat (limited to 'src/select.c')
-rw-r--r-- | src/select.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/select.c b/src/select.c index c0728f887..8e5e4dd9d 100644 --- a/src/select.c +++ b/src/select.c @@ -1615,11 +1615,7 @@ Vdbe *sqlite3GetVdbe(Parse *pParse){ Vdbe *v = pParse->pVdbe; if( v==0 ){ v = pParse->pVdbe = sqlite3VdbeCreate(pParse); -#ifndef SQLITE_OMIT_TRACE - if( v ){ - sqlite3VdbeAddOp0(v, OP_Trace); - } -#endif + if( v ) sqlite3VdbeAddOp0(v, OP_Init); } return v; } @@ -4537,15 +4533,6 @@ int sqlite3Select( */ int addrTop; pItem->regReturn = ++pParse->nMem; - /* Before coding the OP_Goto to jump to the start of the main routine, - ** ensure that the jump to the verify-schema routine has already - ** been coded. Otherwise, the verify-schema would likely be coded as - ** part of the co-routine. If the main routine then accessed the - ** database before invoking the co-routine for the first time (for - ** example to initialize a LIMIT register from a sub-select), it would - ** be doing so without having verified the schema version and obtained - ** the required db locks. See ticket d6b36be38. */ - sqlite3CodeVerifySchema(pParse, -1); sqlite3VdbeAddOp0(v, OP_Goto); addrTop = sqlite3VdbeAddOp1(v, OP_OpenPseudo, pItem->iCursor); sqlite3VdbeChangeP5(v, 1); |