Enhance the built-in date/time functions so that they can be used in
CHECK constraints, in the WHERE clause or partial indexes, and index
expressions, provided that none of the non-deterministic keywords
("now", "localtime", "utc") are used as arguments.
check-in: a90c062d user: drh tags: trunk

Combine the Parse.ckBase and Parse.iSelfTab fields into just Parse.iSelfTab.
This fixes a problem with date/time functions in check-constraints. Add
some test cases for date/time functions in index expressions and check
constraints.
check-in: 22eda098 user: drh tags: index-on-date-func

Do not use the flattening optimization for a sub-query on the RHS of a LEFT
JOIN if that subquery reads data from a virtual table. Because it prevents the
planner from creating an automatic index on the results of the sub-query, the
flattening optimization sometimes slows things down in this case.
check-in: 9dbae1df user: dan tags: trunk

Add the pointer-type parameter to sqlite3_bind_pointer(),
sqlite3_result_pointer(), and sqlite3_value_pointer(). The pointer type is
a static string that must match (according to strcmp()) or else the pointer
is passed as a NULL. This is a security measure to prevent crossing pointers
between different extensions.
check-in: e1196567 user: drh tags: branch-3.20

Add an experimental "pointer type" parameter to sqlite3_bind_pointer(),
sqlite3_result_pointer(), and sqlite3_value_pointer(). The pointer type is
a string that must compare equal using strcmp() or else the pointer comes
through as a NULL.
check-in: 211cce04 user: drh tags: pointer-types

Fix a register allocation problem in PRAGMA integrity_check that caused
the same register to be used for two different purposes on the first
ATTACHed database if the schema for the ATTACHed database was noticable
more complex than the schema for the first database.
Fix for ticket [a4e06e75a9ab61a1].
check-in: 253945d4 user: drh tags: trunk

Add the three new pointer interfaces to the loadable extension mechanism.
Update sqlite3_value_subtype() documentation to remove the statement about
it not being used internally.
check-in: e5a51803 user: drh tags: bind-pointer

Update the FTS3 extension to use sqlite3_result_pointer() and
sqlite3_value_pointer() for passing FTS3 cursor objects from the table
into functions such as snippet().
check-in: 0fa2e170 user: drh tags: bind-pointer

Simplify the way in which the database file is truncated when the last
connection disconnects. Also ignore the error code from the xTruncate call -
as truncating a database file is always optional.
check-in: b0a49d90 user: dan tags: trunk

Change the src/shell.c file so that it is generated from a new script at
tool/mkshellc.tcl and the template file src/shell.c.in, and automatically
includes the extensions it needs out of ext/misc.
check-in: 17e0bb12 user: drh tags: trunk

In LSM, avoid calling the VFS xTestLock method to test for a lock that
conflicts with one held by the same process. The results of such a call are
considered undefined (since they are different under win32 and posix).
check-in: a82a9bea user: dan tags: trunk

When multiple constraints need to be evaluated for a row, do any constraints
that involve correlated subqueries last. Hence, the priority is index-covered
constraints first, correlated subquery constraints last, and all others in
the middle. This is a
follow-on and improvement to the push-down optimization of check-in [d7bb79ed].
check-in: c4cb9048 user: drh tags: trunk