Add an ALWAYS() to a conditional in where.c. (CVS 6747)

FossilOrigin-Name: 1fdb3e1e9af0672072f133dde06594fea2ef13c5
This commit is contained in:
drh 2009-06-11 17:04:28 +00:00
parent 85d2bd22f1
commit 2c1a0c568f
3 changed files with 9 additions and 10 deletions

View File

@ -1,5 +1,5 @@
C Changes\sto\sreenable\scodec\soperation\sand\sto\shandle\smemory\sallocation\nfailures\swithin\sa\scodec.\s(CVS\s6746)
D 2009-06-11T00:47:21
C Add\san\sALWAYS()\sto\sa\sconditional\sin\swhere.c.\s(CVS\s6747)
D 2009-06-11T17:04:28
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 8b8fb7823264331210cddf103831816c286ba446
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -212,7 +212,7 @@ F src/vdbeblob.c c25d7e7bc6d5917feeb17270bd275fa771f26e5c
F src/vdbemem.c 05183d46094aa99b8f8350e5761b9369dbef35a8
F src/vtab.c e2f4c92df7d06330b151448718c4724742ff444b
F src/walker.c ec4b9742a4077ef80346e2f9aaf0f44c2d95087a
F src/where.c cbf29fc2b8b8011500f11523ccaa2bd86f33d1ba
F src/where.c 86fb1a3a8842256780c810601ce0dd01b7be86af
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
F test/alias.test 4529fbc152f190268a15f9384a5651bbbabc9d87
F test/all.test 14165b3e32715b700b5f0cbf8f6e3833dda0be45
@ -733,7 +733,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
P 78a391dca05dbe3ad1d8124b80b31bc2ce75778f
R 1e24699e08b9d5dc7b0fbd04e5c66fbb
P 43a6ca98b1a6aff1f0f674ecabdc929efb314db7
R 6d67b8adfba5816dc2720bc14f90f5fb
U drh
Z 1969b58a290b247f789d9bc333ab6e41
Z b652a86aae59849ab53a62caa306c6ab

View File

@ -1 +1 @@
43a6ca98b1a6aff1f0f674ecabdc929efb314db7
1fdb3e1e9af0672072f133dde06594fea2ef13c5

View File

@ -16,7 +16,7 @@
** so is applicable. Because this module is responsible for selecting
** indices, you might also think of this module as the "query optimizer".
**
** $Id: where.c,v 1.405 2009/06/10 19:33:29 drh Exp $
** $Id: where.c,v 1.406 2009/06/11 17:04:28 drh Exp $
*/
#include "sqliteInt.h"
@ -2916,7 +2916,6 @@ static Bitmask codeOneLoopStart(
WhereTerm *pOrTerm = &pOrWc->a[ii];
if( pOrTerm->leftCursor==iCur || pOrTerm->eOperator==WO_AND ){
WhereInfo *pSubWInfo; /* Info for single OR-term scan */
/* Loop through table entries that match term pOrTerm. */
pSubWInfo = sqlite3WhereBegin(pParse, &oneTab, pOrTerm->pExpr, 0,
WHERE_OMIT_OPEN | WHERE_OMIT_CLOSE | WHERE_FORCE_TABLE);
@ -3217,7 +3216,7 @@ WhereInfo *sqlite3WhereBegin(
assert( pWC->vmask==0 && pMaskSet->n==0 );
for(i=0; i<pTabList->nSrc; i++){
createMask(pMaskSet, pTabList->a[i].iCursor);
if( pTabList->a[i].pTab && IsVirtual(pTabList->a[i].pTab) ){
if( ALWAYS(pTabList->a[i].pTab) && IsVirtual(pTabList->a[i].pTab) ){
pWC->vmask |= ((Bitmask)1 << i);
}
}