SQLite

Check-in [5474e560ee]
Login

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

Overview
Comment:Do not inject OOM errors on SQLITE_FCNTL_LOCK_TIMEOUT calls as an OOM is not possible in that context.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | lowlevel-lock-timeout
Files: files | file ages | folders
SHA3-256: 5474e560eeb0269964b70bcd876bb86b4197c4fb164bc13454fb8204f083062c
User & Date: drh 2018-03-26 21:05:47.026
Context
2018-03-27
13:57
Provide the ability for the VFS to do a blocking wait on locks if compiled with SQLITE_ENABLE_SETLK_TIMEOUT. (check-in: e7dff982be user: drh tags: trunk)
2018-03-26
21:05
Do not inject OOM errors on SQLITE_FCNTL_LOCK_TIMEOUT calls as an OOM is not possible in that context. (Closed-Leaf check-in: 5474e560ee user: drh tags: lowlevel-lock-timeout)
20:43
Avoid a race condition that might cause a busy_timeout to last longer than it should. (check-in: b81960561b user: drh tags: lowlevel-lock-timeout)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/os.c.
122
123
124
125
126
127
128
129


130
131
132
133
134
135
136
** when simply tossing information over the wall to the VFS and we do not
** really care if the VFS receives and understands the information since it
** is only a hint and can be safely ignored.  The sqlite3OsFileControlHint()
** routine has no return value since the return value would be meaningless.
*/
int sqlite3OsFileControl(sqlite3_file *id, int op, void *pArg){
#ifdef SQLITE_TEST
  if( op!=SQLITE_FCNTL_COMMIT_PHASETWO ){


    /* 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
    ** confuses the test scripts - the COMMIT comand returns SQLITE_NOMEM
    ** but the transaction is committed anyway.
    **
    ** The core must call OsFileControl() though, not OsFileControlHint(),







|
>
>







122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
** when simply tossing information over the wall to the VFS and we do not
** really care if the VFS receives and understands the information since it
** is only a hint and can be safely ignored.  The sqlite3OsFileControlHint()
** routine has no return value since the return value would be meaningless.
*/
int sqlite3OsFileControl(sqlite3_file *id, int op, void *pArg){
#ifdef SQLITE_TEST
  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
    ** confuses the test scripts - the COMMIT comand returns SQLITE_NOMEM
    ** but the transaction is committed anyway.
    **
    ** The core must call OsFileControl() though, not OsFileControlHint(),