dan [Sat, 9 Apr 2011 15:39:02 +0000 (15:39 +0000)]
Add an OP_VerifyCookie instruction to "CREATE XXX IF NOT EXISTS" commands. This way, if the specified database object existed when the statement was compiled but removed from the database before sqlite3_step() was called, the statement still works as expected (and creates the object).
If the keyword "unordered" appears at the end of the SQLITE_STAT1.STAT
column for an index, then use that index for equality lookups only, never
for range queries or sorting. This feature is currently undocumented and
my change or be removed in a future release.
When ATTACH-ing a new database to an existing database with a codec, do
not enable the codec in the attached database if it is not enabled in the
existing database and it is not requested by the USING clause.
Always make sure the left-hand side of the IS NOT NULL operator is a
smiple column, not a general expression, before applying the IS NOT NULL
query optimization.
When searching a list of freelist trunk pages looking for a specific page
to allocate, avoid unnecessary journalling of the unchanged trunk pages towards
the start of the list.
dan [Thu, 7 Apr 2011 05:17:32 +0000 (05:17 +0000)]
Fix test script attach4.test so that it works with type 1 VFS implementations (no wal). And wal.test so that it work with a small default pager cache size.
Fix a performance regression: Keep two btree masks in each prepared
statement; one for btrees used and another for btrees that require locks.
Only try to lock the btrees identified by the second mask.
Simplifications to the sqlite3BtreeEnterAll() and LeaveAll() routines.
Just have them call BtreeEnter and BtreeLeave() repeatedly rather than
trying to be clever.
Remove the mutex counter and the logic that attempts to verify that btree
mutexes are held continuously. We are not making that assumption at this
time.
Merge the scheme-parse-refactor changes into trunk: (1) added
sqlite3SchemaMutexHeld() asserts, (2) Use -1 instead of 0 to mean
"all" in sqlite3ResetInternalSchema(), and other cosmetic changes.
Fix the P4_TRANSIENT constant so that it works correct - so that it really
makes a copy of the string for the P4 argument. Use P4_TRANSIENT wherever
appropriate. Change P4_STATICs of schema names to P4_TRANSIENT.
Remove the BtreeMutexArray object - use the Vdbe.btreeMask field to accomplish
the same result. Add a generation counter to btree mutexes in order to assert
that mutexes are never temporarily dropped over a range of instructions in order
to do deadlock avoidance in some subroutine. Lock all btrees in any Vdbe
program that uses OP_ParseSchema.
Make sure that the constant 1 is cast to yDbType before shifting to create
an attached database mask. This check-in is a follow-up and fix to the
[7aaf8772274422] change that increases the maximum number of attached databases
from 30 to 62.
dan [Sat, 2 Apr 2011 17:00:47 +0000 (17:00 +0000)]
Avoid returning SQLITE_NOTFOUND when the unix xSetSystemCall interface is invoked with NULL passed as the second argument, even if all the default system calls are already installed.
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.
Add a script that will break the amalgamation source file up into 4 or 5
smaller source files, each 32K lines or fewer, and a single "sqlite3-all.c"
source file that #includes the others.
dan [Fri, 1 Apr 2011 16:50:07 +0000 (16:50 +0000)]
When simulating an error in the close() system call, close the file descriptor anyway. Otherwise long running tests leak too many file-descriptors and crash.
drh [Thu, 31 Mar 2011 02:03:28 +0000 (02:03 +0000)]
Change the ANALYZE command so that it will accept an index name as its
argument and only reanalyze that one index. A quick smoke-test works.
Need to study the implications to the query planner and test corner cases.
dan [Tue, 29 Mar 2011 15:40:55 +0000 (15:40 +0000)]
Fix a problem whereby following an IO error in CommitPhaseTwo() of a multi-file transaction the b-tree layer could be left in TRANS_WRITE state, causing problems later on.
drh [Tue, 29 Mar 2011 15:00:17 +0000 (15:00 +0000)]
If the keyword "unordered" appears at the end of the SQLITE_STAT1.STAT
column for an index, then use that index for equality lookups only, never
for range queries or sorting.
shaneh [Tue, 29 Mar 2011 05:06:46 +0000 (05:06 +0000)]
In-progress changes - do not use; Removed prefix support; Added file control interface to enable/disable and adjust chunk size;
added app-def function for same;
drh [Tue, 29 Mar 2011 01:47:22 +0000 (01:47 +0000)]
Fix the documentation for the sqlite3_column_*_name() functions to describe
that the information can be invalidated when a prepared statement is
reprepared by the first invocation of an sqlite3_step() for a particular
execution cycle.
shaneh [Thu, 24 Mar 2011 17:43:18 +0000 (17:43 +0000)]
Minor change to sqlite3Utf8Read() to make consistent with READ_UTF8() usage and avoid implementation defined usages of <<.
Added some additional UTF-8 test cases.
drh [Thu, 24 Mar 2011 01:34:03 +0000 (01:34 +0000)]
The changes to fix [f7b4edece25c9948] mean that the schema is always loaded
whenever a prepared statement is running. This means that a couple of
branches can be eliminated and one operand of OP_ParseSchema can be removed.