-C Fix\stests\sin\sfordelete.test\sto\stest\sfor\sthe\sBTREE_AUXDELETE\sflag.
-D 2016-01-27T16:17:41.726
+C Change\sthe\sname\sof\sthe\sBTREE_IDXDELETE\sflag\sto\sBTREE_AUXDELETE,\sto\sbetter\nreflect\sits\spurpose.
+D 2016-01-27T16:26:25.226
F Makefile.in 027c1603f255390c43a426671055a31c0a65fdb4
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc 6fca5455aaecbd14479f33f091aa19df2d3d2969
F src/backup.c 2869a76c03eb393ee795416e2387005553df72bc
F src/bitvec.c 1a78d450a17c5016710eec900bedfc5729bf9bdf
F src/btmutex.c bc87dd3b062cc26edfe79918de2200ccb8d41e73
-F src/btree.c 97cf881292e085ee71faf44f7167b6312965b562
-F src/btree.h c5dfbbc59226fa5fcc2b03befa85fe10ef23c1b5
+F src/btree.c 16edaf415a54a2fc9058e3bc47d0c894cd59635e
+F src/btree.h 368ceeb4bd9312dc8df2ffd64b4b7dbcf4db5f8e
F src/btreeInt.h c18b7d2a3494695133e4e60ee36061d37f45d9a5
F src/build.c b4eba1e84752ec9cae7ff3dacd5a8b6d1ab8deb9
F src/callback.c 29ae4faba226c7ebb9aee93016b5ce8a8f071261
F src/ctime.c 60e135af364d777a9ab41c97e5e89cd224da6198
F src/date.c 997651e3ee6c2818fbf7fcdb7156cef9eb3ece20
F src/dbstat.c b2ec6793eef97aebb4d171d490a4ffdfa9f2475c
-F src/delete.c db231a9895681efed007c0887e38b49f4d1291a5
+F src/delete.c 33ed87dc0746b1f8ce186f62b608bf40801af9c0
F src/expr.c d10c1cdef5810cdbf73adc9f9b383684230b360a
F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb
F src/fkey.c c66d3e5b35d4d95b5c1e2ee6c12f5df13a7f9ad6
F src/sqlite.h.in 214476a62012e578f42133a9a3b4f97a9aa421a3
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h dfbe62ffd95b99afe2140d8c35b180d11924072d
-F src/sqliteInt.h 0faffdeed20201bedb202cf6ec07f14b29158c66
+F src/sqliteInt.h 12ec54454fc0f1c25f5c7057423ada1a363b6db0
F src/sqliteLimit.h 216557999cb45f2e3578ed53ebefe228d779cb46
F src/status.c 70912d7be68e9e2dbc4010c93d344af61d4c59ba
F src/table.c 51b46b2a62d1b3a959633d593b89bab5e2c9155e
F src/utf.c 32d7f82aa921322f3e1c956f4b58f019ebd2c6b3
F src/util.c 72d40df0a52d3f30b462a15f0e094fcbade6dc82
F src/vacuum.c 2ddd5cad2a7b9cef7f9e431b8c7771634c6b1701
-F src/vdbe.c a27a3fdc65f5728c6e9bff49b6753fbf9d73c8c0
+F src/vdbe.c c367615fecb5fae8a39113ee2b6ecbab94e4bcd3
F src/vdbe.h 7a733ea8aac1b77305a67698e784fa3484ee3337
F src/vdbeInt.h 40c728712a2975855a2ac6aac44bf02dfd4a4c30
F src/vdbeapi.c ffae8f5af4570fbd548504e815e9fb7227f0822e
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P dde1db0dd2e2cf04706117629756c352b178ebb8
-R 112344660260002964aa8c335bb07305
-U dan
-Z e0043c886092534757bb67db359c02f9
+P bbd25cf179df5bda1fe729928d6746248f06e46f
+R 21474325914b9893f106ce3a1694990c
+U drh
+Z 6ce2f1bf15f4f84bace517d6cc10a5ac
-bbd25cf179df5bda1fe729928d6746248f06e46f
\ No newline at end of file
+1d3bf6bebdda9f96734bc139601e9b05344ea0b4
\ No newline at end of file
** the next call to BtreeNext() or BtreePrev() moves it to the same row
** as it would have been on if the call to BtreeDelete() had been omitted.
**
-** The BTREE_IDXDELETE bit of flags indicates that this is a delete of
-** an index entry where the corresponding table row has already been deleted.
-** The BTREE_IDXDELETE bit is a hint that is not used by this implementation,
+** The BTREE_AUXDELETE bit of flags indicates that is one of several deletes
+** associated with a single table entry and its indexes. Only one of those
+** deletes is considered the "primary" delete. The primary delete occurs
+** on a cursor that is not a BTREE_FORDELETE cursor. All but one delete
+** operation on non-FORDELETE cursors is tagged with the AUXDELETE flag.
+** The BTREE_AUXDELETE bit is a hint that is not used by this implementation,
** but which might be used by alternative storage engines.
*/
int sqlite3BtreeDelete(BtCursor *pCur, u8 flags){
assert( !hasReadConflicts(p, pCur->pgnoRoot) );
assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
assert( pCur->eState==CURSOR_VALID );
- assert( (flags & ~(BTREE_SAVEPOSITION | BTREE_IDXDELETE))==0 );
+ assert( (flags & ~(BTREE_SAVEPOSITION | BTREE_AUXDELETE))==0 );
iCellDepth = pCur->iPage;
iCellIdx = pCur->aiIdx[iCellDepth];
/* Allowed flags for the 2nd argument to sqlite3BtreeDelete() */
#define BTREE_SAVEPOSITION 0x02 /* Leave cursor pointing at NEXT or PREV */
-#define BTREE_IDXDELETE 0x04 /* this is index, table row already deleted */
+#define BTREE_AUXDELETE 0x04 /* not the primary delete operation */
int sqlite3BtreeInsert(BtCursor*, const void *pKey, i64 nKey,
const void *pData, int nData,
sqlite3VdbeChangeP4(v, -1, pTab->zName, P4_TRANSIENT);
}
if( eMode!=ONEPASS_OFF ){
- sqlite3VdbeChangeP5(v, OPFLAG_IDXDELETE);
- p5 = OPFLAG_IDXDELETE;
+ sqlite3VdbeChangeP5(v, OPFLAG_AUXDELETE);
}
if( iIdxNoSeek>=0 ){
sqlite3VdbeAddOp1(v, OP_Delete, iIdxNoSeek);
- p5 = 0;
}
if( eMode==ONEPASS_MULTI ) p5 |= OPFLAG_SAVEPOSITION;
sqlite3VdbeChangeP5(v, p5);
#define OPFLAG_P2ISREG 0x10 /* P2 to OP_Open** is a register number */
#define OPFLAG_PERMUTE 0x01 /* OP_Compare: use the permutation */
#define OPFLAG_SAVEPOSITION 0x02 /* OP_Delete: keep cursor position */
-#define OPFLAG_IDXDELETE 0x04 /* OP_Delete: index in a DELETE op */
+#define OPFLAG_AUXDELETE 0x04 /* OP_Delete: index in a DELETE op */
/*
* Each trigger present in the database schema is stored as an instance of
Op *pOrigOp; /* Value of pOp at the top of the loop */
#endif
#ifdef SQLITE_DEBUG
- int nExtraDelete = 0; /* Verifies FORDELETE and IDXDELETE flags */
+ int nExtraDelete = 0; /* Verifies FORDELETE and AUXDELETE flags */
#endif
int rc = SQLITE_OK; /* Value to return */
sqlite3 *db = p->db; /* The database */
** OPFLAG_SAVEPOSITION bit of P5 is clear, then the cursor will be
** left in an undefined state.
**
-** If the OPFLAG_IDXDELETE bit is set on P5, that indicates that this
-** delete is on an index cursor where the corresponding table row has
-** already been deleted.
+** If the OPFLAG_AUXDELETE bit is set on P5, that indicates that this
+** delete one of several associated with deleting a table row and all its
+** associated index entries. Exactly one of those deletes is the "primary"
+** delete. The others are all on OPFLAG_FORDELETE cursors or else are
+** marked with the AUXDELETE flag.
**
** If the OPFLAG_NCHANGE flag of P2 (NB: P2 not P5) is set, then the row
** change count is incremented (otherwise not).
}
#endif
- /* Only flags that can be set are SAVEPOISTION and IDXDELETE */
- assert( (pOp->p5 & ~(OPFLAG_SAVEPOSITION|OPFLAG_IDXDELETE))==0 );
+ /* Only flags that can be set are SAVEPOISTION and AUXDELETE */
+ assert( (pOp->p5 & ~(OPFLAG_SAVEPOSITION|OPFLAG_AUXDELETE))==0 );
assert( OPFLAG_SAVEPOSITION==BTREE_SAVEPOSITION );
- assert( OPFLAG_IDXDELETE==BTREE_IDXDELETE );
+ assert( OPFLAG_AUXDELETE==BTREE_AUXDELETE );
#ifdef SQLITE_DEBUG
if( pC->isEphemeral==0
- && (pOp->p5 & OPFLAG_IDXDELETE)==0
+ && (pOp->p5 & OPFLAG_AUXDELETE)==0
&& (pC->wrFlag & OPFLAG_FORDELETE)==0
){
nExtraDelete++;
int i;
for(i=0; i<r.nField; i++) assert( memIsValid(&r.aMem[i]) );
if( pC->isEphemeral==0
- && (pOp->p5 & OPFLAG_IDXDELETE)==0
+ && (pOp->p5 & OPFLAG_AUXDELETE)==0
&& (pC->wrFlag & OPFLAG_FORDELETE)==0
){
nExtraDelete++;