1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-03 16:53:36 +03:00

Add an OOM fault injection test for the new code on this branch.

FossilOrigin-Name: c96de490ac77dd23c108004b95152cce4922fe27
This commit is contained in:
dan
2014-06-28 19:06:49 +00:00
parent 8e9028d0f8
commit 6696ba3eab
4 changed files with 76 additions and 8 deletions

View File

@@ -3589,6 +3589,7 @@ int sqlite3VdbeRecordCompare(
** value. */
assert( CORRUPT_DB
|| pPKey2->default_rc==vdbeRecordCompareDebug(nKey1, pKey1, pPKey2)
|| pKeyInfo->db->mallocFailed
);
return pPKey2->default_rc;
}
@@ -3754,6 +3755,7 @@ static int vdbeRecordCompareString(
|| (res<0 && vdbeRecordCompareDebug(nKey1, pKey1, pPKey2)<0)
|| (res>0 && vdbeRecordCompareDebug(nKey1, pKey1, pPKey2)>0)
|| CORRUPT_DB
|| pPKey2->pKeyInfo->db->mallocFailed
);
return res;
}