/ Check-in [bb643bac]
Login

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

Overview
Comment:Add a call to sqlite3FaultSim(410) inside of btreeRestoreCursorPosition() to simplify testing of error scenarios.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: bb643bac535ac7d5fb4c13edb8782cd13540bbc7d2b2deb689f4ca8d1914f422
User & Date: drh 2019-03-30 19:17:35
Context
2019-03-30
20:43
Improvements to VdbeCoverage macros. check-in: 10ee9e33 user: drh tags: trunk
20:10
Enhanced VdbeCoverage() macros in the new windows function code. Later: This check-in causes an assertion fault. check-in: f24066f8 user: drh tags: oops
19:17
Add a call to sqlite3FaultSim(410) inside of btreeRestoreCursorPosition() to simplify testing of error scenarios. check-in: bb643bac user: drh tags: trunk
18:39
The defragmentPage() routine detects corruption in the first-free-slot fields at offset 1 in the header and throws an error, rather than asserting. check-in: fb125bd3 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

   836    836     int skipNext;
   837    837     assert( cursorOwnsBtShared(pCur) );
   838    838     assert( pCur->eState>=CURSOR_REQUIRESEEK );
   839    839     if( pCur->eState==CURSOR_FAULT ){
   840    840       return pCur->skipNext;
   841    841     }
   842    842     pCur->eState = CURSOR_INVALID;
   843         -  rc = btreeMoveto(pCur, pCur->pKey, pCur->nKey, 0, &skipNext);
          843  +  if( sqlite3FaultSim(410) ){
          844  +    rc = SQLITE_IOERR;
          845  +  }else{
          846  +    rc = btreeMoveto(pCur, pCur->pKey, pCur->nKey, 0, &skipNext);
          847  +  }
   844    848     if( rc==SQLITE_OK ){
   845    849       sqlite3_free(pCur->pKey);
   846    850       pCur->pKey = 0;
   847    851       assert( pCur->eState==CURSOR_VALID || pCur->eState==CURSOR_INVALID );
   848    852       if( skipNext ) pCur->skipNext = skipNext;
   849    853       if( pCur->skipNext && pCur->eState==CURSOR_VALID ){
   850    854         pCur->eState = CURSOR_SKIPNEXT;