Fix a discrepancy between the documented behavior of SQLITE_DBCONFIG_LOOKASIDE
and what it actually does. Also add evidence marks on the DBCONFIG_LOOKASIDE
implementation.
(check-in: f483be44 user: drh tags: trunk)

Move the test for an (illegal) scalar sub-query that returns more than one column to earlier in SELECT processing in order to avoid an assert() that can happen later on.
(check-in: a55842cf user: dan tags: trunk)

Use sqlite3_mutex_notheld() instead of !sqlite3_mutex_held() inside
of assert() statements since the former works when mutexing is disabled
while the latter does not.
(check-in: 2211486b user: drh tags: trunk)

Fix the computation of the offset on the mmap() for the Nth shared memory
region. Because of the way shared memory is accessed, the old computation,
though wrong, still happened to always get the right answer. Nevertheless,
it is good to do the computation correctly.
(check-in: 36397f62 user: drh tags: trunk)

Do not clear the internal "schema has changed" flag when performing a savepoint rollback. The schema changes may not have taken place within the savepoint being rolled back.
(check-in: c2a84430 user: dan tags: trunk)

Provide hints to the btree layer during the creation of transient tables for
when it is possible for those tables to use a hash rather than a binary tree.
No use is currently made of those hints, though assert() statement verify
their accuracy.
(check-in: 4fead8e7 user: drh tags: trunk)

Remove unnecessary code from malloc.c. Enhance pcache1.c so that is tries
to reuse existing pages, rather than create new pages, when SQLite is under
memory pressure. "Memory pressure" means that SQLITE_CONFIG_PAGECACHE memory
is nearly exhausted or sqlite3_soft_heap_limit() has been reached.
(check-in: 51049479 user: drh tags: trunk)

Change sqlite3_open_v2() to return SQLITE_MISUSE if the combination of bits
in the flags parameter is invalid. The documentation says the behavior in
this situation is undefined - the documentation is unaltered by this code
change.
(check-in: 5e8101c5 user: drh tags: trunk)