From: drh Date: Fri, 31 May 2013 17:55:27 +0000 (+0000) Subject: Fix problems in the virtual table logic for NGQP. X-Git-Tag: version-3.8.0~130^2~55 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7e47cb8b7595835f1695aa01645036a25ddc7887;p=thirdparty%2Fsqlite.git Fix problems in the virtual table logic for NGQP. FossilOrigin-Name: 23af28e24b8f7ffacd006978b25bab990a43b8c5 --- diff --git a/manifest b/manifest index 1dc7a47d76..dca4b55f11 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Remove\sthe\sdefinitions\sof\sobjects\sthat\sare\sno\slonger\sused:\s\sWhereCost,\s\nWherePlan,\sand\sWhereBestIdx. -D 2013-05-31T15:50:39.999 +C Fix\sproblems\sin\sthe\svirtual\stable\slogic\sfor\sNGQP. +D 2013-05-31T17:55:27.487 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -289,7 +289,7 @@ F src/vtab.c b05e5f1f4902461ba9f5fc49bb7eb7c3a0741a83 F src/wal.c 436bfceb141b9423c45119e68e444358ee0ed35d F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4 F src/walker.c 4fa43583d0a84b48f93b1e88f11adf2065be4e73 -F src/where.c 586b6c3628b75619542468575706ab3192aad236 +F src/where.c 103ccfa82fa177f755d35f0d48932713857516a1 F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2 F test/aggnested.test 45c0201e28045ad38a530b5a144b73cd4aa2cfd6 @@ -1093,7 +1093,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac -P 707f0323264c35be14847a6adc49a0dc5eaf4ad2 -R 427cbfc4828d3a50415e243b6cfd8031 +P 816f8add7e60de2ef8df4fdac090c244f8dbda39 +R 876fcc7116fcba2a9fe2cf6848606247 U drh -Z 69d89052012f1e53f4573be3e4c8c80b +Z 5ce875f360b3d8cc74f8b2b339e3e8e8 diff --git a/manifest.uuid b/manifest.uuid index e1da51f18b..3c1f169293 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -816f8add7e60de2ef8df4fdac090c244f8dbda39 \ No newline at end of file +23af28e24b8f7ffacd006978b25bab990a43b8c5 \ No newline at end of file diff --git a/src/where.c b/src/where.c index eaef66cc8e..833077497b 100644 --- a/src/where.c +++ b/src/where.c @@ -3034,7 +3034,7 @@ static Bitmask codeOneLoopStart( } } sqlite3VdbeAddOp2(v, OP_Integer, pLoop->u.vtab.idxNum, iReg); - sqlite3VdbeAddOp2(v, OP_Integer, j-1, iReg+1); + sqlite3VdbeAddOp2(v, OP_Integer, nConstraint, iReg+1); sqlite3VdbeAddOp4(v, OP_VFilter, iCur, addrNotFound, iReg, pLoop->u.vtab.idxStr, pLoop->u.vtab.needFree ? P4_MPRINTF : P4_STATIC); @@ -5226,7 +5226,7 @@ WhereInfo *sqlite3WhereBegin( constructAutomaticIndex(pParse, pWInfo->pWC, pTabItem, notReady, pLevel); }else #endif - if( pLoop->u.btree.pIndex!=0 ){ + if( pLoop->wsFlags & WHERE_INDEXED ){ Index *pIx = pLoop->u.btree.pIndex; KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIx); /* FIXME: As an optimization use pTabItem->iCursor if WHERE_IDX_ONLY */