/ Check-in [a3ea1a82]
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 | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a3ea1a822d3a110f4f186f2fc8550f435c8c98635d058096b7be9d4df7066b8b
User & Date: drh 2019-01-26 23:34:50
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: 004f7d9b 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: a3ea1a82 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: d59567dd user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

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