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

Do not inject OOM errors on SQLITE_FCNTL_LOCK_TIMEOUT calls as an OOM is

not possible in that context.

FossilOrigin-Name: 5474e560eeb0269964b70bcd876bb86b4197c4fb164bc13454fb8204f083062c
This commit is contained in:
drh
2018-03-26 21:05:47 +00:00
parent fd72563d0a
commit 000705bcce
3 changed files with 10 additions and 8 deletions

View File

@@ -126,7 +126,9 @@ int sqlite3OsCheckReservedLock(sqlite3_file *id, int *pResOut){
*/
int sqlite3OsFileControl(sqlite3_file *id, int op, void *pArg){
#ifdef SQLITE_TEST
if( op!=SQLITE_FCNTL_COMMIT_PHASETWO ){
if( op!=SQLITE_FCNTL_COMMIT_PHASETWO
&& op!=SQLITE_FCNTL_LOCK_TIMEOUT
){
/* Faults are not injected into COMMIT_PHASETWO because, assuming SQLite
** is using a regular VFS, it is called after the corresponding
** transaction has been committed. Injecting a fault at this point