drh [Wed, 1 Jun 2011 11:26:51 +0000 (11:26 +0000)]
Toward version 3.7.5.1. This check-in updates the version number and also
patches the pager so that it never spills cache while in WAL mode. The
latter patch fixes ticket [2d1a5c67dfc23] and also prevents excessive WAL
file sizes if the pager cache starts thrashing. A few test cases fail.
drh [Wed, 26 Jan 2011 19:46:22 +0000 (19:46 +0000)]
Update all built-in VFSes to return SQLITE_OK for the
SQLITE_FCNTL_SYNC_OMITTED file-control operation. Also change the
xFileControl methods to return SQLITE_NOTFOUND for unrecognized
operation codes.
dan [Wed, 26 Jan 2011 07:25:32 +0000 (07:25 +0000)]
Update mutex1.test so that it works with the memsubsys1 permutation (pagecache memory). Change a few instances of SQLITE_MUTEX_STATIC_LRU2 in comments and test code to STATIC_PMEM.
drh [Wed, 26 Jan 2011 00:07:03 +0000 (00:07 +0000)]
Rename the PCache1.mxPinned field to n90pct (since it is 90% of nMax) in order
to distinguish it from PGroup.mxPinned. Fix the computation of n90pct so that
it does not overflow adversely on excessively large cache sizes.
drh [Tue, 25 Jan 2011 16:48:56 +0000 (16:48 +0000)]
Make sure the return code from doing an xSync is correctly initialized
so that a valid return code is produced regardless of the path taken through
the logic.
drh [Tue, 25 Jan 2011 16:20:16 +0000 (16:20 +0000)]
Change the name of SQLITE_FCNTL_SYNC to SQLITE_FCNTL_SYNC_OMITTED and only
send it when PRAGMA synchronous=OFF. Add better documentation to explain
what that file-control opcode is used for.
dan [Sat, 22 Jan 2011 13:32:29 +0000 (13:32 +0000)]
Modify the trace callback mechanism so that SQL commands executed from within virtual table or user function callbacks are passed to the trace callback without parameter expansion and enclosed in SQL comments.
drh [Tue, 18 Jan 2011 17:03:26 +0000 (17:03 +0000)]
Do not use mutexes in the pcache implementation unless
SQLITE_ENABLE_MEMORY_MANAGMENT is defined. This is a performance enhancement.
A side effect is that pcaches will not steal pages from one another unless
ENABLE_MEMORY_MANAGEMENT is set, or unless SQLITE_THREADSAFE=0.
drh [Tue, 18 Jan 2011 15:17:57 +0000 (15:17 +0000)]
Do not use SQLITE_MUTEX_STATIC_MEM2 since it has been reused as STATIC_OPEN.
Instead, create a new static mutex STATIC_PMEM which is an alias for the
unused STATIC_LRU2.
drh [Mon, 17 Jan 2011 21:32:24 +0000 (21:32 +0000)]
Here is a completely new implementation of the mutex-free-pcache. This
one uses a common code base and automatically selects whether or not to
use mutexes depending on compile-time and start-time options.
drh [Mon, 17 Jan 2011 17:42:37 +0000 (17:42 +0000)]
Add the SQLITE_OMIT_AUTORESET compile-time option which if enabled causes
the sqlite3_step() routine to return SQLITE_MISUSE if it is called after
it has previously returned anything other than SQLITE_ROW, SQLITE_BUSY, or
SQLITE_LOCKED.
drh [Sun, 16 Jan 2011 22:37:09 +0000 (22:37 +0000)]
On a backup from a smaller to a larger page size, do not begin committing
the transaction until the source pages after the pending byte have been
copied.
drh [Sun, 16 Jan 2011 00:56:19 +0000 (00:56 +0000)]
Make sure the change-counter and SQLite-version fields of the header are
set correctly even when doing a VACUUM with locking_mode=EXCLUSIVE.
Ticket [5d863f876ee9561b].
drh [Sat, 15 Jan 2011 21:42:23 +0000 (21:42 +0000)]
Make sure the change counter and SQLite version numbers in the header are
set correctly, even when running in WAL mode and when VACUUMing in WAL mode.
Ticket [5d863f876ee9561b9].
dan [Thu, 13 Jan 2011 10:58:26 +0000 (10:58 +0000)]
Fix a segfault that can occur in matchinfo if an fts4 table contains mostly zero-length documents. Specifically, if the table contains more rows than it does bytes of text.
drh [Wed, 12 Jan 2011 17:56:26 +0000 (17:56 +0000)]
Do not raise an SQLITE_CORRUPT error in Recoverymode
if the database size in the header is larger than the physical file
size. This facilitates recovery of a database in which the database size
field has been corrupted.
drh [Tue, 11 Jan 2011 12:46:05 +0000 (12:46 +0000)]
Fix the sqlite3.h generator script so that it generates the correct
SQLITE_SOURCE_ID string with the latest versions of Fossil that
include fractional seconds on the date/time stamp.
drh [Fri, 7 Jan 2011 02:50:40 +0000 (02:50 +0000)]
Reorder the fields in private structures in an effort to reduce alignment
gaps and thus make the structures smaller, and to put frequently accessed
fields first. Also update some obsolete comments. Valgrind shows a very
slight performance improvement.
drh [Tue, 4 Jan 2011 17:57:53 +0000 (17:57 +0000)]
The ANALYZE command now counts at all rows of an index, even those containing
NULL values. A valid sqlite_stat1 entry is created even if the index contains
nothing but NULLs.
drh [Tue, 21 Dec 2010 00:20:53 +0000 (00:20 +0000)]
Remove the obsolete compile-time option SQLITE_THREAD_OVERRIDE_LOCK
from the autoconf makefile. Needed only for LinuxThreads, which we no
longer support.
drh [Mon, 20 Dec 2010 15:51:58 +0000 (15:51 +0000)]
Add additional DBSTATUS options for measuring the hit and miss rates against
the lookaside memory pool - information useful in tuning the lookaside size.
Currently experimental pending analysis of performance impact.
drh [Thu, 16 Dec 2010 19:52:52 +0000 (19:52 +0000)]
Fix an assertion fault that can only occur if SQLITE_ENABLE_STAT2 is defined
and the constant folding optimization is disabled using sqlite3_test_control().
Problem introduced by [ad8bc68197f2b4] but we missed it prior to the 3.7.4
release due to taking shortcuts and skipping tests in the release checklist.
drh [Thu, 16 Dec 2010 02:06:29 +0000 (02:06 +0000)]
Make wal_checkpoint a no-op if a prior checkpoint has already copied all
WAL content into the database. This prevents a concurrent write to the
database from resetting the wal-index out from under the WalIterator of
the checkpoint as it is initializing.
drh [Wed, 15 Dec 2010 18:54:37 +0000 (18:54 +0000)]
When registering the built-in LIKE and GLOB functions, make sure that they
are tagged with SQLITE_UTF8 so that if other application-defined LIKE and
GLOB implementations are provided for UTF16, then the appropriate function
will be selected.
drh [Wed, 8 Dec 2010 18:30:19 +0000 (18:30 +0000)]
Update the sqlite3_stmt_readonly() interface so that its output is
well-defined for all prepared statements, and so that it gives the
correct result for VACUUM.
drh [Mon, 6 Dec 2010 21:06:09 +0000 (21:06 +0000)]
Add the ability to disable constant factoring using sqlite3_test_control().
Add a TCL interface to this new capability and add tests cases to the TCL
test scripts to actually use the new capability.
drh [Mon, 6 Dec 2010 18:50:32 +0000 (18:50 +0000)]
Initialize all constants at the very beginning of a prepared statement.
Do not allow constant initialization to occur once control flow has a chance
to diverge, to avoid the possibility of having uninitialized registers.
Ticket [80ba201079ea60807].