aboutsummaryrefslogtreecommitdiff
path: root/src/where.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2011-09-16 01:34:43 +0000
committerdrh <drh@noemail.net>2011-09-16 01:34:43 +0000
commit48f2d3b10a5ac48ae2a1a24f77c7cb1aab6ea978 (patch)
tree0b02d36b1ecb60c458133c090c14df3c131b6151 /src/where.c
parent5b6a9ed49556deac6d48be80b6ef2816102f1951 (diff)
downloadsqlite-48f2d3b10a5ac48ae2a1a24f77c7cb1aab6ea978.tar.gz
sqlite-48f2d3b10a5ac48ae2a1a24f77c7cb1aab6ea978.zip
Add the new OP_Once opcode. Use it to clean up and simplify various
one-time initialization sections in the code, including the fix for ticket [002caede898ae]. FossilOrigin-Name: 7f00552b739fad79517b042a6ed61abe743a917b
Diffstat (limited to 'src/where.c')
-rw-r--r--src/where.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/where.c b/src/where.c
index 21fb7f45f..17490b0e8 100644
--- a/src/where.c
+++ b/src/where.c
@@ -1994,8 +1994,7 @@ static void constructAutomaticIndex(
v = pParse->pVdbe;
assert( v!=0 );
regIsInit = ++pParse->nMem;
- addrInit = sqlite3VdbeAddOp1(v, OP_If, regIsInit);
- sqlite3VdbeAddOp2(v, OP_Integer, 1, regIsInit);
+ addrInit = sqlite3VdbeAddOp1(v, OP_Once, regIsInit);
/* Count the number of columns that will be added to the index
** and used to match WHERE clause constraints */