[8d2a1cca]Leaf:Merge in all the trunk enhancements of the previous 7 months. The LIKE
optimization has stopped working when there is an ESCAPE - that problem will
be addressed in a subsequent check-in.
(user: drh,
tags: est_count_pragma)

[403b88a8]Partial backout of check-in [e0af9a904076]. It turns out we do need some
extra space at the end of the record blob as an overrun area to use when
decoding a maliciously malformed record.
(user: drh,
tags: trunk)

[c7a5880d]Leaf:Cherrypick [ec37ad6d08] into this branch. With this patch, if
SQLITE_SHARED_MAPPING is defined at build-time SQLite will use a single memory
mapping for multiple connections to the same database file within a single
process.
(user: dan,
tags: begin-concurrent)

[5d03c738]In the Windows VFS, when trying to open a database file read/write, if it
fails check to see if the file exists and is read-only and immediately fall
back to a read-only open attempt, rather than running the AV retry loop.
(user: drh,
tags: trunk)

[fa3f5bcc]In the Windows VFS, do not emit an SQLITE_CANTOPEN error log message when
falling back from SQLITE_OPEN_READWRITE to SQLITE_OPEN_READONLY. Wait until
the open fails completely.
(user: drh,
tags: trunk)

[65765222]Fix a bug in tool/mksourceid.c:
The mksourceid.c program was incorrectly including the "# Remove this line"
line of the Fossil-generated "manifest" file in the SHA3 hash. That means
that all SQLITE_SOURCE_IDs for trunk versions going back to
check-in [30966d56] (2017-08-22) are incorrect.
(user: drh,
tags: trunk)

[29227d00]Do not make the assumption (as check-in [4da49a95c0f07] incorrectly did) that
the ExprList returned by sqlite3ExprListDup() would never be passed into
sqlite3ExprListAppend(). Include a new test case that shows this sometimes
does happen.
(user: drh,
tags: trunk)

[378afa16]Avoid an out-of-bounds read on a recovery attempt using a carefully crafted
database and rollback journal with mismatched page sizes. The test case for
this is in TH3.
(user: drh,
tags: trunk)

[8525c30c]Improvements to PRAGMA integrity_check for better detection of malformed
records. Integrity_check now avoids returning SQLITE_CORRUPT on a corrupt
record. Also includes microoptimizations that I stumbled over while working
on integrity_check.
(user: drh,
tags: trunk)