-C Merge\slatest\strunk\schanges\swith\sthis\sbranch.
-D 2017-11-03T17:51:37.040
+C Fix\ssome\scomments\sin\snew\scode\son\sthis\sbranch.\sNo\schanges\sto\scode.
+D 2017-11-03T19:34:17.982
F Makefile.in b142eb20482922153ebc77b261cdfd0a560ed05a81e9f6d9a2b0e8192922a1d2
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc a55372a22454e742ba7c8f6edf05b83213ec01125166ad7dcee0567e2f7fc81b
F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac
F src/select.c 660ef7977841fb462f24c8561e4212615bb6e5c9835fd3556257ce8316c50fee
F src/shell.c.in 08cbffc31900359fea85896342a46147e9772c370d8a5079b7be26e3a1f50e8a
-F src/sqlite.h.in bdd51182dd37e5583f9a201e933a20c9f0c779ceabe500de7e67d57a5fb55ab4
+F src/sqlite.h.in fac062a139e95b9ea2074518e4de1edceee4b5ff8d3befb2dc51634dc0475b2a
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h c02d628cca67f3889c689d82d25c3eb45e2c155db08e4c6089b5840d64687d34
F src/sqliteInt.h f5377febf86654c975e1d4e4353a5ad2fbaa5bc86b584ba3761ed33e24ce2c0e
F src/vdbetrace.c 48e11ebe040c6b41d146abed2602e3d00d621d7ebe4eb29b0a0f1617fd3c2f6c
F src/vtab.c 0e4885495172e1bdf54b12cce23b395ac74ef5729031f15e1bc1e3e6b360ed1a
F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
-F src/wal.c 84172f8556012866db16aa2c385f972d112accbb37c1df6d709ccb30b7533063
+F src/wal.c 298acb2281a73fa15971f40b2283e49c317ef1ab08d1e53c6b5956ee9140152d
F src/wal.h 8de5d2d3de0956d6f6cb48c83a4012d5f227b8fe940f3a349a4b7e85ebcb492a
F src/walker.c d591e8a9ccf60abb010966b354fcea4aa08eba4d83675c2b281a8764c76cc22f
F src/where.c b7a075f5fb3d912a891dcc3257f538372bb4a1622dd8ca7d752ad95ce8949ba4
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 9b0d5c4ff707f58b07ae28cfe0a7de62fbd22fa20678e446350d1472391bc0b9 29ec855e13e0dcd675dcf12948b42f9e669d0a31c5d9efb95857888aba0beeee
-R 04d6fa7835319401e085a65123a1b583
+P 585e0a09c5e1cd3d32e7b3fe228bd3eb674631f4074f517aad4c2600818a337a
+R 07390855efc0141c7a26cb08f8119f74
U dan
-Z 9bd997c1b71c6c7594ae27b51b9c96d2
+Z 9e604d6a7024cca2a24e6e925cfd2e77
-585e0a09c5e1cd3d32e7b3fe228bd3eb674631f4074f517aad4c2600818a337a
\ No newline at end of file
+cbec1bfe4b9f0e9fc9849db623694902308ecc05f3898368201a9902c39a138f
\ No newline at end of file
#define SQLITE_CANTOPEN_ISDIR (SQLITE_CANTOPEN | (2<<8))
#define SQLITE_CANTOPEN_FULLPATH (SQLITE_CANTOPEN | (3<<8))
#define SQLITE_CANTOPEN_CONVPATH (SQLITE_CANTOPEN | (4<<8))
-#define SQLITE_CANTOPEN_DIRTYWAL (SQLITE_CANTOPEN | (5<<8))
#define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1<<8))
#define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8))
#define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2<<8))
** so that all subsequent write operations are independent.
** ^SQLite will never invoke SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE without
** a prior successful call to [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE].
+**
+** <li>[[SQLITE_FCNTL_READ_SHM]]
+** The [SQLITE_FCNTL_READ_SHM] opcode may be used to read data from
+** the shared-memory region used by wal mode if the previous call
+** to the xShmMap method returned SQLITE_READONLY_CANTLOCK. The argument
+** must point to an instance of a structure declared as:
+** <blockquote><pre>
+** struct ReadShmArg { void *pBuf; int nBuf };
+** </pre></blockquote>)^
+** Before returning, this operation allocates a buffer large enough for
+** the entire shared-memory using sqlite3_malloc() and populates it with
+** a copy thereof. ReadShmArg.pBuf is set to point to the buffer, and
+** ReadShmArg to its size in bytes. It is the responsibility of the caller
+** to eventually free the buffer using sqlite3_free().
** </ul>
*/
#define SQLITE_FCNTL_LOCKSTATE 1
if( rc==SQLITE_READONLY_CANTLOCK ){
/* This is a readonly_shm connection and there are no other connections
** to the database. So the *-shm file may not be accessed using mmap.
- ** Take WAL_READ_LOCK(0) before proceding. */
+ ** Try to open an "unlocked" transaction - one that loads the *-shm
+ ** file into memory using read() - instead. */
assert( pWal->nWiData>0 && pWal->apWiData[0]==0 );
assert( pWal->readOnly & WAL_SHM_RDONLY );
return walBeginUnlocked(pWal, pChanged);