-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
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
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
}
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 ){
}
}
- /* 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{
/* 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);
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] ){
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);