/ Check-in [33b6f069]
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:Changes to os_win.c to have it return same error code as os_unix.c.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | mistake
Files: files | file ages | folders
SHA1: 33b6f069d8059903312282962181839ff983e5c4
User & Date: shaneh 2010-07-02 19:49:38
Context
2010-07-03
01:44
Fix a buffer overrun in the where.c. Problem detected by valgrind. check-in: 15bb6233 user: drh tags: mistake
2010-07-02
19:49
Changes to os_win.c to have it return same error code as os_unix.c. check-in: 33b6f069 user: shaneh tags: mistake
19:36
Omit the OP_JournalMode opcode from the VDBE when SQLITE_OMIT_PRAGMA is defined. check-in: 565ff65c user: drh tags: mistake
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to src/os.c.

    30     30   **     sqlite3OsOpen()
    31     31   **     sqlite3OsRead()
    32     32   **     sqlite3OsWrite()
    33     33   **     sqlite3OsSync()
    34     34   **     sqlite3OsLock()
    35     35   **
    36     36   */
    37         -#if defined(SQLITE_TEST) && (SQLITE_OS_WIN==0)
           37  +#if defined(SQLITE_TEST)
    38     38   int sqlite3_memdebug_vfs_oom_test = 1;
    39     39     #define DO_OS_MALLOC_TEST(x)                                       \
    40     40     if (sqlite3_memdebug_vfs_oom_test && (!x || !sqlite3IsMemJournal(x))) {  \
    41     41       void *pTstAlloc = sqlite3Malloc(10);                             \
    42     42       if (!pTstAlloc) return SQLITE_IOERR_NOMEM;                       \
    43     43       sqlite3_free(pTstAlloc);                                         \
    44     44     }

Changes to src/os_win.c.

  1427   1427       }
  1428   1428   
  1429   1429       /* Check to see if another process is holding the dead-man switch.
  1430   1430       ** If not, truncate the file to zero length. 
  1431   1431       */
  1432   1432       if( winShmSystemLock(pShmNode, _SHM_WRLCK, WIN_SHM_DMS, 1)==SQLITE_OK ){
  1433   1433         rc = winTruncate((sqlite3_file *)&pShmNode->hFile, 0);
         1434  +      if( rc!=SQLITE_OK ){
         1435  +        rc = SQLITE_IOERR_SHMOPEN;
         1436  +      }
  1434   1437       }
  1435   1438       if( rc==SQLITE_OK ){
  1436   1439         winShmSystemLock(pShmNode, _SHM_UNLCK, WIN_SHM_DMS, 1);
  1437   1440         rc = winShmSystemLock(pShmNode, _SHM_RDLCK, WIN_SHM_DMS, 1);
  1438   1441       }
  1439   1442       if( rc ) goto shm_open_err;
  1440   1443     }