-C Add\smore\stestcase()\smacros.\s\sFix\sa\smemory\sleak\sfollowing\sOOM\sin\sthe\nvirtual\stable\sanalysis\slogic.
-D 2013-06-17T21:37:40.990
+C Remove\ssome\sredundant\sand\sunreachable\scode.
+D 2013-06-18T01:52:41.578
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/wal.c 436bfceb141b9423c45119e68e444358ee0ed35d
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
F src/walker.c 4fa43583d0a84b48f93b1e88f11adf2065be4e73
-F src/where.c b911a484d36d5dca41448e493974368d8147a2e1
+F src/where.c 86cc9705ef7de9ef712619485d3bff3910d58b12
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
F test/aggnested.test 45c0201e28045ad38a530b5a144b73cd4aa2cfd6
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae
F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
-P eaf1f1b405ec2c498092527fae00e5dbe9e176c1
-R 7a1603a9005d87a42c0df561c944734f
+P b61402af690ac08b68974f3c807096b0cffd9bc0
+R ddde8ef3fd559d48220a86d476077d7b
U drh
-Z 30a954d83fb3f9269803abab8ea42340
+Z a276f283a2c7c1a652996ed6754c6f02
WhereLoop *pLoop; /* The Loop object */
Bitmask idxCols; /* Bitmap of columns used for indexing */
Bitmask extraCols; /* Bitmap of additional columns */
- const int mxConstraint = 10; /* Maximum number of constraints */
/* Generate code to skip over the creation and initialization of the
** transient index on 2nd and subsequent iterations of the loop. */
pWCEnd = &pWC->a[pWC->nTerm];
pLoop = pLevel->pWLoop;
idxCols = 0;
- for(pTerm=pWC->a; pTerm<pWCEnd && pLoop->nLTerm<mxConstraint; pTerm++){
+ for(pTerm=pWC->a; pTerm<pWCEnd; pTerm++){
if( termCanDriveIndex(pTerm, pSrc, notReady) ){
int iCol = pTerm->u.leftColumn;
Bitmask cMask = iCol>=BMS ? MASKBIT(BMS-1) : MASKBIT(iCol);
pStart = pEnd = 0;
if( pLoop->wsFlags & WHERE_BTM_LIMIT ) pStart = pLoop->aLTerm[j++];
if( pLoop->wsFlags & WHERE_TOP_LIMIT ) pEnd = pLoop->aLTerm[j++];
+ assert( pStart!=0 || pEnd!=0 );
if( bRev ){
pTerm = pStart;
pStart = pEnd;
pLevel->op = bRev ? OP_Prev : OP_Next;
pLevel->p1 = iCur;
pLevel->p2 = start;
- if( pStart==0 && pEnd==0 ){
- pLevel->p5 = SQLITE_STMTSTATUS_FULLSCAN_STEP;
- }else{
- assert( pLevel->p5==0 );
- }
+ assert( pLevel->p5==0 );
if( testOp!=OP_Noop ){
iRowidReg = iReleaseReg = sqlite3GetTempReg(pParse);
sqlite3VdbeAddOp2(v, OP_Rowid, iCur, iRowidReg);
** be available.
*/
pSubLoop = pSubWInfo->a[0].pWLoop;
+ assert( (pSubLoop->wsFlags & WHERE_TEMP_INDEX)==0 );
if( (pSubLoop->wsFlags & WHERE_INDEXED)!=0
- && (pSubLoop->wsFlags & WHERE_TEMP_INDEX)==0
&& (ii==0 || pSubLoop->u.btree.pIndex==pCov)
){
assert( pSubWInfo->a[0].iIdxCur==iCovCur );
break;
}
} /* end Loop over all index columns */
- if( distinctColumns ) isOrderDistinct = 1;
+ if( distinctColumns ){
+ testcase( isOrderDistinct==0 );
+ isOrderDistinct = 1;
+ }
} /* end-if not one-row */
/* Mark off any other ORDER BY terms that reference pLoop */
if( pWInfo->pOrderBy==0 && (db->flags & SQLITE_ReverseOrder)!=0 ){
pWInfo->revMask = (Bitmask)(-1);
}
- if( pParse->nErr || db->mallocFailed ){
+ if( pParse->nErr || NEVER(db->mallocFailed) ){
goto whereBeginError;
}
#ifdef WHERETRACE_ENABLED