Fix a missing mutex in the sqlite3_normalized_sql() interface when it is
called on a prepared statement that did not previously have a computed
normalization of the input SQL.
(check-in: 1a1a59c6 user: drh tags: trunk)

The sqlite3_normalized_sql() interface should not be transforming quoted
identifier names into wildcards. Fix this, and at the same time simplify
the code substantially.
(check-in: e8540377 user: drh tags: trunk)

Enhance the sqlite3_normalize_sql() interface so that it works even if the
prepared statement was not initially compiled using
SQLITE_PREPARE_NORMALIZED. Enhance the ".trace" command in the CLI so that
it is able to access the full scope of functionality provided by
sqlite3_trace_v2() and in particular so that it is able to show normalized
SQL output using the newly enhanced sqlite3_normalize_sql() interface.
(check-in: 7da617e9 user: drh tags: trunk)

Cherrypick a couple of fixes from begin-concurrent-pnu into this branch. The
differences between the two branches are now that this one does not have
"PRAGMA noop_update" or the mutex-free PRNG.
(check-in: a56506b9 user: dan tags: begin-concurrent)

Follow-up to [0bf0fd242b93c3bd30]: only reset the pager when adding a
new codec, not when overwriting an existing codec. Also, improve a
comment in the pcache1 subsystem.
(check-in: 5c040fdb user: drh tags: trunk)

Do not allow direct access to internal-use SQL functions such as
sqlite_rename_column() and sqlite3_rename_table() except when the
new SQLITE_TESTCTRL_INTERNAL_FUNCTIONS flag is set.
(check-in: 6e133054 user: drh tags: trunk)

Make the winTruncate() method of the windows VFS be a no-op if there are
outstanding references to the memory-mapped pages. Otherwise, memory might
be deleted out from under those references when the file is remapped during
the truncate operation.
(check-in: ffce4aac user: drh tags: trunk)

Make the winTruncate() method of the windows VFS be a no-op if there are
outstanding references to the memory-mapped pages. Otherwise, memory might
be deleted out from under those references when the file is remapped during
the truncate operation.
(Leaf
check-in: 8576ccb4 user: drh tags: branch-3.25)

Fix problems in pragma.c causing some PRAGMA statements to test the wrong
schema-cookie before proceeding, or to try to open cursors on the wrong
database ("PRAGMA foreign_key_check" only).
(check-in: 6982f52f user: dan tags: trunk)