]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Remove an unreachable branch. Improvements to comments.
authordrh <drh@noemail.net>
Fri, 14 Dec 2012 17:48:08 +0000 (17:48 +0000)
committerdrh <drh@noemail.net>
Fri, 14 Dec 2012 17:48:08 +0000 (17:48 +0000)
FossilOrigin-Name: d2fb7619b063b329b6d7ba9a16a7290e5d868f23

manifest
manifest.uuid
src/where.c

index 940b592a46a4ba0fd2b628a8670b7501f043e58e..9f25e3efc60c06d24c6f6dcc8f2cffbd02f1b22d 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Merge\sin\sall\sthe\strunk\schanges\sthat\shave\soccurred\ssince\sthis\sbranch\swas\nopened.
-D 2012-12-14T15:54:05.684
+C Remove\san\sunreachable\sbranch.\s\sImprovements\sto\scomments.
+D 2012-12-14T17:48:08.139
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 690d441a758cbffd13e814dc2724a721a6ebd400
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -250,7 +250,7 @@ F src/vtab.c b05e5f1f4902461ba9f5fc49bb7eb7c3a0741a83
 F src/wal.c f5c7b5027d0ed0e9bc9afeb4a3a8dfea762ec7d2
 F src/wal.h 29c197540b19044e6cd73487017e5e47a1d3dac6
 F src/walker.c 3d75ba73de15e0f8cd0737643badbeb0e002f07b
-F src/where.c 6bcd38a2bc9a2d2ed8dc9b622625efb8c53e8911
+F src/where.c 7bdfde434b14ff88cc52ae41ac235ee1acb6b1e1
 F test/8_3_names.test 631ea964a3edb091cf73c3b540f6bcfdb36ce823
 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
 F test/aggnested.test 45c0201e28045ad38a530b5a144b73cd4aa2cfd6
@@ -1025,7 +1025,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 d6e045f89c5a4b500b1da7ea1224b132909bafc6 52e755943f87354febe214e5dc3b423a1e38ba80
-R 31359f190d617098d7e9f461bfe956e6
+P 6d507e4de924e2f4556ea4a03ee0fa7d647bf8bb
+R fea13d1ea2e8500bc200a6665b5fa212
 U drh
-Z 9b9491b018acf588c19d70e23c3069cb
+Z b1649d740bfab2686a02d105140cda9c
index f44adeed60c8ab3b25e2ce754a0c0f579d6b9793..f6dc61ed96a38087ff60c124a091f90437d32bbd 100644 (file)
@@ -1 +1 @@
-6d507e4de924e2f4556ea4a03ee0fa7d647bf8bb
\ No newline at end of file
+d2fb7619b063b329b6d7ba9a16a7290e5d868f23
\ No newline at end of file
index 2573faff28c9fc996fa49498697aa21e33d4c1e8..1be1b20a490b48eef9c2205e4b6d0430d76c000a 100644 (file)
@@ -2247,12 +2247,16 @@ static void bestVirtualIndex(WhereBestIdx *p){
   assert( sqlite3GetVTable(pParse->db, pTab) );
 
   /* Try once or twice.  On the first attempt, allow IN optimizations.
-  ** If an IN optimization is accepted, but does not set the
-  ** pInfo->aConstrainUsage.omit flag, then it will not work (because it
-  ** will allow duplicate rows in the result set) so try again with
-  ** IN optimizations disabled.
+  ** If an IN optimization is accepted by the virtual table xBestIndex
+  ** method, but the  pInfo->aConstrainUsage.omit flag is not set, then
+  ** the query will not work because it might allow duplicate rows in
+  ** output.  In that case, run the xBestIndex method a second time
+  ** without the IN constraints.  Usually this loop only runs once.
+  ** The loop will exit using a "break" statement.
   */
-  for(bAllowIN=1; bAllowIN>=0; bAllowIN--){
+  for(bAllowIN=1; 1; bAllowIN--){
+    assert( bAllowIN==0 || bAllowIN==1 );
+
     /* Set the aConstraint[].usable fields and initialize all 
     ** output variables to zero.
     **