/ Check-in [01d97e5b]
Login

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

Overview
Comment:This is an experimental patch that ensures that all cursors have their position saved prior to starting a ROLLBACK TO.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | savepoint-rollback
Files: files | file ages | folders
SHA1: 01d97e5b6502b1811b52a681f445e1aaae6c0ee6
User & Date: drh 2017-02-02 00:46:55
Context
2017-02-02
20:32
Ensure that all cursors have their positions saved prior to rolling back a savepoint. check-in: 8e03a8e9 user: drh tags: trunk
02:28
Use the sqlite3_blob interface for reading values from the %_node shadow table in RTREE. This is a work in progress. There are still some minor problems. check-in: fc4917d7 user: drh tags: rtree-sqlite3_blob
00:46
This is an experimental patch that ensures that all cursors have their position saved prior to starting a ROLLBACK TO. Closed-Leaf check-in: 01d97e5b user: drh tags: savepoint-rollback
2017-02-01
23:06
Fix harmless compiler warnings seen with MSVC. check-in: 0c66cf0f user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  4034   4034   int sqlite3BtreeSavepoint(Btree *p, int op, int iSavepoint){
  4035   4035     int rc = SQLITE_OK;
  4036   4036     if( p && p->inTrans==TRANS_WRITE ){
  4037   4037       BtShared *pBt = p->pBt;
  4038   4038       assert( op==SAVEPOINT_RELEASE || op==SAVEPOINT_ROLLBACK );
  4039   4039       assert( iSavepoint>=0 || (iSavepoint==-1 && op==SAVEPOINT_ROLLBACK) );
  4040   4040       sqlite3BtreeEnter(p);
  4041         -    rc = sqlite3PagerSavepoint(pBt->pPager, op, iSavepoint);
         4041  +    if( op==SAVEPOINT_ROLLBACK ){
         4042  +      rc = saveAllCursors(pBt, 0, 0);
         4043  +    }
         4044  +    if( rc==SQLITE_OK ){
         4045  +      rc = sqlite3PagerSavepoint(pBt->pPager, op, iSavepoint);
         4046  +    }
  4042   4047       if( rc==SQLITE_OK ){
  4043   4048         if( iSavepoint<0 && (pBt->btsFlags & BTS_INITIALLY_EMPTY)!=0 ){
  4044   4049           pBt->nPage = 0;
  4045   4050         }
  4046   4051         rc = newDatabase(pBt);
  4047   4052         pBt->nPage = get4byte(28 + pBt->pPage1->aData);
  4048   4053