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

Add a new sqlite3FaultSim() call in the btree logic, for testing.

FossilOrigin-Name: e0558f79b8184ea6741fb20b710dab854f5bdb71aa47d5a6701eeb7389540c8c
This commit is contained in:
drh
2024-02-12 13:51:08 +00:00
parent b29047838d
commit 84dea8264b
3 changed files with 16 additions and 10 deletions

View File

@@ -5128,9 +5128,12 @@ static int accessPayload(
if( pCur->aOverflow==0
|| nOvfl*(int)sizeof(Pgno) > sqlite3MallocSize(pCur->aOverflow)
){
Pgno *aNew = (Pgno*)sqlite3Realloc(
pCur->aOverflow, nOvfl*2*sizeof(Pgno)
);
Pgno *aNew;
if( sqlite3FaultSim(413) ){
aNew = 0;
}else{
aNew = (Pgno*)sqlite3Realloc(pCur->aOverflow, nOvfl*2*sizeof(Pgno));
}
if( aNew==0 ){
return SQLITE_NOMEM_BKPT;
}else{