1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Add a call to sqlite3FaultSim(410) inside of btreeRestoreCursorPosition()

to simplify testing of error scenarios.

FossilOrigin-Name: bb643bac535ac7d5fb4c13edb8782cd13540bbc7d2b2deb689f4ca8d1914f422
This commit is contained in:
drh
2019-03-30 19:17:35 +00:00
parent 119e1ffc5e
commit b336d1ab83
3 changed files with 12 additions and 8 deletions

View File

@@ -840,7 +840,11 @@ static int btreeRestoreCursorPosition(BtCursor *pCur){
return pCur->skipNext;
}
pCur->eState = CURSOR_INVALID;
rc = btreeMoveto(pCur, pCur->pKey, pCur->nKey, 0, &skipNext);
if( sqlite3FaultSim(410) ){
rc = SQLITE_IOERR;
}else{
rc = btreeMoveto(pCur, pCur->pKey, pCur->nKey, 0, &skipNext);
}
if( rc==SQLITE_OK ){
sqlite3_free(pCur->pKey);
pCur->pKey = 0;