/ Check-in [a6dc0df3]
Login

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

Overview
Comment:Adjust the shared-memory locking range to account for the new version number values in the wal-index header.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a6dc0df304876b51cef5402b0e21330f10aabccf
User & Date: drh 2010-06-23 17:58:38
Context
2010-06-23
17:59
Include the SOURCE_ID value in the log messages output for corruption, misuse, and CANTOPEN errors. check-in: 1727a81f user: drh tags: trunk
17:58
Adjust the shared-memory locking range to account for the new version number values in the wal-index header. check-in: a6dc0df3 user: drh tags: trunk
15:55
Add a version number to the wal-index header. If SQLite encounters a version number in either the wal or wal-index files that it does not understand, the operation is abandoned and SQLITE_CANTOPEN returned. check-in: 8d0f8a7f user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

  3171   3171     u8 id;                     /* Id of this connection within its unixShmNode */
  3172   3172   #endif
  3173   3173   };
  3174   3174   
  3175   3175   /*
  3176   3176   ** Constants used for locking
  3177   3177   */
  3178         -#define UNIX_SHM_BASE   ((18+SQLITE_SHM_NLOCK)*4)         /* first lock byte */
         3178  +#define UNIX_SHM_BASE   ((22+SQLITE_SHM_NLOCK)*4)         /* first lock byte */
  3179   3179   #define UNIX_SHM_DMS    (UNIX_SHM_BASE+SQLITE_SHM_NLOCK)  /* deadman switch */
  3180   3180   
  3181   3181   /*
  3182   3182   ** Apply posix advisory locks for all bytes from ofst through ofst+n-1.
  3183   3183   **
  3184   3184   ** Locks block if the mask is exactly UNIX_SHM_C and are non-blocking
  3185   3185   ** otherwise.

Changes to src/os_win.c.

  1261   1261     u8 id;                     /* Id of this connection with its winShmNode */
  1262   1262   #endif
  1263   1263   };
  1264   1264   
  1265   1265   /*
  1266   1266   ** Constants used for locking
  1267   1267   */
  1268         -#define WIN_SHM_BASE   ((18+SQLITE_SHM_NLOCK)*4)        /* first lock byte */
         1268  +#define WIN_SHM_BASE   ((22+SQLITE_SHM_NLOCK)*4)        /* first lock byte */
  1269   1269   #define WIN_SHM_DMS    (WIN_SHM_BASE+SQLITE_SHM_NLOCK)  /* deadman switch */
  1270   1270   
  1271   1271   /*
  1272   1272   ** Apply advisory locks for all n bytes beginning at ofst.
  1273   1273   */
  1274   1274   #define _SHM_UNLCK  1
  1275   1275   #define _SHM_RDLCK  2