From: dan Date: Sat, 12 Dec 2015 19:23:41 +0000 (+0000) Subject: Update some stale comments in delete.c. No changes to code. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fheads%2Fonepass-delete-or;p=thirdparty%2Fsqlite.git Update some stale comments in delete.c. No changes to code. FossilOrigin-Name: f59a33260cc853bb35f4259b05fd05bbbeb13945 --- diff --git a/manifest b/manifest index 82bf14cf0a..2567ca681a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sfurther\stests\sfor\sthe\schanges\son\sthis\sbranch.\sAlso\sfix\sa\smemory-leak\sthat\scould\sfollow\sa\smalloc\sfailure. -D 2015-12-12T17:31:40.728 +C Update\ssome\sstale\scomments\sin\sdelete.c.\sNo\schanges\sto\scode. +D 2015-12-12T19:23:41.225 F Makefile.in 28bcd6149e050dff35d4dcfd97e890cd387a499d F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc e8fdca1cb89a1b58b5f4d3a130ea9a3d28cb314d @@ -291,7 +291,7 @@ F src/complete.c addcd8160b081131005d5bc2d34adf20c1c5c92f F src/ctime.c 60e135af364d777a9ab41c97e5e89cd224da6198 F src/date.c fb1c99172017dcc8e237339132c91a21a0788584 F src/dbstat.c ffd63fc8ba7541476ced189b95e95d7f2bc63f78 -F src/delete.c a7ada4d4ca96daa71508d73128ffe5f1710f6c33 +F src/delete.c ddc1a52614b0a30d154d5284495eaf819b56b4d7 F src/expr.c ccb93d7b7e1ac5d187c9b153bae145933f93ee5c F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb F src/fkey.c 31900763094a3736a5fc887469202eb579fef2d0 @@ -1411,7 +1411,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 57b700baa690f73894cd53b8e87839760fe4019b -R 86649e829c9bcb9dbf4e0f992deac233 +P 21526012c274e709d672dbafb9e16158c0749341 +R 72360abeca2d214a51c8718f62041bc1 U dan -Z ef334e7566d0d33e4ad81a28a6f57921 +Z f9b468b08638e33ce475509a59673042 diff --git a/manifest.uuid b/manifest.uuid index d91ddc4286..4a41d5d33a 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -21526012c274e709d672dbafb9e16158c0749341 \ No newline at end of file +f59a33260cc853bb35f4259b05fd05bbbeb13945 \ No newline at end of file diff --git a/src/delete.c b/src/delete.c index 8de1fb20a8..0a8bf5fbbb 100644 --- a/src/delete.c +++ b/src/delete.c @@ -390,9 +390,9 @@ int deleteFrom( } if( eOnePass!=ONEPASS_OFF ){ - /* For ONEPASS, no need to store the rowid/primary-key. There is only - ** one, so just keep it in its register(s) and fall through to the - ** delete code. */ + /* For a one-pass strategy, no need to store the rowid/primary-key in + ** a RowSet or temporary table. It is read directly from its register(s) + ** by the delete code below. */ nKey = nPk; /* OP_Found will use an unpacked key */ aToOpen = sqlite3DbMallocRaw(db, nIdx+2); if( aToOpen==0 ){ @@ -419,8 +419,9 @@ int deleteFrom( } } - /* If this DELETE cannot use the ONEPASS strategy, this is the - ** end of the WHERE loop */ + /* If not using a one-pass strategy, this is the end of the first loop. + ** A second loop, to iterate through the contents of the RowSet or + ** temporary table populated above, is opened below. */ if( eOnePass!=ONEPASS_OFF ){ addrBypass = sqlite3VdbeMakeLabel(v); }else{ @@ -430,8 +431,7 @@ int deleteFrom( /* Unless this is a view, open cursors for the table we are ** deleting from and all its indices. If this is a view, then the ** only effect this statement has is to fire the INSTEAD OF - ** triggers. - */ + ** triggers. */ if( !isView ){ int iAddrOnce = 0; u8 p5 = (eOnePass==ONEPASS_OFF ? 0 : OPFLAG_FORDELETE); @@ -446,9 +446,11 @@ int deleteFrom( if( eOnePass==ONEPASS_MULTI ) sqlite3VdbeJumpHere(v, iAddrOnce); } - /* Set up a loop over the rowids/primary-keys that were found in the - ** where-clause loop above. - */ + /* If using a one-pass strategy, seek the data-cursor to the entry + ** in the main table b-tree if where.c has not already done so. + ** + ** If using the two-pass strategy, start a loop over the contents + ** of the RowSet or temporary table populated by the first loop. */ if( eOnePass!=ONEPASS_OFF ){ assert( nKey==nPk ); /* OP_Found will use an unpacked key */ if( !IsVirtual(pTab) && aToOpen[iDataCur-iTabCur] ){ @@ -490,7 +492,9 @@ int deleteFrom( iKey, nKey, count, OE_Default, eOnePass, iIdxNoSeek); } - /* End of the loop over all rowids/primary-keys. */ + /* For a one-pass strategy, this is the end of the single loop. For a + ** two-pass strategy, the end of the loop over the rowids/primary-keys + ** stored in the RowSet/temporary table. */ if( eOnePass!=ONEPASS_OFF ){ sqlite3VdbeResolveLabel(v, addrBypass); sqlite3WhereEnd(pWInfo);