/ Check-in [22e58330]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Add an assert() in the Win32 VFS.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | readonly-wal-recovery
Files: files | file ages | folders
SHA3-256: 22e58330461736ca22d6f4d7eab897a3597de2e7434a6f4a474f0f0d7f964281
User & Date: mistachkin 2017-11-09 20:37:37
Context
2017-11-09
22:23
Revise and vastly simplify the Win32 SHM file locking semantics, allowing all new tests to pass. check-in: d0997b0f user: mistachkin tags: readonly-wal-recovery
20:37
Add an assert() in the Win32 VFS. check-in: 22e58330 user: mistachkin tags: readonly-wal-recovery
20:34
Enhance walro2.test to better ensure that readonly_shm clients are not using invalid *-shm files. check-in: ff630b66 user: dan tags: readonly-wal-recovery
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_win.c.

  3881   3881         !osWriteFile(pFile->h, &notUsed1, 1, &notUsed2, pOverlapped) ){
  3882   3882       DWORD lastErrno = bReadOnly ? NO_ERROR : osGetLastError();
  3883   3883       if( !osReadFile(pFile->h, &notUsed1, 1, &notUsed2, pOverlapped) ){
  3884   3884         lastErrno = osGetLastError();
  3885   3885         if( winIsLockConflict(lastErrno) ){
  3886   3886           if( pLockType ) *pLockType = WINSHM_WRLCK;
  3887   3887         }else if( winIsLockMissing(lastErrno) ){
         3888  +        assert( bReadOnly );
  3888   3889           if( pLockType ) *pLockType = WINSHM_UNLCK;
  3889   3890         }else{
  3890   3891           return SQLITE_IOERR_READ;
  3891   3892         }
  3892   3893       }else{
  3893   3894         if( winIsLockConflict(lastErrno) ){
  3894   3895           if( pLockType ) *pLockType = WINSHM_RDLCK;