SQLite

Check-in [a3ea1a822d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Ensure that the btree cursor is correctly set up prior to backing it up as part of a delete operation on a divider cell in an index.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a3ea1a822d3a110f4f186f2fc8550f435c8c98635d058096b7be9d4df7066b8b
User & Date: drh 2019-01-26 23:34:50.536
Context
2019-01-27
01:11
Update fuzzcheck so that with the --load-dbsql options it screens its inputs to ensure that they are valid dbsqlfuzz cases. Add new dbsqlfuzz finds to the test/fuzzdata8.db database. (check-in: 004f7d9bbe user: drh tags: trunk)
2019-01-26
23:34
Ensure that the btree cursor is correctly set up prior to backing it up as part of a delete operation on a divider cell in an index. (check-in: a3ea1a822d user: drh tags: trunk)
21:05
Fix a broken assert() in fts3. Also some test script issues causing failures with builds that do not support fts3. (check-in: d59567dda2 user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/btree.c.
8766
8767
8768
8769
8770
8771
8772

8773
8774
8775
8776
8777
8778
8779
  ** the cursor to the largest entry in the tree that is smaller than
  ** the entry being deleted. This cell will replace the cell being deleted
  ** from the internal node. The 'previous' entry is used for this instead
  ** of the 'next' entry, as the previous entry is always a part of the
  ** sub-tree headed by the child page of the cell being deleted. This makes
  ** balancing the tree following the delete operation easier.  */
  if( !pPage->leaf ){

    rc = sqlite3BtreePrevious(pCur, 0);
    assert( rc!=SQLITE_DONE );
    if( rc ) return rc;
  }

  /* Save the positions of any other cursors open on this table before
  ** making any modifications.  */







>







8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
  ** the cursor to the largest entry in the tree that is smaller than
  ** the entry being deleted. This cell will replace the cell being deleted
  ** from the internal node. The 'previous' entry is used for this instead
  ** of the 'next' entry, as the previous entry is always a part of the
  ** sub-tree headed by the child page of the cell being deleted. This makes
  ** balancing the tree following the delete operation easier.  */
  if( !pPage->leaf ){
    pCur->skipNext = 0;
    rc = sqlite3BtreePrevious(pCur, 0);
    assert( rc!=SQLITE_DONE );
    if( rc ) return rc;
  }

  /* Save the positions of any other cursors open on this table before
  ** making any modifications.  */