From: drh Date: Thu, 8 Apr 2010 14:15:56 +0000 (+0000) Subject: Add testcase() macros to the automatic index logic to insure that boundary X-Git-Tag: version-3.7.2~487 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52ff8ea605df6a32091200e7eb0cf86b1c48e223;p=thirdparty%2Fsqlite.git Add testcase() macros to the automatic index logic to insure that boundary cases are tested. FossilOrigin-Name: 7286547847721b8f5f64bc2e7dc236652b1ae985 --- diff --git a/manifest b/manifest index 0d26d08bf7..4c381152eb 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,8 @@ -C Make\ssure\sF_OK,\sR_OK,\sand\sW_OK\sare\sdefined\sin\stest_demovfs.c.\s\sDefine\sthem\smanually\nif\sthey\sare\snot.\s\sThis\sis\snecessary\sto\sget\sthe\smodule\sto\scompile\son\ssome\ssystems. -D 2010-04-08T11:35:19 +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +C Add\stestcase()\smacros\sto\sthe\sautomatic\sindex\slogic\sto\sinsure\sthat\sboundary\ncases\sare\stested. +D 2010-04-08T14:15:56 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in 4f2f967b7e58a35bb74fb7ec8ae90e0f4ca7868b F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -222,7 +225,7 @@ F src/vdbemem.c 2a82f455f6ca6f78b59fb312f96054c04ae0ead1 F src/vdbetrace.c 864cef96919323482ebd9986f2132435115e9cc2 F src/vtab.c a0f8a40274e4261696ef57aa806de2776ab72cda F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f -F src/where.c 28c270dc93828e36392ddf85b9fd9400303c589c +F src/where.c 3a4a32910f4b283648ca60e099597d784640419d F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2 F test/alias.test 4529fbc152f190268a15f9384a5651bbbabc9d87 F test/all.test 14165b3e32715b700b5f0cbf8f6e3833dda0be45 @@ -796,7 +799,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P bf7b8d863665870a38f0b2335cc71de856a515b4 -R d5c1c467a2fe159dee9601f419d531a4 +P 7c8afc3272fa91e2b5685b009eb674dbc1b5920d +R ce7264333c7e3b80e3480a436a772632 U drh -Z 3c255bfefa1bd6638573105dd556d073 +Z 93a751d218d1476c4e95c450f3e4b2fe +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.6 (GNU/Linux) + +iD4DBQFLveUfoxKgR168RlERAlK0AJizHi/WZt4pZH5D99H7Lruh8t+CAJ4npcDg +ufDfCArvIerz7SKlqMzbFg== +=6X+r +-----END PGP SIGNATURE----- diff --git a/manifest.uuid b/manifest.uuid index dd6daf7d9a..f3d2c4c9cc 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -7c8afc3272fa91e2b5685b009eb674dbc1b5920d \ No newline at end of file +7286547847721b8f5f64bc2e7dc236652b1ae985 \ No newline at end of file diff --git a/src/where.c b/src/where.c index 81a74fa9a2..8622ba2594 100644 --- a/src/where.c +++ b/src/where.c @@ -1774,6 +1774,8 @@ static void constructAutomaticIndex( if( termCanDriveIndex(pTerm, pSrc, notReady) ){ int iCol = pTerm->u.leftColumn; Bitmask cMask = iCol>=BMS ? ((Bitmask)1)<<(BMS-1) : ((Bitmask)1)<colUsed & (~idxCols | (((Bitmask)1)<<(BMS-1))); mxBitCol = (pTable->nCol >= BMS-1) ? BMS-1 : pTable->nCol; + testcase( pTable->nCol==BMS-1 ); + testcase( pTable->nCol==BMS-2 ); for(i=0; inLevel; i++){ sqlite3_index_info *pInfo = pWInfo->a[i].pIdxInfo;