100 check-ins occurring around 3e76a9f2c041a6d3.

Do not call pager_open_journal() from within PagerBegin() if the connection is in exclusive-access mode. It will be called from within PagerWrite() just as it is for non-exclusive mode anyway.
check-in: cdf2c5c2 user: dan tags: trunk

Currently, if SQLite cannot find a table or index referred to by a query, it reloads the database schema from disk to see if the table or index has been added since the schema was cached in memory. Extend this behaviour to columns (which may have been added using ALTER TABLE) and fix some obscure cases related to tables and indexes (INDEXED BY, DROP TABLE etc.).
check-in: 4932f228 user: dan tags: trunk

When synchronous=NORMAL, use the same journal file format as with synchronous=FULL (i.e. multiple journal headers within the one journal). Fix for [d11f09d36e].
check-in: 2eaf5ee0 user: dan tags: trunk

Reduce the size of the large allocation (approx 8KB for every 4000 frames in the log) that occurs during checkpoint. Use the 'scratch' memory for this allocation instead of the general purpose allocation.
check-in: 29887487 user: dan tags: trunk

Revert to allowing a cache spill during writes of multiple pages within a
single sector as long as the spill does not require a journal sync and a
new journal header.
check-in: 7d83fbae user: drh tags: trunk

Make sure the wal-index reader detects an incorrect version number even if
it had to hold a lock in order to read the wal-index. Also, expand and enhance
various comments in wal.c.
check-in: 2e6a462c user: drh tags: trunk

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

Change the unix VFS to always allocate shared-memory using a file in the
same directory as the database. Otherwise, a chroot might cause different
processes to use different shared memory files resulting in database
corruption.
check-in: 2241788b user: drh tags: trunk

Change the implementation of the unix implementation of xAccess() so that it returns 0 (does not exist) to an SQLITE_ACCESS_EXISTS query on a file that exists but is zero bytes in size.
check-in: 077b0e5b user: dan tags: experimental

A different fix to [fc62af4523]. When changing from journal_mode=PERSIST or TRINCATE to some other rollback mode, delete the journal file only if a RESERVED lock can be obtained on the database file first.
check-in: b9b11855 user: dan tags: experimental

Bug fix: Only trust the database size number at offset 28 if the change
counter at offset 24 matches the version number counter at offset 92.
This prevents corruption in the case of two applications writing to the
database where one is an older version of SQLite and the other is a newer
version.
check-in: f80c3f92 user: drh tags: trunk

Experimental change: On systems where it is not possible to unlink a file while one or more processes has it open (i.e. not unix), avoid closing the journal file each time the database is unlocked and reopening it at the start of each transaction.
check-in: bede8c8a user: dan tags: experimental

Remove xShmGet/Size/Release from the sqlite3_vfs structure. Change the name of xShmPage to xShmMap. Remove some code that is now unused from os_unix.c and some of the test VFS implementations.
check-in: fc0cabc1 user: dan tags: experimental

Store the MemPage structure in memory following, instead of preceding, the page data for cached pages. This reduces the likelihood of a corrupt database page image causing SQLite to read past the end of a buffer.
check-in: 0ce42e76 user: dan tags: trunk

When restarting (wrapping) a log file, set all unused aReadMark[] slots to READMARK_NOT_USED instead of 0. Setting them to 0 does not cause a problem, but may cause SQLite to obtain and release a few more file locks than would otherwise be necessary.
check-in: 0797b10c user: dan tags: trunk