Index: src/btree.c ================================================================== --- src/btree.c +++ src/btree.c @@ -7,11 +7,11 @@ ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* -** $Id: btree.c,v 1.522 2008/09/30 14:06:29 drh Exp $ +** $Id: btree.c,v 1.523 2008/09/30 16:48:11 danielk1977 Exp $ ** ** This file implements a external (disk-based) database using BTrees. ** See the header comment on "btreeInt.h" for additional information. ** Including a description of file format and an overview of operation. */ @@ -5954,11 +5954,13 @@ ** the leaf node is always the next key in tree-order after the ** copy on the internal node. So, the call to sqlite3BtreeNext() ** calls restoreCursorPosition() to point the cursor to the copy ** stored on the internal node, then advances to the next entry, ** which happens to be the copy of the key on the internal node. - ** Net effect: leafCur is pointing back where + ** Net effect: leafCur is pointing back to the duplicate cell + ** that needs to be removed, and the leafCur.apPage[] and + ** leafCur.aiIdx[] arrays are correct. */ #ifndef NDEBUG Pgno leafPgno = pLeafPage->pgno; #endif rc = saveCursorPosition(&leafCur);