-C Add\sa\smissing\sVdbeCoverage()\smacro\son\san\sOP_Found\sopcode\sadded\sin\sthe\sprevious\ncheck-in.
-D 2014-05-26T20:25:34.589
+C Minor\senhancements\sto\scomments\sand\sclarification\sof\sthe\scode.
+D 2014-05-26T22:01:00.008
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in dd2b1aba364ff9b05de41086f74407f285c57670
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/wal.c 76e7fc6de229bea8b30bb2539110f03a494dc3a8
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
F src/walker.c 11edb74d587bc87b33ca96a5173e3ec1b8389e45
-F src/where.c d46d73c76f48ede86e0e5bb112b2bcc91947bfaa
+F src/where.c b5719b11c414874826c676cf8c8455cb2939a30c
F src/whereInt.h 6804c2e5010378568c2bb1350477537755296a46
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 2c7e277bbebd5c93dec53d381d9737909d40d846
-R 3707fb894adfd77b824ab9f7bdc17e79
+P b4980a07e287480beddb2c6633c733520e05d074
+R 8f53ac145522e21d9a1c5059c77f2db7
U drh
-Z 370b7f2e785b22f24333c303cca00bc0
+Z ad528aef359e7c77cf0a017e9208591c
**
** B: <after the loop>
**
+ ** Added 2014-05-26: If the table is a WITHOUT ROWID table, then
+ ** use an ephermeral index instead of a RowSet to record the primary
+ ** keys of the rows we have already seen.
+ **
*/
WhereClause *pOrWc; /* The OR-clause broken out into subterms */
SrcList *pOrTab; /* Shortened table list or OR-clause generation */
}
/* Initialize the rowset register to contain NULL. An SQL NULL is
- ** equivalent to an empty rowset.
+ ** equivalent to an empty rowset. Or, create an ephermeral index
+ ** capable of holding primary keys in the case of a WITHOUT ROWID.
**
** Also initialize regReturn to contain the address of the instruction
** immediately following the OP_Return at the bottom of the loop. This
if( pOrTerm->leftCursor==iCur || (pOrTerm->eOperator & WO_AND)!=0 ){
WhereInfo *pSubWInfo; /* Info for single OR-term scan */
Expr *pOrExpr = pOrTerm->pExpr;
+ int j1 = 0; /* Address of jump operation */
if( pAndExpr && !ExprHasProperty(pOrExpr, EP_FromJoin) ){
pAndExpr->pLeft = pOrExpr;
pOrExpr = pAndExpr;
);
if( (pWInfo->wctrlFlags & WHERE_DUPLICATES_OK)==0 ){
int r;
- int addr; /* Address just past Gosub coded below */
int iSet = ((ii==pOrWc->nTerm-1)?-1:ii);
if( HasRowid(pTab) ){
r = sqlite3ExprCodeGetColumn(pParse, pTab, -1, iCur, regRowid, 0);
- addr = sqlite3VdbeCurrentAddr(v)+2;
- sqlite3VdbeAddOp4Int(v, OP_RowSetTest, regRowset, addr, r, iSet);
+ j1 = sqlite3VdbeAddOp4Int(v, OP_RowSetTest, regRowset, 0, r,iSet);
VdbeCoverage(v);
}else{
Index *pPk = sqlite3PrimaryKeyIndex(pTab);
** need to insert the key into the temp table, as it will never
** be tested for. */
if( iSet ){
- addr = sqlite3VdbeCurrentAddr(v) + 2 + ((iSet>0) ? 2 : 0);
- sqlite3VdbeAddOp4Int(v, OP_Found, regRowset, addr, r, nPk);
+ j1 = sqlite3VdbeAddOp4Int(v, OP_Found, regRowset, 0, r, nPk);
VdbeCoverage(v);
}
if( iSet>=0 ){
/* Release the array of temp registers */
sqlite3ReleaseTempRange(pParse, r, nPk);
}
- assert( db->mallocFailed
- || iSet==0 || addr==(sqlite3VdbeCurrentAddr(v)+1) );
}
sqlite3VdbeAddOp2(v, OP_Gosub, regReturn, iLoopBody);
+ if( j1 ) sqlite3VdbeJumpHere(v, j1);
/* The pSubWInfo->untestedTerms flag means that this OR term
** contained one or more AND term from a notReady table. The