[652a782c]
part of check-in [abc1aad7]
The SQLITE_TESTCTRL_RESERVE operator is removed. In its place is the
more general SQLITE_FCNTL_RESERVE_BYTES which is an API and which can
operator on more than just the main schema.
(check-in: [abc1aad7]
user: drh
branch: trunk,
size: 151671)

[0509a4f4]
part of check-in [c516027d]
Modifications to the way blocking locks are used in SQLITE_ENABLE_SETLK_TIMEOUT builds so that multiple processes or threads may not deadlock when operating on a single database.
(check-in: [c516027d]
user: dan
branch: setlk-deadlock-fix,
size: 151832)

[b11eec03]
part of check-in [4a585189]
Change the sqlite3.pDfltColl (the default collating sequence for the
database connection) so that it is the collating sequence appropriate for
the database encoding, not the UTF8 collating sequence. This helps to
ensure that the database encoding collation is always used, even for
expressions that do not have an defined collating sequence.
Ticket [1b8d7264567eb6fc].
(check-in: [4a585189]
user: drh
branch: trunk,
size: 151163)

[aad9966a]
part of check-in [9c77bfe4]
Backport the change that allows the filename passed into the xFullPathname to
be used as an argument to sqlite3_uri_parameter().
(check-in: [9c77bfe4]
user: drh
branch: branch-3.31,
size: 150961)

[3dfcf244]
part of check-in [bfb09371]
Ensure that the filename passed into the xFullPathname method of the VFS is
acceptable as an argument to sqlite3_uri_parameter(). The interface spec does
not guarantee this, but it has been so historically and some applications
have come to depends on it.
(check-in: [bfb09371]
user: drh
branch: trunk,
size: 151343)

[42577fa0]
part of check-in [9469f36a]
Add the new sqlite3_create_filename() and sqlite3_free_filename() interfaces
for use by Shims. Use these interfaces inside the multiplexor.
(check-in: [9469f36a]
user: drh
branch: trunk,
size: 150988)

[eeb87fbe]
part of check-in [1240ee4f]
Fix a problem in sqlite3CodecQueryParameters() that was introduced by the
query parameter encoding changes for the 3.31.1 release.
(check-in: [1240ee4f]
user: drh
branch: apple-osx,
size: 155208)

[a8223926]
part of check-in [cc65ca54]
Fix a problem in sqlite3CodecQueryParameters() that was introduced by the
query parameter encoding changes for the 3.31.1 release.
(check-in: [cc65ca54]
user: drh
branch: branch-3.31,
size: 150476)

[ffaa1308]
part of check-in [34ab7606]
Revise the layout of filenames in the Pager object so that it is unchanged
from prior versions. It turns out that some important 3rd-party software
does questionable pointer manipulations on those filenames that depend on
that legacy layout. Technically, this is a misuse of SQLite by the 3rd-party
software, but we want to avoid unnecessary breakage.
(check-in: [34ab7606]
user: drh
branch: trunk,
size: 150204)

[18bf425a]
part of check-in [c39e3c14]
Begin adding instrumentation to record and report on the set of key-ranges a concurrent transaction reads from the database.
(check-in: [c39e3c14]
user: dan
branch: begin-concurrent-report,
size: 150675)

[abc03455]
part of check-in [2ae77bd2]
Rearchitect the way in which filenames are stored in the Pager object so that
the sqlite3_uri_parameter() interface will work from journal and WAL filenames
too. This check-in implements the central idea, and compile and runs somewhat,
but crashes on an extended test.
(check-in: [2ae77bd2]
user: drh
branch: enhanced-uri,
size: 149442)

[372f764d]
part of check-in [65d7d39a]
Refactor the names of the new controls for restricting what actions the schema
can take behind the application's back.
(check-in: [65d7d39a]
user: drh
branch: new-security-options,
size: 148321)

[5e71133f]
part of check-in [9ca906d2]
Enhance PRAGMA function_list so that it shows all instances of each FuncDef,
the number of arguments, the encoding, the type, and the flags. Use this
capability to locate and fix incorrect function flags in the standard build.
(check-in: [9ca906d2]
user: drh
branch: new-security-options,
size: 148435)

[bca003ea]
part of check-in [1c266cb3]
Invert the SQLITE_FUNC_SAFE bit to be SQLITE_FUNC_UNSAFE. The external
bit is still SQLITE_INNOCUOUS. It gets inverted as the appdef function
is registered.
(check-in: [1c266cb3]
user: drh
branch: new-security-options,
size: 148372)

[2dfc4695]
part of check-in [9ee79b25]
When UNSAFE_IN_VIEW is disabled, only allow functions in views that are
tagged with SQLITE_INNOCUOUS.
(check-in: [9ee79b25]
user: drh
branch: new-security-options,
size: 148206)

[7b06af0c]
part of check-in [8ee2ce92]
Provide the -DSQLITE_ENABLE_INTERNAL_FUNCTIONS=1 compile-time option. Fix
the ".testctrl internal_function" command in the CLI so that it does not
signal an error on a valid input.
(check-in: [8ee2ce92]
user: drh
branch: trunk,
size: 146710)

[a76071a9]
part of check-in [473892a8]
New test-only SQL functions: implies_nonnull_row(), expr_compare(), and
expr_implies_expr(). The SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test-control
is modified to toggle internal function access on and off for a single
database connection.
(check-in: [473892a8]
user: drh
branch: trunk,
size: 146455)

[94bf8b6a]
part of check-in [5e1949bc]
Change the size of a mini-lookaside allocation to a macro (MINI_SZ) rather
than a magic number (128).
(check-in: [5e1949bc]
user: drh
branch: two-size-lookaside,
size: 147289)

[15057351]
part of check-in [df51ae19]
Ensure that the main filename and the journal filenames in the pager
object are all correctly double-zero terminated.
(check-in: [df51ae19]
user: drh
branch: trunk,
size: 146493)

[38519507]
part of check-in [6aa438ce]
Add the SQLITE_SUBTYPE flag, which can be passed to sqlite3_create_function() and similar to indicate to the core that a user function is likely to use sqlite3_result_subtype().
(check-in: [6aa438ce]
user: dan
branch: window-functions-subtype-fix,
size: 145977)

[51c55eb5]
part of check-in [de767376]
The SQLITE_DIRECTONLY flag, when added to sqlite3_create_function() prevents
the function from being used inside a trigger or view.
(check-in: [de767376]
user: drh
branch: trunk,
size: 145962)

[9465ba2b]
part of check-in [61b4bccd]
Add the SQLITE_DBCONFIG_ENABLE_VIEW option, together with a "db config"
command in the TCL interface that can access that option as well as all the
other sqlite3_db_config() boolean options.
(check-in: [61b4bccd]
user: drh
branch: trunk,
size: 145900)

[ff418603]
part of check-in [fc745845]
Provide the SQLITE_DIRECTONLY flag for app-defined functions that prohibits
the use of those functions within triggers or views.
(check-in: [fc745845]
user: drh
branch: directonly,
size: 145908)

[ddba2dd3]
part of check-in [49aa3448]
Give the SQLITE_TESTCTRL_PRNG_SEED two arguments. The second argument if not
NULL is a pointer to a database connection which seeds the connection from
its schema cookie. In this way, fuzzers can control the PRNG seed.
(check-in: [49aa3448]
user: drh
branch: prng-seed-test-control,
size: 145358)

[591a0084]
part of check-in [97a94446]
Restore the legacy behavior of enabling double-quoted string literals in
all contexts. But also provide a new compile-time option (SQLITE_DQS) to
change the default to something more restrictive.
(check-in: [97a94446]
user: drh
branch: trunk,
size: 144350)

[ac968e94]
part of check-in [86fa0087]
Fix the implementation of the built-in RTRIM collating sequence so that
it works for control characters at the end of the string.
Ticket [f1580ba1b574e9e9](check-in: [86fa0087]
user: drh
branch: trunk,
size: 143099)

[3c3925b0]
part of check-in [c9838731]
Add the SQLITE_TESTCTRL_RESULT_INTREAL test-control and use it to create
the intreal() SQL function in testfixture. Write a few simple tests to
prove this all works. TH3 will hold most of the INTREAL tests, probably.
(check-in: [c9838731]
user: drh
branch: int-real,
size: 143406)

[11714c8c]
part of check-in [24ef3844]
Change the name of the parameter table in the CLI to "sqlite_parameters".
Doing so involves adding SQLITE_DBCONFIG_WRITABLE_SCHEMA and allowing the
creation of tables whose names begin with "sqlite_" and that are indexed
while writable_schema is on.
(check-in: [24ef3844]
user: drh
branch: trunk,
size: 142655)

[75e429a1]
part of check-in [9e8e5f52]
Try new approach ensuring that each Schema object is only used by one connection/database at any one time.
(check-in: [9e8e5f52]
user: dan
branch: reuse-schema,
size: 141086)

[ac8da437]
part of check-in [cb72ee04]
Add the SQLITE_CONFIG_MEMDB_MAXSIZE configuration option for configuring
the default maximum size of an in-memory database created using
sqlite3_deserialize(). This is necessary to make the interface reasonably
testable.
(check-in: [cb72ee04]
user: drh
branch: trunk,
size: 141901)

[473d149b]
part of check-in [53d3b169]
When masking bits off of sqlite3.flags, make sure the mask is 64 bits
in size so as not to accidentally mask of high-order bits.
(check-in: [53d3b169]
user: drh
branch: trunk,
size: 141684)

[5a947917]
part of check-in [e28584e8]
Performance improvement in sqlite3_step() by creating a new mTrace flag
for the legacy xProfile pointer that is set by sqlite3_profile().
(check-in: [e28584e8]
user: drh
branch: trunk,
size: 141828)

[4cfb3913]
part of check-in [6e133054]
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
branch: trunk,
size: 141571)

[187011ff]
part of check-in [41399169]
Allow sqlite3_snapshot_open() to be called to change the snapshot after a read
transaction is already open on database.
(check-in: [41399169]
user: dan
branch: trunk,
size: 140861)

[3c7f2159]
part of check-in [051ac015]
Allow sqlite3_snapshot_open() to be called to change the snapshot after a
read transaction is already open on database.
(check-in: [051ac015]
user: dan
branch: exp-snapshot-open,
size: 140872)

[73a3db1c]
part of check-in [2bd59333]
Do not abort running queries due to a CREATE INDEX statement. Allow them
to run to completion before being reprepared. Fix for ticket
[c694113e50321afdf9].
(check-in: [2bd59333]
user: drh
branch: trunk,
size: 140126)

[fa70bde0]
part of check-in [cd2da7e1]
Enhancements and improved documentation to the byte-code branch coverage
testing logic. Provide new macros that allow the code to specify that
some branch instructions can never take the NULL path and that the OP_Jump
opcode is only interested in equal/not-equal. The
SQLITE_TESTCTRL_VDBE_COVERAGE file control callback now works slightly
differently (it provides the callback with a bitmask of the branch action,
rather than an integer).
(check-in: [cd2da7e1]
user: drh
branch: trunk,
size: 140028)

[b56b2d62]
part of check-in [ff836cb8]
Add the SQLITE_DBCONFIG_RESET_DATABASE control as a replacement for
the reset_database pragma. Resetting the database should be hard enough
to do that it cannot be done by accident.
(check-in: [ff836cb8]
user: drh
branch: reset-database,
size: 137399)

[10e3897f]
part of check-in [f3596ab9]
Omit some code not used without SQLITE_ENABLE_SORTER_REFERENCES. Improvements
to comments used for documentation.
(check-in: [f3596ab9]
user: drh
branch: sorter-reference,
size: 138003)

[ffe71c00]
part of check-in [2e54a743]
Add infrastructure to support for using F_SETLKW with a timeout on system
that support that functionality. Requires SQLITE_ENABLE_SETLK_TIMEOUT.
(check-in: [2e54a743]
user: drh
branch: lowlevel-lock-timeout,
size: 137697)

[c1e97e4c]
part of check-in [f07e97ae]
Improved documentation for sqlite3_serialize() and sqlite3_deserialize().
Change the name of the compile-time option to enable these interfaces
from SQLITE_ENABLE_MEMDB to SQLITE_ENABLE_DESERIALIZE.
(check-in: [f07e97ae]
user: drh
branch: memdb,
size: 136439)

[37139a23]
part of check-in [fb2ac2d2]
Add support for the "memdb" VFS and the sqlite3_memdb_ptr() and
sqlite3_memdb_config() interfaces, to enable an SQLite database to be
manipulated as an in-memory object.
(check-in: [fb2ac2d2]
user: drh
branch: memdb,
size: 136089)

[690c4134]
part of check-in [1253a872]
Add support for measuring and reporting coverage of the parser state machine
using the SQLITE_TESTCTRL_PARSER_COVERAGE test-control.
(check-in: [1253a872]
user: drh
branch: lemon-improvements,
size: 135994)

[7ce55fa3]
part of check-in [fffc7685]
Change the name of SQLITE_DBCONFIG_FULL_EQP to be SQLITE_DBCONFIG_TRIGGER_EQP
(which we can do without breaking compatibility because the former name has
not yet appeared in an official release) and streamline its implementation.
(check-in: [fffc7685]
user: drh
branch: trunk,
size: 135393)

[99ed3d45]
part of check-in [23a31280]
Enhance the log messages produced in some cases if database corruption is
encountered by an SQLITE_DEBUG build.
(check-in: [23a31280]
user: dan
branch: sqlite-corrupt-page,
size: 135055)

[d45e9b65]
part of check-in [8c2a769c]
Merge the patch that enables reading a read-only WAL-mode database, without
any special query parameters, as long as the -shm and -wal files are on disk.
(check-in: [8c2a769c]
user: drh
branch: apple-osx,
size: 139664)

[54637b9e]
part of check-in [c2c1d656]
Initial implementation of the "sqlite_dbpage" virtual table. Currently
it is read-only and has a place-holder xBestIndex.
(check-in: [c2c1d656]
user: drh
branch: dbpage,
size: 135013)

[cd03aeca]
part of check-in [e63d1a7c]
Use a mutex-free PRNG for the random() and randomblob() SQL functions and for
the randomness used during checkpoint operations.
(check-in: [e63d1a7c]
user: drh
branch: mutex-free-randomness,
size: 134736)

[34a58563]
part of check-in [e1e3ca7e]
Have the header comment for sqlite3Checkpoint() mention TRUNCATE along with
the other three checkpoint types. No changes to code.
(check-in: [e1e3ca7e]
user: dan
branch: trunk,
size: 134701)

[48a64194]
part of check-in [a06263f1]
Faster memory allocation from lookaside by not trying to keep track of the
number of outstanding allocations, and rather computing that value only
when requested.
(check-in: [a06263f1]
user: drh
branch: trunk,
size: 134688)

[c74d1550]
part of check-in [cc440400]
Remove the rarely-used scratch memory allocator. This makes the code smaller,
faster, and easier to maintain. In place of the scratch allocator, add the
SQLITE_CONFIG_SMALL_MALLOC configuration option that provides a hint to SQLite
that large memory allocations should be avoided.
(check-in: [cc440400]
user: drh
branch: begin-concurrent-branch-3.19,
size: 135215)

[227a83d3]
part of check-in [54b00024]
Remove the rarely-used scratch memory allocator. This makes the code smaller,
faster, and easier to maintain. In place of the scratch allocator, add the
SQLITE_CONFIG_SMALL_MALLOC configuration option that provides a hint to SQLite
that large memory allocations should be avoided.
(check-in: [54b00024]
user: drh
branch: trunk,
size: 134620)

[5edd1774]
part of check-in [3808a00f]
Add the new sqlite3.mDbFlags field. Factor out bits of sqlite3.flags that
do not interact with PRAGMA statements into sqlite3.mDbFlags.
(check-in: [3808a00f]
user: drh
branch: trunk,
size: 135504)

[20574bb9]
part of check-in [f27b6370]
Update error message text for standard error codes to better describe the
latest usage of those error codes. Modify sqlite3_open_v2() so that it does
return a valid sqlite3 object in the event of SQLITE_MISUSE due to bad
open flags, so that sqlite3_errmsg() does not report "out of memory" in that
case.
(check-in: [f27b6370]
user: drh
branch: trunk,
size: 135438)

[e36ab281]
part of check-in [732f90d6]
Change the error message text for SQLITE_ERROR to omit the part about
"missing database" as that meaning is now obsolete (since approx SQLite 2.0).
(check-in: [732f90d6]
user: drh
branch: trunk,
size: 135501)

[36556f2e]
part of check-in [942c3ef8]
Instead of the new sqlite3_prepare_v3() interface, provide the
SQLITE_DBCONFIG_PREPARE_FLAGS interface which sets the flags on the single
next call to sqlite3_prepare_v2() or its cousins.
(check-in: [942c3ef8]
user: drh
branch: dbconfig-prepare-flags,
size: 135474)

[aaf24be7]
part of check-in [0ff057d8]
Build the "stmts" virtual table into the amalgamation. It is active only
when compiled using SQLITE_ENABLE_STMTSVTAB. That option is supplied to the
command-line shell.
(check-in: [0ff057d8]
user: drh
branch: stmts-vtab,
size: 135525)

[18f2145d]
part of check-in [bc1951d6]
Rework the code in ctime.c a bit to report on more compile time options. And
to only output configuration options passed in to SQLite, not the default
values of #define symbols set automatically. Also generate the large array in
ctime.c using new script tool/mkctime.tcl, instead of entering it manually.
(check-in: [bc1951d6]
user: dan
branch: ctime-refactor,
size: 135180)

[65eb6093]
part of check-in [e39795d7]
In SQLITE_DEBUG mode, attempt to log the page number of the database that
contained the problem when SQLITE_CORRUPT errors are seen.
(check-in: [e39795d7]
user: drh
branch: trunk,
size: 133906)

[a56577fa]
part of check-in [4510d55d]
Remove a surplus semicolon, which was harmless on gcc and clang but caused
compile-time errors on msvc. This only comes up using the encryption extension.
(check-in: [4510d55d]
user: drh
branch: branch-3.19,
size: 133634)

[1054e4db]
part of check-in [987a2b55]
Remove a surplus semicolon, which was harmless on gcc and clang but caused
compile-time errors on msvc. This only comes up using the encryption extension.
(check-in: [987a2b55]
user: drh
branch: trunk,
size: 133662)

[55d0f1cc]
part of check-in [3ea2bad2]
Fix a case where NULL was being passed to memcmp() following an OOM. This is
probably not a real problem, as the number-of-bytes parameter was passed 0 in
this case, but it was causing a santizer complaint.
(check-in: [3ea2bad2]
user: dan
branch: trunk,
size: 133663)

[15832624]
part of check-in [fe41bb56]
Add an sqlite3_set_last_insert_rowid() method. Use it to work around fts4 and
fts5 modifying the last-insert-rowid unintuitively from within commit
processing.
(check-in: [fe41bb56]
user: dan
branch: set-last-insert-rowid,
size: 133505)

[504a2a6c]
part of check-in [2a8f6c89]
Add temporary code to record and report on the set of b-tree pages read and
written by the current transaction. This is likely still buggy.
(check-in: [2a8f6c89]
user: dan
branch: transaction-pages,
size: 133923)

[f2d0e344]
part of check-in [7854bee2]
Allow sqlite3_interrupt() to be invoked on a database connection that is in
the process of being closed even if SQLITE_ENABLE_API_ARMOR is defined.
(check-in: [7854bee2]
user: drh
branch: trunk,
size: 133113)

[ec789a41]
part of check-in [2f481b85]
The schema name "main" is always an acceptable alias for the primary database
even if the primary database is renamed using SQLITE_DBCONFIG_MAINDBNAME.
(check-in: [2f481b85]
user: drh
branch: trunk,
size: 133068)

[5669ae83]
part of check-in [28393c41]
Remove the requirement to open the wal file before sqlite3_snapshot_recover()
is called. Also add some comments to new functions.
(check-in: [28393c41]
user: dan
branch: serializable-snapshot,
size: 133175)

[602d7179]
part of check-in [83b658da]
Require that the database handle be in autocommit mode for
sqlite3_snapshot_get() to succeed. This is because it may open a read
transaction on the database file.
(check-in: [83b658da]
user: dan
branch: serializable-snapshot,
size: 132391)

[6890ce01]
part of check-in [e8a9bfec]
Add compile time option SQLITE_ENABLE_URI_00_ERROR. If defined, any "%00"
escape found in a URI is treated as an error.
(check-in: [e8a9bfec]
user: dan
branch: uri-00-error,
size: 132273)

[14fb66ee]
part of check-in [6bf5ba10]
Revise the implementation of OP_Once so that it is smaller, faster, and uses
less memory. This also fixes an obscure bug introduced 3 days ago by check-in
[5990a1bdb4a073].
(check-in: [6bf5ba10]
user: drh
branch: trunk,
size: 131869)

[b8c598be]
part of check-in [e9acf616]
Fix the sqlite3_trace_v2() interface so that it goes disabled if either the callback or mask arguments are zero, in accordance with the documentation. Cherrypick of [37e6c54b1afc6348].
(check-in: [e9acf616]
user: mistachkin
branch: branch-3.14,
size: 131130)

[0bfcf1a5]
part of check-in [37e6c54b]
Fix the sqlite3_trace_v2() interface so that it goes disabled if either the
callback or mask arguments are zero, in accordance with the documentation.
(check-in: [37e6c54b]
user: drh
branch: trunk,
size: 131265)

[8dc7adfe]
part of check-in [92a22f01]
Rename the Db.zName field to Db.zDbSName to make it more descriptive and to
distinguish it from all of the other "zName" variables scattered throughout
the code.
(check-in: [92a22f01]
user: drh
branch: zDbSName,
size: 131079)

[16c1b211]
part of check-in [1c5baae3]
Fix code so that the deprecated sqlite3_trace() and sqlite3_profile()
interfaces are not called when SQLITE_OMIT_DEPRECATED is used.
(check-in: [1c5baae3]
user: drh
branch: trunk,
size: 131070)

[ade3b39f]
part of check-in [99ee7ee5]
Add the sqlite3_expanded_sql() interface. Refinements to the
sqlite3_trace_v2() interface to make it more useful.
(check-in: [99ee7ee5]
user: drh
branch: sqlite3_trace_v2,
size: 131016)

[405d13e3]
part of check-in [b2ae5bfa]
Revert sqlite3_enable_load_extension() to its original long-standing behavior.
Add SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION which will enable only the C-API and
leave the SQL function disabled.
(check-in: [b2ae5bfa]
user: drh
branch: load-ext-security,
size: 130115)

[1e93cbb1]
part of check-in [b7570ac1]
Add the SQLITE_DBCONFIG_REQUIRE_TXN argument for sqlite3_dbconfig() which when
set requires an explicit transaction before updating the database.
(check-in: [b7570ac1]
user: drh
branch: require-write-txn,
size: 130115)

[63791c66]
part of check-in [605eba4a]
The sqlite3_column_decltype() routine should return NULL, not an empty string,
if the column has no declared type.
(check-in: [605eba4a]
user: drh
branch: trunk,
size: 129356)

[32c45647]
part of check-in [842b2116]
Reduce the amount of heap required to store many schemas by storing each
column datatype appended to the column name, rather than as a separate
allocation.
(check-in: [842b2116]
user: drh
branch: schema-storage,
size: 129200)

[be9309f4]
part of check-in [374b5108]
Provide the new SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER option to
sqlite3_db_config() that can be used to activate the two-argument version
of fts3_tokenizer() for a specific database connection at run-time.
(check-in: [374b5108]
user: drh
branch: trunk,
size: 129143)

[17cfc8ba]
part of check-in [3201fbcc]
Improvements to the application-defined function mechanism so that it is
more compact and runs faster, especially when the application defines
thousands of new SQL functions.
(check-in: [3201fbcc]
user: drh
branch: many-app-functions,
size: 128658)

[b67a4539]
part of check-in [b0b4624f]
Add a utility program that looks for assert(), NEVER(), ALWAYS(), and
testcase() macros that have side-effects, and reports errors when they are
found. Also fix a bug that this utility detected as it was being tested.
(check-in: [b0b4624f]
user: drh
branch: trunk,
size: 128760)

[b9641a4f]
part of check-in [2081d757]
Changes to the way that the default BINARY collating sequence is recorded
result in a slightly smaller and slightly faster executable. More work could
be done to make this cleaner.
(check-in: [2081d757]
user: drh
branch: trunk,
size: 128601)

[2f33510a]
part of check-in [b9c90f10]
Update the sqlite3_snapshot_get() API so that if the caller does not have an open read transaction on the named database, one is automatically opened.
(check-in: [b9c90f10]
user: dan
branch: snapshot-get,
size: 128562)

[3f2828fc]
part of check-in [7c6a809e]
Add the SQLITE_FCNTL_VFS_POINTER file control which obtains a pointer to
the top-level VFS in use by a database connection.
(check-in: [7c6a809e]
user: drh
branch: trunk,
size: 126651)

[bf26fbeb]
part of check-in [cab8126b]
Add support for the SQLITE_SQLLOG_CONDITIONAL environment variable to the logging code in test_sqllog.c. When defined, logging is only performed if the "<database>-sqllog" file is present in the file system when the main database is opened.
(check-in: [cab8126b]
user: dan
branch: trunk,
size: 126525)

[3679a4f4]
part of check-in [c1d96fb6]
Merge the version 3.9.0 changes and the incorporation of JSON1 and FTS5
into the amalgamation from trunk.
(check-in: [c1d96fb6]
user: drh
branch: sessions,
size: 125879)

[1bd38393]
part of check-in [e9e76e12]
Fix a couple of errors in fts5 compilation. This branch still does not build with -Wall -Werror.
(check-in: [e9e76e12]
user: dan
branch: amalg-json1-fts5,
size: 125256)

[ea3915d9]
part of check-in [dc2cf897]
Make sure that the mutex implementation can be altered after calling sqlite3_shutdown().
(check-in: [dc2cf897]
user: mistachkin
branch: mutexInitCmpSwap,
size: 125380)

[d3fd6de7]
part of check-in [da864658]
Merge trunk enhancements into the apple-osx branch. Most tests works, but
there are yet a few issues to be resolved.
(check-in: [da864658]
user: drh
branch: apple-osx,
size: 129441)

[acfb7cf3]
part of check-in [ac5d2e9d]
Add the sqlite3_experimental_log_open() interface. This is for diagnostic
use only and is not intended to ever go on trunk.
(check-in: [ac5d2e9d]
user: drh
branch: experimentalIoLog,
size: 126341)

[6dd8bf94]
part of check-in [7f0ee770]
Merge all changes in the latest 3.8.11 beta into the sessions branch.
Changes include the rename of OTA to RBU, the WITHOUT-ROWID-OR-Skipscan fix,
and improvements to pcache1.
(check-in: [7f0ee770]
user: drh
branch: sessions,
size: 125237)

[5e170f7c]
part of check-in [39936b33]
Merge all the latest enhancements from trunk. This merge include FTS5
and a number of notable performance enhancements.
(check-in: [39936b33]
user: drh
branch: sessions,
size: 125172)

[37e30830]
part of check-in [46e86b06]
Add a script to combine all fts5 code into a single file - fts5.c - that can be used to build an SQLite loadable extension.
(check-in: [46e86b06]
user: dan
branch: fts5,
size: 124718)

[a5e55e2b]
part of check-in [4d42bf5e]
Merge the latest trunk enhancements, and especially the fix for the infinite
loop on a DROP TABLE in a corrupt database, into the apple-osx branch.
(check-in: [4d42bf5e]
user: drh
branch: apple-osx,
size: 128561)

[893ca895]
part of check-in [1db198cc]
Avoid a linear scan of the entire table when ota updates or deletes a row from a table with an external primary key index.
(check-in: [1db198cc]
user: dan
branch: ota-update,
size: 124952)

[c4cb192e]
part of check-in [cdaeab46]
Have ota use imposter tables to write to indexes instead of the sqlite3_index_writer() interface. The error handling in this version is broken in a few small ways.
(check-in: [cdaeab46]
user: dan
branch: ota-update,
size: 123092)

[ce38ddce]
part of check-in [42d56017]
Change SQLITE_TESTCTRL_INITMODE to SQLITE_TESTCTRL_IMPOSTER. Revise the order
of parameters. Give it the ability to reset the schema parse table so that
imposter tables can be erased.
(check-in: [42d56017]
user: drh
branch: trunk,
size: 122433)

[341fcc56]
part of check-in [53429689]
Ensure that "PRAGMA wal_checkpoint = TRUNCATE|FULL|RESTART" block on other connections and truncate the wal file as required even if the entire wal file has already been checkpointed.
(check-in: [53429689]
user: dan
branch: trunk,
size: 121176)

[54c26e3f]
part of check-in [9e92a5ed]
Improvements to compile-time-option hygiene. Use "#if OPTION" instead of
"#ifdef OPTION" in cases where that makes sense, so that -DOPTION=0 will work.
Add the "Have-Not" configuration in releasetest.tcl which disables all of
the "HAVE_component" compile-time options.
(check-in: [9e92a5ed]
user: drh
branch: trunk,
size: 121141)

[1b20d9b1]
part of check-in [5a2dec55]
Merge recent enhancements from trunk, including test scripts enhancements and
the removal of limits on the number of terms in a VALUES clause.
(check-in: [5a2dec55]
user: drh
branch: sessions,
size: 121852)

[fa2128ef]
part of check-in [5b7ca013]
When building the amalgamation with SQLITE_ENABLE_IOTRACE defined, do not mark symbol sqlite3IoTrace as static.
(check-in: [5b7ca013]
user: dan
branch: trunk,
size: 121055)

[784f3d61]
part of check-in [3f7dbdb5]
Permit sqlite3_shutdown() to be called with OMIT_WSD enabled and without having called sqlite3_initialize() first.
(check-in: [3f7dbdb5]
user: mistachkin
branch: trunk,
size: 121037)

[1f40f661]
part of check-in [b7489f94]
Fix a bug in the threadtest4.c program. Remove the keyinfo cache as it provides
minimal performance improvements, and then only at SQL preparation time, not
at runtime, and it has problems with data races in shared-cache mode. We might
later add the keyinfo cache back but only enable it when shared-cache mode
is off.
(check-in: [b7489f94]
user: drh
branch: threadtest4,
size: 120839)

[4bfb07de]
part of check-in [cf9be419]
Fix the sqlite3_table_column_metadata() routine so that it gives the correct
answer for the "rowid" column in a WITHOUT ROWID table. Enhance it so that
it can be used to check for the existence of a table by setting the column
name parameter to NULL. The routine is now included in the build by
default, even without the SQLITE_ENABLE_COLUMN_METADATA compile-time option.
(check-in: [cf9be419]
user: drh
branch: trunk,
size: 122173)

[ad4c0ed3]
part of check-in [4f7549ff]
Make the sqlite3_table_column_metadata() interface available by default and
without requiring the SQLITE_ENABLE_COLUMN_METADATA compile-time option.
Other sqlite3_column_* interfaces that have a run-time penalty even if they
are unused still require the SQLITE_ENABLE_COLUMN_METADATA option at
compile-time.
(check-in: [4f7549ff]
user: drh
branch: trunk,
size: 122063)

[cd819123]
part of check-in [600cefdd]
Add SQLITE_ENABLE_OTA pre-processor directives so that this branch may be compiled with or without OTA.
(check-in: [600cefdd]
user: dan
branch: ota-update,
size: 121912)

[46e2f592]
part of check-in [f09055f3]
Merge recent trunk enhancements, including the read-after-ROLLBACK change
and the addition of sqlite3_stmt_scanstatus() support, as well as various
minor bug fixes.
(check-in: [f09055f3]
user: drh
branch: sessions,
size: 121463)

[1bdabb62]
part of check-in [d4b2d5d0]
Enhance ROLLBACK so that pending queries are allowed to continue as long
as the schema does not change.
This is a cherry-pick of check-in [b5df5ac052].
(check-in: [d4b2d5d0]
user: drh
branch: branch-3.8.7,
size: 112902)

[d3310d5e]
part of check-in [fa6e6a9a]
Experimental changes that permit read operations to continue after a
ROLLBACK, as long as the schema is unchanged.
(check-in: [fa6e6a9a]
user: drh
branch: read-after-rollback,
size: 120778)

[2b882f64]
part of check-in [c297a84b]
Add the SQLITE_ENABLE_API_ARMOR compile-time option. This is a work in
progress and is not yet completely functional.
(check-in: [c297a84b]
user: drh
branch: api-armor,
size: 116141)

[f1726e70]
part of check-in [e3305d4b]
Remove the SQLITE_CONFIG_WORKER_THREADS configuration parameter. The number
of worker threads in the sorter is now determined only by the
PRAGMA threads=N setting.
(check-in: [e3305d4b]
user: drh
branch: threads,
size: 112567)

[5cd4d503]
part of check-in [36b7c5ce]
The SQLITE_IOERR_BLOCKED extended error code is not longer used, so remove
assert() statements and documentation for that error code. Also make other
documentation improvements.
(check-in: [36b7c5ce]
user: drh
branch: trunk,
size: 112158)

[d0fa35a8]
part of check-in [f1c76c7c]
Limit the maximum SQLITE_MAX_ATTACHED to 127, since a signed character
is sometimes used to store the database index.
(check-in: [f1c76c7c]
user: drh
branch: trunk,
size: 111949)

[bba87834]
part of check-in [1a817ae2]
Allow the SQLITE_MAX_ATTACHED compile-time option to be larger than 62. The
default limit on the number of attached databases remains 10.
(check-in: [1a817ae2]
user: drh
branch: trunk,
size: 111919)

[40d0837e]
part of check-in [8d8af114]
Fix the sqlite3_db_readonly() API so that it reports true if the database
is readonly because the file format write version (byte 18 of the header)
is too large.
(check-in: [8d8af114]
user: drh
branch: trunk,
size: 111935)

[5c9f16a8]
part of check-in [17349a49]
Changes to help ensure that a multiplication does not overflow when computing
the number of bytes needed for a memory allocation, and cause a malfunction.
No problems existing problems were discovered. However, these changes should
help to ensure that no problems arise in the future.
(check-in: [17349a49]
user: drh
branch: safer-malloc,
size: 111959)

[bf60d71e]
part of check-in [0d43a7ad]
Repurpose the SQLITE_TESTCTRL_FAULT_INSTALL test-control to register a
callback to be invoked by sqlite3FaultSim(). That test-control has been
unused since 2008-06-20 and was never used in any official release.
(check-in: [0d43a7ad]
user: drh
branch: trunk,
size: 111720)

[274a72f5]
part of check-in [d7e2b0d9]
In the sorter, only use large memory allocations if scratch memory has not
been configured. Add #ifdefs to disable unused code when
SQLITE_MAX_WORKER_THREADS is zero. Other sorter changes in support
of testability.
(check-in: [d7e2b0d9]
user: drh
branch: threads,
size: 111634)

[b3ce9d74]
part of check-in [9411d7dc]
Initial attempt to merge in all trunk changes over the previous 1.5 years.
This check-in compiles but there are compiler warnings and "make test"
segfaults after only running a few test modules.
(check-in: [9411d7dc]
user: drh
branch: apple-osx,
size: 115860)

[0a8cfb6b]
part of check-in [9c696196]
Add the SQLITE_TESTCTRL_BYTEORDER test control to interrogate SQLite's notion
of the processor byte order and whether the byte order is known at compile-time
or determined at run-time.
(check-in: [9c696196]
user: drh
branch: trunk,
size: 111128)

[691b2575]
part of check-in [6504aa47]
Fix an obscure bug causing sqlite3_close() to fail if there are virtual tables on the disconnect list when it is called.
(check-in: [6504aa47]
user: dan
branch: trunk,
size: 110568)

[37f55de2]
part of check-in [a221aa82]
Enhance sqlite3_randomness(N,P) such that it resets the internal PRNG
if N is less than 1. Subsequent calls to sqlite3_randomness() will reinitialize
the internal PRNG by calling the xRandomness() method of the default VFS.
(check-in: [a221aa82]
user: drh
branch: trunk,
size: 110178)

[3f00c4ad]
part of check-in [ca3fdfd4]
Make sure errors encountered while initializing extensions such as FTS4
get reported out from sqlite3_open(). This fixes a bug introduced by
check-in [9d347f547e7ba9]. Also remove lots of forgotten "breakpoint"
commands left in test scripts over the years.
(check-in: [ca3fdfd4]
user: drh
branch: trunk,
size: 110243)

[45e08d8c]
part of check-in [5716fc23]
Allow the SQLITE_DETERMINISTIC flag to be ORed into the preferred text encoding
of application-defined functions, to mark the function as deterministic.
(check-in: [5716fc23]
user: drh
branch: trunk,
size: 110206)

[74bdee8f]
part of check-in [15e4f63d]
Add a new sqlite3_test_control() that indicates that database files are
always well-formed. Use this during testing to enable assert() statements
that prove conditions that are always true for well-formed databases.
(check-in: [15e4f63d]
user: drh
branch: trunk,
size: 109894)

[d802034d]
part of check-in [5addd123]
Merge in the WITHOUT ROWID changes. A few tests are failing now. They will
be fixed in a follow-on check-in.
(check-in: [5addd123]
user: drh
branch: sessions,
size: 109830)

[97cc7970]
part of check-in [cdd3838b]
Merge in all the latest trunk changes, including the win32-longpath VFS and
the fix for the segfault in the omit-left-join optimization.
(check-in: [cdd3838b]
user: drh
branch: sessions,
size: 108764)

[f6eb795f]
part of check-in [e2b597ca]
If the SQLITE_EXTRA_INIT function is defined, make sure it is called only
once by the effective sqlite3_initialize() call.
(check-in: [e2b597ca]
user: drh
branch: trunk,
size: 107890)

[482135b0]
part of check-in [3adb6c1b]
If the SQLITE_ALLOW_URI_AUTHORITY compile-time option is set, then allow
non-localhost authorities on URI filenames and pass them through as a UNC
to the underlying VFS.
(check-in: [3adb6c1b]
user: drh
branch: trunk,
size: 107750)

[b2592b41]
part of check-in [c93d891b]
Use a new error code to represent a failure to get the configured temporary directory on Windows.
(check-in: [c93d891b]
user: mistachkin
branch: trunk,
size: 107722)

[a7efdff1]
part of check-in [de05eb75]
Another attempt at generalizing the URI parsing so that it works with a
wider variety of file URIs and yet remains backwards compatible.
(check-in: [de05eb75]
user: drh
branch: uri-enhancement,
size: 108333)

[746b5f09]
part of check-in [74c12dee]
Update the URI filename parser to allow (and ignore) authority names in
unix and to pass the authority through to the OS on windows, as this
appears to be what web-browsers are doing.
(check-in: [74c12dee]
user: drh
branch: uri-enhancement,
size: 108128)

[e5810b2d]
part of check-in [527121ac]
Add the "defer_foreign_keys" pragma and the SQLITE_DBSTATUS_DEFERRED_FKS
value for sqlite3_db_status(). This is a cherry-pick of a sequence of five
checkins in the sessions branch between [1d44e5d3c2] and [d39e65fe70].
(check-in: [527121ac]
user: drh
branch: trunk,
size: 107640)

[89398653]
part of check-in [1d44e5d3]
Experimental change to the handling of foreign key constraint violations when applying a changeset: all foreign keys, immediate and deferred, are deferred until the end of the transaction (or sub-transaction) opened by the sqlite3changeset_apply(). A single call to the conflict-handler (if any) is made if any FK constraint violations are still present in the database at this point. The conflict-handler may choose to rollback the changeset or to apply it, constraint violations and all.
(check-in: [1d44e5d3]
user: dan
branch: sessions,
size: 108063)

[b2d6a805]
part of check-in [361c2296]
Add extended error code SQLITE_BUSY_SNAPSHOT - returned in WAL mode when a read-transaction cannot be upgraded to a write-transaction because it is reading from a snapshot other than the most recently committed.
(check-in: [361c2296]
user: dan
branch: trunk,
size: 107390)

[f33742ab]
part of check-in [2f97e38a]
Finish removing the sqlite3.inTrans field. In the previous check-in, it was
merely commented out because I failed to select File->Save on my text editor.
(check-in: [2f97e38a]
user: drh
branch: trunk,
size: 107309)

[c6419ef5]
part of check-in [d11e7607]
In sqlite3_close_v2(), do not attempt to roll back a transaction if there exist active statement objects. Any open transaction will be rolled back when the last of these statement objects is finalized.
(check-in: [d11e7607]
user: dan
branch: trunk,
size: 107410)

[ccbac976]
part of check-in [6071b7cc]
When closing a connection, avoid tripping active cursors belonging to a different shared-cache client. Also, if sqlite3_close() is called while there are still active statements belonging to the connection, return SQLITE_BUSY and do not roll back any active transaction.
Proposed fix for ticket [e636a050b709].
(check-in: [6071b7cc]
user: dan
branch: shared-cache-fixes,
size: 107012)

[de47c3e6]
part of check-in [ea1404a1]
Refactoring the mmap interface. The controlling pragma is now "mmap_size"
instead of "mmap_limit". Also change SQLITE_CONFIG_MMAP_LIMIT and
SQLITE_FCNTL_MMAP_LIMIT to SQLITE_CONFIG_MMAP_SIZE and
SQLITE_FCNTL_MMAP_SIZE, respecctively.
The default mmap_size is now always 0, meaning that
memory mapped I/O is off by default. There is a new compile-time option
SQLITE_MAX_MMAP_SIZE that determines a hard upper bound on the mmap_size.
Setting SQLITE_MAX_MMAP_SIZE to zero disables the memory-mapped I/O logic
and causes it to be omitted from the build. An extra argument is added
to SQLITE_CONFIG_MMAP_SIZE that can optionally lower the SQLITE_MAX_MMAP_SIZE
at start-time. The SQLITE_MAX_MMAP_SIZE is zero for platforms where we
know that it does not work, meaning that it cannot be turned on by mistake
on those platforms.
(check-in: [ea1404a1]
user: drh
branch: trunk,
size: 99705)

[54a84185]
part of check-in [78141d0a]
Add the SQLITE_CONFIG_MMAP_LIMIT configuration option for overriding the
SQLITE_DEFAULT_MMAP_LIMIT compile-time setting. Enhance "PRAGMA mmap_limit"
so that without a specific database name, it sets the limit on all database
files and changes the default for any future databases that might be added
using ATTACH.
(check-in: [78141d0a]
user: drh
branch: experimental-mmap,
size: 99466)

[8d204866]
part of check-in [680d3ab5]
Do not rollback the schema if a parsing error occurs while parsing the schema
and writable_schema is set.
(check-in: [680d3ab5]
user: drh
branch: trunk,
size: 99209)

[e8e33e61]
part of check-in [ba8d08b6]
Update the sessions branch to include the SQLLOG enhancement, the
SQLITE_IOERR_DELETE_NOENT fix, and a fix for the number-of-documents
bug in FTS4.
(check-in: [ba8d08b6]
user: drh
branch: sessions,
size: 99869)

[52494860]
part of check-in [1e874629]
Query planner enhancements to be more agressive about optimizing out ORDER BY
clauses - in particular the query planner now has the ability to omit ORDER BY
clauses that span multiple tables in a join.
(check-in: [1e874629]
user: drh
branch: trunk,
size: 98326)

[c5fec981]
part of check-in [d2fcba1e]
Add more bits to the bit vector that is used to disable optimizations for
built-in test. Add specific bit patterns to disable ORDER BY using an
index in general and for joins. Use macros to test for bits in the
disabled-optimization bit vector, in order to make the code clearer.
(check-in: [d2fcba1e]
user: drh
branch: qp-enhancements,
size: 98303)

[31af732a]
part of check-in [22ebc668]
Add an experimental busy_timeout pragma to facilitate access to the
sqlite3_busy_timeout() interfaces for programmers that are working from
behind a language wrapper that does not expose that interface.
(check-in: [22ebc668]
user: drh
branch: busy-timeout-pragma,
size: 98011)

[7ccc7d2d]
part of check-in [e276a02b]
The sqlite3_close() interface returns SQLITE_OK even if there are outstanding
sqlite3_stmt and sqlite3_backup objects. The connection becomes a zombie.
Resource deallocation is deferred until the last sqlite3_stmt or
sqlite3_backup object closes. This is intended to help SQLite play nicer
with garbage collectors.
(check-in: [e276a02b]
user: drh
branch: deferred-close,
size: 95177)

[fdd95737]
part of check-in [651520fa]
Add the mode=memory option to URI filenames, which when present forces the
database to be an in-memory database. This enables named in-memory databases.
(check-in: [651520fa]
user: drh
branch: trunk,
size: 94482)

[a2cfba18]
part of check-in [e3ad61e0]
Only allow :memory: databases to share cache if there are created using a
URI filename. This minimizes the risk of breakages in legacy applications
that have shared-cache enabled but also use :memory: databases which they
expect to keep separate.
(check-in: [e3ad61e0]
user: drh
branch: shared-cache-memdb,
size: 94279)

[28804c01]
part of check-in [aa0c3493]
The former sqlite3ResetInternalSchema() routine was really two different
routines, selected by parameter, each with a confused mission. So split
this routine up into three separate smaller routines, calling each
separately as needed. Hopefully this will make further refactoring and
schema reset collateral damage containment easier.
(check-in: [aa0c3493]
user: drh
branch: shared-schema,
size: 95013)

[62146c65]
part of check-in [46f4eb54]
When a connection disconnects from a shared-cache database, only delete the in-memory schema if there are no other connections.
(check-in: [46f4eb54]
user: dan
branch: shared-schema,
size: 95005)

[d5ee3f6b]
part of check-in [cd70bc4b]
Reset the sqlite3_data_directory and sqlite3_temp_directory variables when the sqlite3_shutdown function is called since they may refer to memory allocated by the heap subsystem that was just shutdown.
(check-in: [cd70bc4b]
user: mistachkin
branch: winrt,
size: 94601)

[91458c71]
part of check-in [254f99ea]
Add the sqlite3_db_readonly() interface. This is still tentative, pending
a closer look at other ideas to accomplish the same thing.
(check-in: [254f99ea]
user: drh
branch: db-readonly-api,
size: 94248)

[e936269f]
part of check-in [549f4fd0]
Add the new SQLITE_ABORT_ROLLBACK extended error code to be returned for
statements that are cancelled due to a rollback.
(check-in: [549f4fd0]
user: drh
branch: nonblocking-rollback,
size: 93929)

[b94f3784]
part of check-in [922bcbb4]
Generalize the interrupt mechanism so that individual statements can be
interrupted and so that codes other than just SQLITE_INTERRUPT can be
returned as a consequence of an interrupt.
(check-in: [922bcbb4]
user: drh
branch: generalize-interrupt,
size: 93582)

[7f960366]
part of check-in [c83627b7]
Add the ability to enable or disable SQLITE_IOCAP_ZERO_DAMAGE using a URI
parameter for both unix and windows. Add a file-control to query or disable
the ZERO_DAMAGE setting. Add the -uri option to the "sqlite3" TCL command
in tclsqlite3.c. Allow the sqlite3_uri_parameter() interface to accept a
NULL pointer for its first parameter.
(check-in: [c83627b7]
user: drh
branch: statvfs,
size: 92731)

[e7e69853]
part of check-in [8e65b913]
Change the SQLITE_EXTRA_INIT routine to take a single argument which is a
pointer to a string. Call SQLITE_EXTRA_INIT with a NULL argument.
Fixes to multiplexor to treat the VFS properly in corner cases. Fix the
initialization of multiplex3.test.
(check-in: [8e65b913]
user: drh
branch: nx-devkit,
size: 92388)

[f6abb5b6]
part of check-in [c2ed86f5]
Add a compile-time shutdown procedure to be called by sqlite3_shutdown()
to undo the effects of the compile-time initialization procedure.
(check-in: [c2ed86f5]
user: drh
branch: nx-devkit,
size: 92315)

[87dd4f6e]
part of check-in [6bda711f]
Follow-on to the previous check-in to prevent a division by zero if the
lookahead slot size is something goofy like 6 on a 32-bit machine.
(check-in: [6bda711f]
user: drh
branch: experimental-pcache,
size: 91489)

[666a78ff]
part of check-in [0e53ecad]
Use sqlite3MallocSize() to get the actual size of the memory allocation
used for lookaside cache and increase the size of the cache to use the
full allocation.
(check-in: [0e53ecad]
user: drh
branch: experimental-pcache,
size: 91523)

[df06f522]
part of check-in [39408702]
Added the tool/warnings-clang.sh script. Changes so that there are no
warnings with either gcc or clang even including FTS4 and RTREE and
both with and without SQLITE_THREADSAFE=0.
(check-in: [39408702]
user: drh
branch: trunk,
size: 91489)

[82863f47]
part of check-in [60fee957]
Add assert() statements and eliminate needless variable assignments in order
to get the clang scan-build utility to report zero problems against the
SQLite core. Clang's static analysis did find one real problem - but it was
in the command-line shell, not in the SQLite core.
(check-in: [60fee957]
user: drh
branch: trunk,
size: 91474)

[4aabaa8d]
part of check-in [6cb43f6c]
Forward port the Apple-specific changes from [db5b7b778c] in the
apple-osx-377 branch. Fix this up so that it will compile and run on Linux.
(check-in: [6cb43f6c]
user: drh
branch: apple-osx,
size: 93144)

[6dc61e8b]
part of check-in [57912327]
Bring the apple-wal-readonly branch up to date with the latest changes
in apple-osx, and especially the fix for disappearing WAL transactions.
(check-in: [57912327]
user: drh
branch: apple-wal-readonly,
size: 91999)

[f50e8d60]
part of check-in [97b98010]
Pull in the patches to support read-only WAL databases into a new branch
off of the apple-osx branch. This also pulls in all the other pending
3.7.7 changes such as URI support.
(check-in: [97b98010]
user: drh
branch: apple-wal-readonly,
size: 91116)

[167fb328]
part of check-in [671ba5fc]
Only open a read-only connection to shared-memory if the "readonly_shm=1" option is specified as part of the database file URI (and if a read-write connection fails).
(check-in: [671ba5fc]
user: dan
branch: wal-readonly,
size: 90242)

[e32d7a44]
part of check-in [3e490915]
Have flags passed to sqlite3_open_v2() apply to the main and any attached databases. And change things so that any "mode=xxx" or "cache=xxx" options specified as part of a URI for the main database do not also apply to attached databases.
(check-in: [3e490915]
user: dan
branch: trunk,
size: 89881)

[f00cee5a]
part of check-in [d9bc1c7f]
Return a suitable error message if the mode= argument to a URI specifies
a higher mode than what is allowed by context. Other minor cleanups for
the URI parsing logic.
(check-in: [d9bc1c7f]
user: drh
branch: trunk,
size: 89881)

[9c9cfeb1]
part of check-in [3c926ce0]
Return SQLITE_MISUSE from the sqlite3_open_v2() function if the 3rd parameter
is not a valid set of bit-values.
(check-in: [3c926ce0]
user: drh
branch: trunk,
size: 89742)

[2f46bf58]
part of check-in [aa90b943]
Remove some unnecessary modifications from the uri branch. Add a test to show that ATTACH only interprets its argument as a URI if the connection was opened with SQLITE_OPEN_URI (or URI interpretation is globally enabled).
(check-in: [aa90b943]
user: dan
branch: uri,
size: 89703)

[28da02ef]
part of check-in [b8a0f1b5]
Allow only "localhost" and "" as authorities in URIs. Do not allow escapes (%HH) in the authority part of a URI.
(check-in: [b8a0f1b5]
user: dan
branch: uri,
size: 88671)

[7f159a4c]
part of check-in [7155e6f3]
Backport check-ins [0900e35348f4b9bf3] and [4fead8e714c7e50] to the 3.7.2
branch. These check-ins provide hints to the btree layer for when it is
possible to use a hash table rather than a btree to implement an index.
The SQLite BTree layer does not use these hints, but alternative btree layers
might.
(check-in: [7155e6f3]
user: drh
branch: branch-3.7.2,
size: 72872)

[8b4ebab1]
part of check-in [68240e75]
Have the ATTACH command do URI interpretation in the same way as sqlite3_open() and sqlite3_open_v2() do.
(check-in: [68240e75]
user: dan
branch: uri,
size: 87169)

[14c019b3]
part of check-in [6a8ad6e3]
Begin a series of changes designed to reduce the scope and frequency of
invalidating schemas. Design goals are that the internal schema should
never be deleted out from under a prepared statement that is running and
that all prepared statements should be expired if the schema is invalidated.
At the same time, minimize the number of schema invalidations. This change
merely revises the sqlite3ResetInternalSchema() function to use -1 as the
wildcard for "all" rather than 0, so that we can reset the main schema
independently of all the others.
(check-in: [6a8ad6e3]
user: drh
branch: schema-parse-refactor,
size: 81424)

[2563bd9c]
part of check-in [9c3a6e47]
Merge in all the latest changes from the trunk, and especially the interface
changes to the SystemCall methods of the VFS.
(check-in: [9c3a6e47]
user: drh
branch: sessions,
size: 82028)

[c4ecb197]
part of check-in [e059152a]
Change the xSetSyscall methods of the VFS so that they do not cast object
pointers into function pointers. Fix other unrelated compiler warnings.
(check-in: [e059152a]
user: drh
branch: trunk,
size: 81421)

[bc1c822d]
part of check-in [5a4b6652]
Change blocking-checkpoint tests so that they run once using "PRAGMA wal_checkpoint" and once using calls to sqlite3_wal_checkpoint_v2(). Also fix edge cases surrounding the output variables set by wal_checkpoint_v2().
(check-in: [5a4b6652]
user: dan
branch: trunk,
size: 80025)

[1b04ef67]
part of check-in [bac7342c]
Merge in the blocking-checkpoint enhancement, including the new
sqlite3_wal_checkpoint_v2() interface and the
PRAGMA wal_checkpoint(full) statement.
(check-in: [bac7342c]
user: drh
branch: trunk,
size: 79827)

[89c658ae]
part of check-in [7e3fc2c8]
Add experimental command "PRAGMA wal_blocking_checkpoint", which uses the busy-handler to block until all readers have finished in order to ensure the next writer will be able to wrap around to the start of the log file.
(check-in: [7e3fc2c8]
user: dan
branch: blocking-checkpoint,
size: 78632)

[da74b226]
part of check-in [34edb54b]
Further updates to the sqlite3_pcache_methods documentation, plus the addition
of a few evidence marks related to pcache.
(check-in: [34edb54b]
user: drh
branch: trunk,
size: 78489)

[57869e79]
part of check-in [f483be44]
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
branch: trunk,
size: 76861)

[ce47368b]
part of check-in [4758d86d]
Make sqlite3_create_function() a special case of sqlite3_create_function_v2()
in order reduce the number of code paths and simplify testing.
(check-in: [4758d86d]
user: drh
branch: trunk,
size: 77936)

[185e558e]
part of check-in [9a724dfb]
Add the sqlite3_create_function_v2() API, a version of create_function that allows a destructor to be specified.
(check-in: [9a724dfb]
user: dan
branch: trunk,
size: 78011)

[13c87490]
part of check-in [5e8101c5]
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
branch: trunk,
size: 75814)

[99622181]
part of check-in [e75b52d1]
In shared-cache mode, do not allow one connection to checkpoint a database while a second connection is reading or writing the same shared-cache.
(check-in: [e75b52d1]
user: dan
branch: trunk,
size: 75030)

[4b55bb32]
part of check-in [5d694f04]
Add the SQLITE_TESTCTRL_PGHDRSZ verb for sqlite3_test_control() used to get
the size of pcache headers for testing purposes.
(check-in: [5d694f04]
user: drh
branch: trunk,
size: 75174)

[cc62a14d]
part of check-in [1b14195e]
Change the behavior of the sqlite3_wal_hook() callback. It should now return
SQLITE_OK or an error code and the error code is propagated back up the
stack. If a checkpoint is desired, the callback should invoke
sqlite3_wal_callback() itself.
(check-in: [1b14195e]
user: drh
branch: trunk,
size: 74849)

[23c51a3c]
part of check-in [7fecd21f]
Have sqlite3_wal_checkpoint() handle a zero-length string in the same way as a NULL pointer. Fix "PRAGMA wal_checkpoint" so that it checkpoints all attached databases.
(check-in: [7fecd21f]
user: dan
branch: trunk,
size: 74929)

[6bc746f6]
part of check-in [27a5c09c]
If the sqlite3_wal_checkpoint() API is passed a NULL pointer in place of a database name, attempt to checkpoint all attached databases.
(check-in: [27a5c09c]
user: dan
branch: wal,
size: 74844)

[0f66a2b0]
part of check-in [11a85b82]
Make sure the mutex is held while calling sqlite3ApiExit() in
sqlite3_wal_checkpoint(). Other cleanup of WAL logic.
(check-in: [11a85b82]
user: drh
branch: wal,
size: 74460)

[28171059]
part of check-in [62db5fa3]
Refactor wal.c to use the VFS. This check-in compiles and links and works
ok as long as you leave WAL turned off, but WAL does not work.
(check-in: [62db5fa3]
user: drh
branch: wal,
size: 71074)

[7d89bb6d]
part of check-in [8858042f]
Modify the vdbe so that the comparison operator opcodes do not modify the data type of operands. Fix for [aa92c76cd4].
(check-in: [8858042f]
user: dan
branch: trunk,
size: 70511)

[0d9826f7]
part of check-in [46f406b2]
Merge in all of the logging enhancements. This is a cherrypick merge of
the following check-ins: [103321e37a], [a8076aede3], [6d910245ad],
[7c4cca6d1a], [edea3bb740], [1a6d4bb130], [a8c984c1d6], [69a493182f], and
[1168763d2c].
(check-in: [46f406b2]
user: drh
branch: branch-3.6.22,
size: 70239)

[0ccd6480]
part of check-in [d3cdc4b1]
Add a new sqlite3_test_control() verb that facilitates testing that all
keywords are shown in the documentation. (Two keywords were found to
be missing while testing the change.)
(check-in: [d3cdc4b1]
user: drh
branch: trunk,
size: 69142)

[e477f3e3]
part of check-in [4a97c623]
Move the query flattener turn-off from a pragma to an sqlite3_test_control()
call. Make provisions (not yet implemented) to turn off other optimizers
using the same call.
(check-in: [4a97c623]
user: drh
branch: trunk,
size: 68473)

[5e12af46]
part of check-in [16a24b44]
All SQLITE_MAX_VARIABLE_NUMBER to exceed 32767. The sizes of some structures
increase when the compile-time parameter is configured this way.
(check-in: [16a24b44]
user: drh
branch: trunk,
size: 67729)

[6a877290]
part of check-in [f256bc07]
When a forced rollback occurs, cause all active statements on the same
database connection to halt immediately with an SQLITE_ABORT error code.
This is a partial fix to ticket [f777251dc7].
(check-in: [f256bc07]
user: drh
branch: trunk,
size: 67914)

[4956e8a3]
part of check-in [c304b44c]
On any rollback, immediately interrupt all running statements on the
same database connection. This is a partial fix for ticket [f777251dc7].
(check-in: [c304b44c]
user: drh
branch: experimental,
size: 67893)

[a936f18f]
part of check-in [0ba17c04]
Always provide a name for the TEMP database even if SQLite is compiled using
SQLITE_OMIT_TEMPDB. (CVS 6908)
(check-in: [0ba17c04]
user: drh
branch: trunk,
size: 66893)

[9f6d9181]
part of check-in [96729b2d]
Remove the priorNewRowid field from the sqlite3 structure. Use the
last_insert_rowid as the initial value when searching for a new random
rowid in the OP_NewRowid opcode. (CVS 6824)
(check-in: [96729b2d]
user: drh
branch: trunk,
size: 66483)

[120d65f0]
part of check-in [37ae5f5e]
Reorganize and cleanup the prepared statement object. Remove code that has
been commented out for ages and is no longer relevant to anything. (CVS 6786)
(check-in: [37ae5f5e]
user: drh
branch: trunk,
size: 66520)

[a30a4a7f]
part of check-in [e9b55ccc]
Remove the actual checks that verify that memory pools (such as set up
using SQLITE_CONFIG_HEAP) are 8-byte aligned. But document that 8-byte
alignment is required. (CVS 6742)
(check-in: [e9b55ccc]
user: drh
branch: trunk,
size: 66627)

[09fbadd5]
part of check-in [c37f0279]
Make sure the SQLITE_OPEN_EXCLUSIVE flag is ignored by sqlite3_open_v2().
That flag is to be used by the VFS interface only. Ticket #3855. (CVS 6629)
(check-in: [c37f0279]
user: drh
branch: trunk,
size: 66616)

[e557fd8f]
part of check-in [33cf8359]
Rework the logic that generates a schema for tables created using
"CREATE TABLE ... AS SELECT ...". Instead of trying to copy the raw
datatype string from the right-hand side, just make the type one
of TEXT, INT, REAL, NUM, or nothing. This is much simpler than
trying to parse and quote datatype strings. Other minor
implifications to build.c are bundled with this change. (CVS 6626)
(check-in: [33cf8359]
user: drh
branch: trunk,
size: 66271)

[27a22ea9]
part of check-in [80c43a35]
Remove the aFKey hash table, which was not being used. Simplify the
FKey object. Simplify the hash.c module since the copyKey parameter
formerly used only by aFKey is now no longer required. (CVS 6594)
(check-in: [80c43a35]
user: drh
branch: trunk,
size: 64263)

[a3270aea]
part of check-in [cb9af829]
Bring the documenation and implementation of sqlite3_collation_needed() into
agreement. Use a more efficient implementation of sqlite3ErrStr().
sqlite3_result_error_code() now calls sqlite3ErrStr() if no prior
error string was set. (CVS 6550)
(check-in: [cb9af829]
user: drh
branch: trunk,
size: 63838)

[b1eac85b]
part of check-in [bb1a390a]
Revise the implementation of sqlite3_initialize() slightly in order to make
it more easily testable. The functionality should be unchanged. (CVS 6519)
(check-in: [bb1a390a]
user: drh
branch: trunk,
size: 63970)

[96636e2a]
part of check-in [0c41f7cf]
Enhance sqlite3_shutdown() so that it automatically invokes
sqlite3_reset_auto_extension(). This is a harmless no-op if applications
are already calling sqlite3_reset_auto_extension() prior to sqlite3_shutdown().
And it prevents possible memory corruption if they do not. So it works
either way. Most of the changes are to the test cases. (CVS 6475)
(check-in: [0c41f7cf]
user: drh
branch: trunk,
size: 63959)

[95e13cd2]
part of check-in [db1d4d2f]
Use the ROUND8() macro to round an integer up to the nearest multiple of 8 and ROUNDDOWN8() macro to round down to the nearest multiple of 8. This is a cosmetic change. (CVS 6372)
(check-in: [db1d4d2f]
user: danielk1977
branch: trunk,
size: 63928)

[e7cc4e32]
part of check-in [64a8dcd8]
When compiled with SQLITE_DEBUG (in other words, when assert() is enabled)
the ALWAYS and NEVER macros will throw an assertion if their arguments are
not true or false, respectively. (CVS 6159)
(check-in: [64a8dcd8]
user: drh
branch: trunk,
size: 62719)

[cdc0fa9b]
part of check-in [a11241d6]
Removed a few more small parts of memsys6 code, including some config and test code for it; (CVS 5872)
(check-in: [a11241d6]
user: shane
branch: trunk,
size: 61813)

[df799b66]
part of check-in [4c6a90a1]
Add the sqlite3_extended_errcode() interface. Change to return
SQLITE_BUSY instead of SQLITE_ERROR when a COMMIT is attempted and one
or more queries are still pending. (CVS 5850)
(check-in: [4c6a90a1]
user: drh
branch: trunk,
size: 61883)

[fccd1a32]
part of check-in [79df72ee]
Raise the hard upper bound on SQLITE_MAX_FUNCTION_ARG to 1000 from 100.
The default upper bound is still 100, but it can now be raised as high
as 1000 at compile-time. (CVS 5780)
(check-in: [79df72ee]
user: drh
branch: trunk,
size: 61640)

[9c9cad9d]
part of check-in [18d030da]
Catch another case where SQLITE_IOERR could be returned instead of SQLITE_NOMEM following an out-of-memory error. (CVS 5739)
(check-in: [18d030da]
user: danielk1977
branch: trunk,
size: 61520)

[8704f231]
part of check-in [79364b96]
Add header file sqliteicu.h to the ICU extension. This is analogous to the rtree.h and fts3.h headers used by other extensions to declare their entry points. Fix for ticket #3361. (CVS 5680)
(check-in: [79364b96]
user: danielk1977
branch: trunk,
size: 61428)

[bebdb97a]
part of check-in [88c82759]
Move the sqlite3SharedCacheEnabled global and the inProgress static variable (function sqlite3_initialize()) into the global sqlite3Config structure. This is required for the OMIT_WSD feature to work on some platforms. (CVS 5662)
(check-in: [88c82759]
user: danielk1977
branch: trunk,
size: 61213)

[f3729683]
part of check-in [ce9c74ea]
If any error occurs during sqlite3_open(), move the database handle into "sick" state. When in the sick state the user can use sqlite3_errcode() and sqlite3_errmsg(), but not much else. (CVS 5628)
(check-in: [ce9c74ea]
user: danielk1977
branch: trunk,
size: 60668)

[c900d0f4]
part of check-in [cb494e10]
Add the pcache module from the experimental branch. Also change things so that most of the built-in SQL functions are kept in single static hash-table, rather than creating and populating a separate hash table for each open database connection. (CVS 5566)
(check-in: [cb494e10]
user: danielk1977
branch: trunk,
size: 60545)

[c5ed24ad]
part of check-in [697fe7a3]
Revise the initialization and shutdown logic so that it no longer keeps
a recursive mutex allocated for the whole interval but instead releases
the mutex as soon as possible. Do not reset status values upon initialization. (CVS 5559)
(check-in: [697fe7a3]
user: drh
branch: trunk,
size: 60334)

[70d285dc]
part of check-in [e48f9697]
Implement the "lookaside" memory allocation cache. Use of this cache makes
the speed1.test script run about 15% faster. Added new interfaces to
control the cache. (CVS 5488)
(check-in: [e48f9697]
user: drh
branch: trunk,
size: 57430)

[ff7d9e39]
part of check-in [ed8b2525]
Enhancements to the testing logic for malloc and mutex. Only permit one
of MEMSYS3/5 to be compiled-in at a time. Omit the SQLITE_CONFIG_MEMSYS3/5
configuration options. (CVS 5389)
(check-in: [ed8b2525]
user: drh
branch: trunk,
size: 55351)

[85517c4d]
part of check-in [7e58b787]
Add the SQLITE_OPEN_NOMUTEX flag. Used for opening connections that are not protected by an internal mutex. (CVS 5387)
(check-in: [7e58b787]
user: danielk1977
branch: trunk,
size: 54996)

[47b781b6]
part of check-in [8ed04b1e]
Completely rework the sqlite3SetString() primitive so that it honors the
SQLITE_LIMIT_LENGTH and avoids the use of strlen(). (CVS 5374)
(check-in: [8ed04b1e]
user: drh
branch: trunk,
size: 54795)

[1291a974]
part of check-in [30ff6bb0]
Fix the allocator in mem5.c so that it can be enabled at run time using the sqlite3_config() function. (CVS 5304)
(check-in: [30ff6bb0]
user: danielk1977
branch: trunk,
size: 53589)

[5ddfc15b]
part of check-in [9c6c8e01]
Fix up some details to do with the mem3.c (memsys3) allocator. If the library is compiled with SQLITE_ENABLE_MEMSYS3, the memsys3 allocator can be selected at runtime. (CVS 5303)
(check-in: [9c6c8e01]
user: danielk1977
branch: trunk,
size: 53392)

[3f7fd6ed]
part of check-in [3febef54]
Modify the memory allocation system in mem3.c so to fit in with the new sqlite3_mem_methods scheme. At this point it only "mostly" works. (CVS 5297)
(check-in: [3febef54]
user: danielk1977
branch: trunk,
size: 53397)

[37e65eaa]
part of check-in [56c8af14]
Add a mode to the sqlite3_test_control() interface to register hooks called at the beginning and end of "benign malloc failure" blocks. This allows malloc() failure testing to be done using public APIs only. (CVS 5254)
(check-in: [56c8af14]
user: danielk1977
branch: trunk,
size: 52870)

[d75dad89]
part of check-in [005f8eae]
Bug fixes: Plug a memory leak introduced by the previous check-in. Get
the amalgamation to the point where it will compile. (CVS 5241)
(check-in: [005f8eae]
user: drh
branch: trunk,
size: 54104)

[cac2d073]
part of check-in [cb1f11cd]
Add some test logic to the new memory allocation subsystem. (Lots more needed.)
The test suite is currently indicating memory leaks, though it is unclear if
this is a true code problem or just an instrumentation problem. (CVS 5240)
(check-in: [cb1f11cd]
user: drh
branch: trunk,
size: 54071)

[2d1cf908]
part of check-in [a9d1d931]
Make the benign-fault setting recursive. Make all malloc failures
during a rollback benign since there is nothing we can do about them. (CVS 5128)
(check-in: [a9d1d931]
user: drh
branch: trunk,
size: 48703)

[4c9ac364]
part of check-in [bdd89cd2]
Better error messages when trying to open a large file using a version
of SQLite that omits large file support. Tickets #3096 and #3094. (CVS 5085)
(check-in: [bdd89cd2]
user: drh
branch: trunk,
size: 48701)

[94c8bf6a]
part of check-in [e6f71abb]
Allow SQLITE_MAX_COLUMN to be set to zero at compile-time in order to
disable the checks. Also SQLITE_MAX_EXPR_DEPTH. Ticket #3069. (CVS 5065)
(check-in: [e6f71abb]
user: drh
branch: trunk,
size: 48628)

[367b5806]
part of check-in [20946bf6]
Fix a shared-cache mode problem triggered when sqlite3_open16() was used to open the second or subsequent connections to a utf-8 database. (CVS 5059)
(check-in: [20946bf6]
user: danielk1977
branch: trunk,
size: 48796)

[8f3ce973]
part of check-in [b7ffc6f0]
Add out-of-range tests on the first parameter to sqlite3_limit().
Add the ability to record tests that have been skipped due to
configuration limitations. (CVS 5009)
(check-in: [b7ffc6f0]
user: drh
branch: trunk,
size: 48821)

[7d22155e]
part of check-in [2498d3ea]
Add a completely new testing system for the Bitvec object. The new
testing system uses sqlite3_test_control() instead of unpublished
APIs. Now provides 100% condition/decision coverage. Obscure bugs
in Bitvec found and fixed as a result of the enhanced coverage. (CVS 4902)
(check-in: [2498d3ea]
user: drh
branch: trunk,
size: 48690)

[f9c9a666]
part of check-in [d6be1f49]
In the sqlite3_limit() interface, take out the feature where zero means
use the hard upper bound. If an application wants the hard upper bound,
it can set the limit to 0x7fffffff and the bound will be automatically
truncated. (CVS 4900)
(check-in: [d6be1f49]
user: drh
branch: trunk,
size: 48144)

[9dd4646a]
part of check-in [871df0e7]
Allow a VACUUM operation to change the page-size in the same way as it can be used to change a database between auto-vacuum and normal mode. (CVS 4896)
(check-in: [871df0e7]
user: danielk1977
branch: trunk,
size: 45802)

[bb31f65f]
part of check-in [e90c4cc8]
Move SQL functions used for testing only out of func.c and into a new
test file named test_func.c. Use sqlite3_auto_extension() to make sure
the test functions appear in every database connection. (CVS 4883)
(check-in: [e90c4cc8]
user: drh
branch: trunk,
size: 45770)

[05bba909]
part of check-in [0bf4e7fe]
Add the RTRIM collating sequence. Only implemented for UTF8. Still
considered experimental and may be removed if we find adverse impact
elsewhere in the system. (CVS 4732)
(check-in: [0bf4e7fe]
user: drh
branch: trunk,
size: 43695)

[bdeb906f]
part of check-in [c9eb6591]
In shared-cache mode, make sure the busy hander invoked is the
busy handler associated with the database connection that caused
the lock contention in the first place. (CVS 4598)
(check-in: [c9eb6591]
user: drh
branch: trunk,
size: 43154)

[58f71f9b]
part of check-in [b8451da3]
Remove nRef and vfsMutex from the sqlite3_vfs structure. Omit the
sqlite3_vfs_release() interface. Less memory allocated for a pager
in the common case where the size of the pathname is less than MAX_PATH. (CVS 4287)
(check-in: [b8451da3]
user: drh
branch: trunk,
size: 41671)

[7cec512d]
part of check-in [92872761]
The sqlite3_value object now carries an sqlite3* pointer to use for
recording malloc failures. This eliminates the need to pass sqlite3*
pointers into many internal interfaces. Also added more mutexing. (CVS 4263)
(check-in: [92872761]
user: drh
branch: trunk,
size: 41554)

[7850774e]
part of check-in [deb7ecd6]
Half-way through a major refactoring of the memory allocation.
I have not even attempted to compile so I am certain there are
countless errors. (CVS 4231)
(check-in: [deb7ecd6]
user: drh
branch: trunk,
size: 40893)

[00e01d79]
part of check-in [93b623b2]
Begin implementing a new system of upper bounds on the capabilities
of SQLite. By clearly defining the upper bounds, we make those
upper bounds explicitly testable. This check-in is just infrastructure.
The upper bounds are not yet enforced. (CVS 3941)
(check-in: [93b623b2]
user: drh
branch: trunk,
size: 41378)

[0e389104]
part of check-in [ddc4e479]
Change the name of create_collation_x() to create_collation_v2(). Also add some tests for it. (CVS 3938)
(check-in: [ddc4e479]
user: danielk1977
branch: trunk,
size: 41343)

[a8f5c62b]
part of check-in [8d6c3bfc]
Ensure sqlite3_finalize() can be called from within the xDisconnect() method of virtual tables. (CVS 3845)
(check-in: [8d6c3bfc]
user: danielk1977
branch: trunk,
size: 39510)

[e9ea17d6]
part of check-in [23653f7a]
Move the sqlite3_temp_directory global variable out of the OS porting layer
and into main.c so that it is more accessible to non-standard OS porting
layers. (CVS 3759)
(check-in: [23653f7a]
user: drh
branch: trunk,
size: 39285)

[af8922e0]
part of check-in [007ca283]
Add the undocumented and experimental I/O tracing interface. This
interface is likely to change and may be completely abandoned in the
near future. (CVS 3665)
(check-in: [007ca283]
user: drh
branch: trunk,
size: 38765)

[e2841698]
part of check-in [ba579ddc]
Add support for extended result codes - additional result information
carried in the higher bits of the integer return codes. This must be
enabled using the sqlite3_extended_result_code() API. Only a few extra
result codes are currently defined. (CVS 3422)
(check-in: [ba579ddc]
user: drh
branch: trunk,
size: 37537)

[494d3750]
part of check-in [35fd67d7]
Initial attempt at making sqlite3_interrupt() work even when called from
a separate thread. (CVS 3335)
(check-in: [35fd67d7]
user: drh
branch: trunk,
size: 36948)

[14937db8]
part of check-in [65b60f05]
By default, new databases are now created in the legacy file format - the
format that ignores DESC on indices. If you want descending indices, you
must either recompile with -DSQLITE_DEFAULT_FILE_FORMAT=4 or issue
"PRAGMA legacy_file_format=OFF" prior to creating the first table in the
database. (CVS 3330)
(check-in: [65b60f05]
user: drh
branch: trunk,
size: 36908)

[4a9be207]
part of check-in [eb3442c4]
Move the sqlite3_sleep() and sqlite3_clear_bindings() interfaces into the
main library and make this official. (CVS 3316)
(check-in: [eb3442c4]
user: drh
branch: trunk,
size: 36759)

[928d93cf]
part of check-in [c8e5ceed]
When opening a new connection on a shared cache, be careful not to
overwrite the encoding flag on the shared cache. Ticket #1824. (CVS 3190)
(check-in: [c8e5ceed]
user: drh
branch: trunk,
size: 35396)

[a025a199]
part of check-in [5048fae0]
Make provisions in the code to support Provisions to support caching of
serialized statements in the SSE extension. (CVS 3139)
(check-in: [5048fae0]
user: drh
branch: trunk,
size: 35400)

[f520c65f]
part of check-in [7a1701e8]
Or the SQLITE_UTF16_ALIGNED with the encoding field in
sqlite3_create_collation and UTF16 strings will always be aligned
on an even byte boundary when passed into the comparison function. (CVS 3103)
(check-in: [7a1701e8]
user: drh
branch: trunk,
size: 35416)

[39d073fb]
part of check-in [5d9c6aa9]
Automatically deallocate thread-specific data when it is no longer
being used. Ticket #1601. Also implemented the suggestion of
ticket #1603. Memory management is now off by default at compile-time.
The sqlite3_enable_memory_management() API has been removed. (CVS 2919)
(check-in: [5d9c6aa9]
user: drh
branch: trunk,
size: 31693)

[2babbdbc]
part of check-in [e1606658]
Some elements of the new malloc() failure handling. Not all cases work properly yet. Also, library is not threadsafe if malloc() fails right now. (CVS 2800)
(check-in: [e1606658]
user: danielk1977
branch: trunk,
size: 30272)

[7d719efe]
part of check-in [bd8740d1]
Restructure the OS interface yet again. This time make the OsFile object
a virtual base class which is subclassed for unix, windows, and the crash
test simulator. Add the new file "os.c" for common os layer code. Move
all OS-specific routines into the sqlite3Os structure. (CVS 2795)
(check-in: [bd8740d1]
user: drh
branch: trunk,
size: 30190)

[bf888554]
part of check-in [17039ec3]
Rewrite the aggregate handling logic so that it runs in O(1) space.
This is the first cut at the code. Many regression tests fail. (CVS 2662)
(check-in: [17039ec3]
user: drh
branch: trunk,
size: 29912)

[60eb224f]
part of check-in [ef84ff79]
The LIKE optimization does the right thing when collating sequences are
present. LIKE expressions where the left-hand side has COLLATE NOCASE
are optimized in the default case. (CVS 2637)
(check-in: [ef84ff79]
user: drh
branch: trunk,
size: 29346)

[b489aae2]
part of check-in [9295050a]
Column names coming back from a SELECT are now just the name of the
source column without the "table." prefix. In other words,
"PRAGMA short_column_names=ON" is now the default.
This makes the names of columns behave more like other SQL engines.
The old behavior can be restored by setting "PRAGMA short_column_names=OFF". (CVS 2231)
(check-in: [9295050a]
user: drh
branch: trunk,
size: 39881)

[fc383dc9]
part of check-in [fc8c1393]
Add initial infrastructure for cursors. In where.c, optimize out clauses
of the form "ORDER BY rowid" if a table scan is being performed. Do a
reverse table scan if "ORDER BY rowid DESC" is present. (CVS 2141)
(check-in: [fc8c1393]
user: drh
branch: trunk,
size: 40226)

[82a952ef]
part of check-in [0cc2f40e]
The callback on sqlite3_trace() is invoked the first time sqlite3_step()
is called after sqlite3_prepare() or sqlite3_reset(). Ticket #900. (CVS 1960)
(check-in: [0cc2f40e]
user: drh
branch: trunk,
size: 39523)

[c42b3c1c]
part of check-in [d1b29156]
Transactions commit on the last sqlite3_step(), not on sqlite3_finalize().
This allows the sqlite3_step() to return SQLITE_BUSY if the commit is
blocked by a lock. Ticket #885. (CVS 1928)
(check-in: [d1b29156]
user: drh
branch: trunk,
size: 40690)

[34a95ab1]
part of check-in [7619bf47]
If meta(3)>0 then make the database readonly for now. This allows the current
database to interact with future releases that might include autovacuum. (CVS 1888)
(check-in: [7619bf47]
user: drh
branch: trunk,
size: 40483)

[49ea4a45]
part of check-in [6db3f122]
Fix more problems with deferred execution of CREATE. Still need to do DROP.
There is now a memory leak. (CVS 1865)
(check-in: [6db3f122]
user: drh
branch: trunk,
size: 40500)

[c4ba7d8f]
part of check-in [49b99149]
Progress towards getting prepared statements and CREATE and DROP to play
nicely together. Work is incomplete. Some tests are known to fail. (CVS 1864)
(check-in: [49b99149]
user: drh
branch: trunk,
size: 40476)

[bbb19c7a]
part of check-in [2590fffc]
Changes to allow libsqlite3.a and libsqlite.a to be both linked into the
same program at the same time. (CVS 1621)
(check-in: [2590fffc]
user: drh
branch: trunk,
size: 40382)

[3df17ac4]
part of check-in [3674b25e]
Turn on the atomic multifile commit logic. It does not work right yet, but
it has at least stopped failing asserts. (CVS 1550)
(check-in: [3674b25e]
user: drh
branch: trunk,
size: 35619)

[eb4b3e74]
part of check-in [8af6474c]
Change lots of internal symbols from sqliteXXX to sqlite3XXX so that the
library links again. It doesn't work yet, due to changes in the btree layer
calling convention. (CVS 1324)
(check-in: [8af6474c]
user: danielk1977
branch: trunk,
size: 40445)

[94dd3557]
part of check-in [7ace5762]
Get the temp_store and default_temp_store pragmas working. Update the
documentation. Also fix a malloc problem that popped up during the regression
testing. (CVS 1302)
(check-in: [7ace5762]
user: drh
branch: trunk,
size: 37133)

[89a18cfb]
part of check-in [0a12473c]
The sqlite_trace() API only works for commands started by the user, not for
SQL commands run during initialization. (CVS 1298)
(check-in: [0a12473c]
user: drh
branch: trunk,
size: 37039)

[8d348b97]
part of check-in [574dd444]
The name of a result column is now the name of column it originated from, by
default. This can be turned off with PRAGMA short_column_names=OFF. This
is to be more like PostgreSQL. More testing needed. (CVS 1250)
(check-in: [574dd444]
user: drh
branch: trunk,
size: 35776)

[e38bf646]
part of check-in [9771ad1e]
The sqlite_exec() function is now implemented using sqlite_compile() and
sqlite_step(). This opens up lots of opportunity to remove old code. (CVS 1240)
(check-in: [9771ad1e]
user: drh
branch: trunk,
size: 35185)

[cfe8ca91]
part of check-in [b8f2ba78]
Begin the process over converting sqlite_exec() over to use sqlite_compile()
and sqlite_step(). The new sqlite_exec() is still commented out. (CVS 1237)
(check-in: [b8f2ba78]
user: drh
branch: trunk,
size: 36155)

[3230d9e3]
part of check-in [0c77cee7]
Add the SQLITE_NOTADB return code for cases when you try to open a file
that does not even remotely resemble an SQLite database file. (CVS 1233)
(check-in: [0c77cee7]
user: drh
branch: trunk,
size: 34936)