From: shane Date: Tue, 16 Jun 2009 14:15:22 +0000 (+0000) Subject: Fix a link error and warning that can occur in where.c when compiling under MSVC... X-Git-Tag: cvs-to-fossil-cutover~205 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e26fa4c9598a60a42a0a74c71dec85da5423064f;p=thirdparty%2Fsqlite.git Fix a link error and warning that can occur in where.c when compiling under MSVC with SQLITE_OMIT_VIRTUALTABLE defined. Ticket #3914. (CVS 6767) FossilOrigin-Name: 793c93be16af535e102dba147125384f6814cf5f --- diff --git a/manifest b/manifest index 67420de046..de2de92f4f 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Leave\sout\sa\sredundant\sline\sin\sbuild.c.\sTicket\s#3916.\s(CVS\s6766) -D 2009-06-16T04:35:39 +C Fix\sa\slink\serror\sand\swarning\sthat\scan\soccur\sin\swhere.c\swhen\scompiling\sunder\sMSVC\swith\sSQLITE_OMIT_VIRTUALTABLE\sdefined.\sTicket\s#3914.\s(CVS\s6767) +D 2009-06-16T14:15:22 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 98fbffc5efe68d8107511dec0a650efc7daa9446 F src/walker.c 1edca756275f158b80f20eb6f104c8d3fcc96a04 -F src/where.c 658d99d9a2be77ebea35bfaa581d5ec9b0a11af9 +F src/where.c cf0d091748c2fa6f7df96e5b08d2db26fd2eb437 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2 F test/alias.test 4529fbc152f190268a15f9384a5651bbbabc9d87 F test/all.test 14165b3e32715b700b5f0cbf8f6e3833dda0be45 @@ -734,7 +734,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746 -P d89542cd8b2efaea7c6be6cd7787d183c55ae36a -R 8bbc0f857fe07f0745566f5d0cea2bae -U danielk1977 -Z 1c5942565154441f8725e1d57fc36f0e +P d9f997aeb7a2195d0e16fe1555626918902b4f91 +R 15e0059c63bbf9a22956175d05da19fb +U shane +Z 9fcb2df9d2e1bd4baf449d06e64cdf0b diff --git a/manifest.uuid b/manifest.uuid index 33dc06de1d..c78b701ff5 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -d9f997aeb7a2195d0e16fe1555626918902b4f91 \ No newline at end of file +793c93be16af535e102dba147125384f6814cf5f \ No newline at end of file diff --git a/src/where.c b/src/where.c index f5993a3640..efadfc1b8b 100644 --- a/src/where.c +++ b/src/where.c @@ -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.407 2009/06/15 16:27:08 shane Exp $ +** $Id: where.c,v 1.408 2009/06/16 14:15:22 shane Exp $ */ #include "sqliteInt.h" @@ -2233,6 +2233,7 @@ static void bestIndex( ExprList *pOrderBy, /* The ORDER BY clause */ WhereCost *pCost /* Lowest cost query plan */ ){ +#ifndef SQLITE_OMIT_VIRTUALTABLE if( IsVirtual(pSrc->pTab) ){ sqlite3_index_info *p = 0; bestVirtualIndex(pParse, pWC, pSrc, notReady, pOrderBy, pCost, &p); @@ -2240,7 +2241,9 @@ static void bestIndex( sqlite3_free(p->idxStr); } sqlite3DbFree(pParse->db, p); - }else{ + }else +#endif + { bestBtreeIndex(pParse, pWC, pSrc, notReady, pOrderBy, pCost); } } @@ -3216,9 +3219,11 @@ WhereInfo *sqlite3WhereBegin( assert( pWC->vmask==0 && pMaskSet->n==0 ); for(i=0; inSrc; i++){ createMask(pMaskSet, pTabList->a[i].iCursor); +#ifndef SQLITE_OMIT_VIRTUALTABLE if( ALWAYS(pTabList->a[i].pTab) && IsVirtual(pTabList->a[i].pTab) ){ pWC->vmask |= ((Bitmask)1 << i); } +#endif } #ifndef NDEBUG {