-C Improvements\sto\sthe\sORDER\sBY\ssuppressor\sin\sthe\sNGQP.
-D 2013-05-30T23:21:20.132
+C Fix\sthe\sconstructAutomaticIndex()\sroutine\sso\sthat\sit\sworks\swith\sNGQP.
+D 2013-05-31T11:57:39.405
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 38beadcfdf477b0f9a07c4d0a479ab522843b14c
+F src/where.c 530dd22d4f803747e964edcb052d699c4c92e1a1
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
F test/aggnested.test 45c0201e28045ad38a530b5a144b73cd4aa2cfd6
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
-P a51d8c92496436488e1a6eabd85785e8fedf2736
-R 405146591851ecbfbac166e3c1b2db18
+P 24a2e9ddcecd3926817d77abbb75d068ee7140ad
+R 92deaa75392a3f586cae6bde8f65a470
U drh
-Z 4964f74ab7b0cf98172fb87fb30a1333
+Z 293d3cdab228aa747c73a2994c326e63
-24a2e9ddcecd3926817d77abbb75d068ee7140ad
\ No newline at end of file
+5e1e61399513b4a95fd93df2377a2603f1670063
\ No newline at end of file
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; pTerm++){
+ pLoop->aTerm = sqlite3DbRealloc(pParse->db, pLoop->aTerm,
+ mxConstraint*sizeof(pLoop->aTerm[0]));
+ if( pLoop->aTerm==0 ) return;
+ for(pTerm=pWC->a; pTerm<pWCEnd && pLoop->nTerm<mxConstraint; pTerm++){
if( termCanDriveIndex(pTerm, pSrc, notReady) ){
int iCol = pTerm->u.leftColumn;
Bitmask cMask = iCol>=BMS ? ((Bitmask)1)<<(BMS-1) : ((Bitmask)1)<<iCol;
testcase( iCol==BMS );
testcase( iCol==BMS-1 );
if( (idxCols & cMask)==0 ){
- nColumn++;
+ pLoop->aTerm[nColumn++] = pTerm;
idxCols |= cMask;
}
}
}
assert( nColumn>0 );
- pLoop->u.btree.nEq = nColumn;
+ pLoop->u.btree.nEq = pLoop->nTerm = nColumn;
+ pLoop->wsFlags = WHERE_COLUMN_EQ | WHERE_IDX_ONLY | WHERE_INDEXED
+ | WHERE_TEMP_INDEX;
/* Count the number of additional columns needed to create a
** covering index. A "covering index" is an index that contains all