]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
14 years agoIf the keyword "unordered" appears at the end of the SQLITE_STAT1.STAT unordered-index-hack
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.

FossilOrigin-Name: 3b964155f611c437d53d44feafa22f531942b1b4

14 years agoFix a problem in the unix VFS implementation of xNextSystemCall(). Also some typos...
dan [Tue, 29 Mar 2011 10:04:23 +0000 (10:04 +0000)] 
Fix a problem in the unix VFS implementation of xNextSystemCall(). Also some typos that prevent compilation when HAVE_POSIX_FALLOCATE is defined.

FossilOrigin-Name: bc6cce81565b17f886478bd51500bba2ed11ec1d

14 years agoFix the documentation for the sqlite3_column_*_name() functions to describe
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.

FossilOrigin-Name: 7270f80ac5dd17b979f1f790b2dfcf811866c1dc

14 years agoAdd test infrastructure (and some tests) to inject faults into os_unix.c using the...
dan [Mon, 28 Mar 2011 19:10:06 +0000 (19:10 +0000)] 
Add test infrastructure (and some tests) to inject faults into os_unix.c using the new xSetSystemCall interface.

FossilOrigin-Name: 0e1d20dfaeea5ab285d16aa4b8f02b61b1d2bc10

14 years agoMinor change to sqlite3Utf8Read() to make consistent with READ_UTF8() usage and avoid...
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.

FossilOrigin-Name: 7173b3929fae4e678223b0e978a2da7fa50a9005

14 years agoFix problem with tableapi.test on Windows.
shaneh [Thu, 24 Mar 2011 17:37:24 +0000 (17:37 +0000)] 
Fix problem with tableapi.test on Windows.

FossilOrigin-Name: 69fe0c873d702ef1d781453ee6ac2b1fb77fce48

14 years agoThe changes to fix [f7b4edece25c9948] mean that the schema is always loaded
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.

FossilOrigin-Name: b6e268fce12829f058f1dfa223731ec8479493f8

14 years agoFix a signed/unsigned comparison compiler warning.
drh [Wed, 23 Mar 2011 22:54:59 +0000 (22:54 +0000)] 
Fix a signed/unsigned comparison compiler warning.

FossilOrigin-Name: c81da6f98d89935442c447a51736e11baf5a7bc1

14 years agoUpdate the test_vfstrace.c shim to conform to the new VFS interface for
drh [Wed, 23 Mar 2011 22:51:46 +0000 (22:51 +0000)] 
Update the test_vfstrace.c shim to conform to the new VFS interface for
xSetSystemCall and xGetSystemCall.

FossilOrigin-Name: ad4dc7b95f94fc9a5430c1305fb61d9de79b3365

14 years agoChange the xSetSyscall methods of the VFS so that they do not cast object
drh [Wed, 23 Mar 2011 22:02:23 +0000 (22:02 +0000)] 
Change the xSetSyscall methods of the VFS so that they do not cast object
pointers into function pointers.  Fix other unrelated compiler warnings.

FossilOrigin-Name: e059152adce3a8fb693f082b82b5669a238c8d6f

14 years agoIncrease the upper bound on SQLITE_MAX_ATTACHED from 30 to 62.
drh [Wed, 23 Mar 2011 18:22:34 +0000 (18:22 +0000)] 
Increase the upper bound on SQLITE_MAX_ATTACHED from 30 to 62.

FossilOrigin-Name: 7aaf8772274422f5020fad9eea490e195170720f

14 years agoFix a bug in fts4 to do with matchinfo and deferred tokens.
dan [Wed, 23 Mar 2011 17:10:43 +0000 (17:10 +0000)] 
Fix a bug in fts4 to do with matchinfo and deferred tokens.

FossilOrigin-Name: 30d42dc66f19ef5cc5b27d6273eadf56619a3ce8

14 years agoIn the shell, make sure the ".log" command has at least one argument.
drh [Wed, 23 Mar 2011 11:16:22 +0000 (11:16 +0000)] 
In the shell, make sure the ".log" command has at least one argument.

FossilOrigin-Name: 1ed5e361ca7bfa9226fec265704394e0f228f0c5

14 years agoFix a numbering issue in rtree6.test. Add a couple of extra tests.
dan [Wed, 23 Mar 2011 10:52:23 +0000 (10:52 +0000)] 
Fix a numbering issue in rtree6.test. Add a couple of extra tests.

FossilOrigin-Name: 0b7668a71ef8995ea0306c7d890f87761961426e

14 years agoChange the rtree module to support queries with multiple comparison operators (i...
dan [Wed, 23 Mar 2011 10:38:49 +0000 (10:38 +0000)] 
Change the rtree module to support queries with multiple comparison operators (i.e. > or <) of the same type on a single column.

FossilOrigin-Name: 387b55aa9bb0f978641f9c2fa40f84fd98662047

14 years agoAdd the ability to enable and disable foreign key constraints and triggers
drh [Mon, 21 Mar 2011 17:15:58 +0000 (17:15 +0000)] 
Add the ability to enable and disable foreign key constraints and triggers
using calls to sqlite3_db_config().

FossilOrigin-Name: 09e167f9c14625924b17bbb1f292f89ac9ddc93a

14 years agoAdd a test case to verify that ticket [f7b4edece25c994857] is fixed.
drh [Sat, 19 Mar 2011 02:04:02 +0000 (02:04 +0000)] 
Add a test case to verify that ticket [f7b4edece25c994857] is fixed.

FossilOrigin-Name: eedbcf0a0ba91bb8b9cd3d115081ba297e9959fe

14 years agoAdd a generation counter to the Schema object and enhance OP_VerifySchema
drh [Fri, 18 Mar 2011 21:55:46 +0000 (21:55 +0000)] 
Add a generation counter to the Schema object and enhance OP_VerifySchema
to also check the Schema generation.  Fix for
ticket [f7b4edece25c99].

FossilOrigin-Name: 36c04dd1695f0899b53ce58738181b146fc005ed

14 years agoUpdate the implementation of ".testctrl" in the command-line shell to use
drh [Thu, 17 Mar 2011 16:45:50 +0000 (16:45 +0000)] 
Update the implementation of ".testctrl" in the command-line shell to use
a look-up table rather than a long sequence of if-elses.  Shorten source
code lines of shell.c to 80 characters or less.

FossilOrigin-Name: 54bacb95dd6e2d6ac4971391a40484ccb9126d29

14 years agoComment enhancement to better explain the logic in the "x IS NULL"
drh [Thu, 17 Mar 2011 01:58:21 +0000 (01:58 +0000)] 
Comment enhancement to better explain the logic in the "x IS NULL"
optimization.

FossilOrigin-Name: 869f894798a65f8bc0e0b083866a784fa0189f68

14 years agoEnhances to the query planner such that "x IS NULL" constraints take the
drh [Thu, 17 Mar 2011 01:34:26 +0000 (01:34 +0000)] 
Enhances to the query planner such that "x IS NULL" constraints take the
STAT2 statistics into account, just like "x=VALUE" constraints.

FossilOrigin-Name: 2353176811f752a16c1f2351a3d3431919b062a9

14 years agoAdditional interpretation of flags and constants in the VFS trace output.
drh [Wed, 16 Mar 2011 18:54:23 +0000 (18:54 +0000)] 
Additional interpretation of flags and constants in the VFS trace output.

FossilOrigin-Name: 3e984195f1f6d28734456dd726d226cedf207da2

14 years agoAdd the -vfstrace option to the usage error message in the shell.
drh [Wed, 16 Mar 2011 17:05:28 +0000 (17:05 +0000)] 
Add the -vfstrace option to the usage error message in the shell.

FossilOrigin-Name: baca45c549e1c144257ee657258939640120e094

14 years agoAdd the VFS-trace shim.
drh [Wed, 16 Mar 2011 16:56:29 +0000 (16:56 +0000)] 
Add the VFS-trace shim.

FossilOrigin-Name: f49a9ef3387bd4453f5654ebe83fea445c03cf4d

14 years agoMake the "unix-excl" VFS work exactly like "unix" if the database
drh [Tue, 15 Mar 2011 19:08:48 +0000 (19:08 +0000)] 
Make the "unix-excl" VFS work exactly like "unix" if the database
file is read-only.

FossilOrigin-Name: d9846834993079fb2e42d6bd2644b2154ef324d1

14 years agoFix an out-of-order variable declaration in shell.c.
drh [Tue, 15 Mar 2011 18:35:44 +0000 (18:35 +0000)] 
Fix an out-of-order variable declaration in shell.c.

FossilOrigin-Name: 725708465072fc63736e99610cc9cb0ac336145a

14 years agoFix cut-and-paste typo in debugging print statement in winMutexTry().
shaneh [Tue, 15 Mar 2011 02:55:28 +0000 (02:55 +0000)] 
Fix cut-and-paste typo in debugging print statement in winMutexTry().

FossilOrigin-Name: def98fd23e42bda13547e38ab13fed0e6554ce99

14 years agoMerge the unix-excl VFS into the trunk. This merge also adds the -vfs
drh [Mon, 14 Mar 2011 13:54:01 +0000 (13:54 +0000)] 
Merge the unix-excl VFS into the trunk.  This merge also adds the -vfs
option to the command-line shell.

FossilOrigin-Name: 3934b004e93852c89b937ec20431de96a2e99440

14 years agoIn the "unix-excl" VFS, use the heap for shared memory, since only a single unix-excl
drh [Sat, 12 Mar 2011 18:10:44 +0000 (18:10 +0000)] 
In the "unix-excl" VFS, use the heap for shared memory, since only a single
process is able to read or write the database.

FossilOrigin-Name: a05a6d40875df674f9c2b46e33128c6878d4edaa

14 years agoAdd the new optional "unix-excl" VFS. This VFS grabs an exclusive lock on
drh [Sat, 12 Mar 2011 17:02:57 +0000 (17:02 +0000)] 
Add the new optional "unix-excl" VFS.  This VFS grabs an exclusive lock on
the database preventing other processes from accessing it, but continues to
allow other database connections from the same process.

FossilOrigin-Name: 00051c3296e11211b2bb5ae28f016b17dca857d7

14 years agoMore tests for SQLITE_OMIT_UNIQUE_ENFORCEMENT and minor change to implementation.
shaneh [Sat, 12 Mar 2011 04:58:55 +0000 (04:58 +0000)] 
More tests for SQLITE_OMIT_UNIQUE_ENFORCEMENT and minor change to implementation.

FossilOrigin-Name: b86999436ec2414c990ba720441fe316f647eef6

14 years agoRemove an unused field from the unix sqlite3_file object.
drh [Fri, 11 Mar 2011 16:15:48 +0000 (16:15 +0000)] 
Remove an unused field from the unix sqlite3_file object.

FossilOrigin-Name: f957f23a8a392bb1720720960bda2c7b24de9663

14 years agoSimplification of tests and more added for SQLITE_OMIT_UNIQUE_ENFORCEMENT tests.
shaneh [Thu, 10 Mar 2011 21:48:02 +0000 (21:48 +0000)] 
Simplification of tests and more added for SQLITE_OMIT_UNIQUE_ENFORCEMENT tests.

FossilOrigin-Name: 75a38411a89bd2969ec5cecca13c13a390b3d478

14 years agoSkip unique constraint enforcement if compiled with SQLITE_OMIT_UNIQUE_ENFORCEMENT.
shaneh [Thu, 10 Mar 2011 21:13:18 +0000 (21:13 +0000)] 
Skip unique constraint enforcement if compiled with SQLITE_OMIT_UNIQUE_ENFORCEMENT.

FossilOrigin-Name: ba85bf8cb88f7ae220d919f5c23f51d9dcedc843

14 years agoMinor clean-up of previous mem5 allocator fix.
shaneh [Thu, 10 Mar 2011 03:54:55 +0000 (03:54 +0000)] 
Minor clean-up of previous mem5 allocator fix.

FossilOrigin-Name: 3643842316239ff7859f0ec522736a2b9c03d22c

14 years agoFix issue with mem5 allocator when min request size is larger thatn 2^30.
shaneh [Wed, 9 Mar 2011 21:36:17 +0000 (21:36 +0000)] 
Fix issue with mem5 allocator when min request size is larger thatn 2^30.

FossilOrigin-Name: d7dae06fb2d57ed6b9555b774712f42077ae4155

14 years agoOmit unnecessary OP_Next and OP_Prev operators when uniqueness constraints
drh [Wed, 9 Mar 2011 21:02:31 +0000 (21:02 +0000)] 
Omit unnecessary OP_Next and OP_Prev operators when uniqueness constraints
guarantee that the code will only make one pass through the loop.

FossilOrigin-Name: f000c9b2b7348238fe2085140d2dd05294a19709

14 years agoUpdates to the OS/2 implementation from Rich Walsh.
drh [Wed, 9 Mar 2011 11:04:07 +0000 (11:04 +0000)] 
Updates to the OS/2 implementation from Rich Walsh.

FossilOrigin-Name: dc46156a2237701679433779b871844f4f2abe4b

14 years agoMerge the syscall-override changes into trunk.
drh [Tue, 8 Mar 2011 16:39:29 +0000 (16:39 +0000)] 
Merge the syscall-override changes into trunk.

FossilOrigin-Name: 36d79e6f54cdc4129c6e6366a49722e2cf1cccbd

14 years agoUnix errno integer can vary from one system to the next. So do not
drh [Tue, 8 Mar 2011 14:05:07 +0000 (14:05 +0000)] 
Unix errno integer can vary from one system to the next.  So do not
depend on specific errno values in test cases.

FossilOrigin-Name: ddb747d33a004c7fe532a661e879ccba68c79c59

14 years agoFix two compiler warnings. No functional code changes.
drh [Tue, 8 Mar 2011 13:06:41 +0000 (13:06 +0000)] 
Fix two compiler warnings.  No functional code changes.

FossilOrigin-Name: c829868aa2254c5e2268cdb803462cc6ec5cb71e

14 years agoFix additional cases of possible signed integer overflow, especially with
drh [Tue, 8 Mar 2011 02:38:28 +0000 (02:38 +0000)] 
Fix additional cases of possible signed integer overflow, especially with
regard to negation.

FossilOrigin-Name: 2d5800bd8cfc7d7f5578a71b1aeaa74b2ec4b372

14 years agoAnother minor simplification brought to light by clang.
drh [Sun, 6 Mar 2011 21:54:33 +0000 (21:54 +0000)] 
Another minor simplification brought to light by clang.

FossilOrigin-Name: 3bfbf026dd6a0eeef07f8f5f1ebf74c9cfebcd61

14 years agoRemove dead code identified by the clang static analyzer.
drh [Sun, 6 Mar 2011 21:28:32 +0000 (21:28 +0000)] 
Remove dead code identified by the clang static analyzer.

FossilOrigin-Name: 01a79d5a7af48fb7e50291c0c7c6283d3fb359d0

14 years agoSimplifications to the overflow-free multiplier. Also remove some commented-out
drh [Sat, 5 Mar 2011 21:41:34 +0000 (21:41 +0000)] 
Simplifications to the overflow-free multiplier.  Also remove some commented-out
code that was left in that subroutine by mistake on the previous check-in.

FossilOrigin-Name: 55fc25fdab61e6094289e068c343e012fec10439

14 years agoFix all known instances of signed-integer overflow. Within SQL expressions,
drh [Sat, 5 Mar 2011 20:59:46 +0000 (20:59 +0000)] 
Fix all known instances of signed-integer overflow.  Within SQL expressions,
integer overflow now forces coercion to floating point.  The shift operators
work with any integer right-hand operand with negative values reversing
the direction of the shift.

FossilOrigin-Name: abf21394124a0af46f072793718964cee2ce55d0

14 years agoFix an instance of signed arithmetic overflow and an one bit-shift overflow.
drh [Sat, 5 Mar 2011 13:54:15 +0000 (13:54 +0000)] 
Fix an instance of signed arithmetic overflow and an one bit-shift overflow.
Mark six other signed arithmetic overflow locations that need fixing.

FossilOrigin-Name: 04abab71ecd52f6070b9f84781a3df3d6dba7722

14 years agoHandle EINTR errors from open(). syscall-override
drh [Fri, 4 Mar 2011 15:43:57 +0000 (15:43 +0000)] 
Handle EINTR errors from open().

FossilOrigin-Name: a7d176b27cd73791d45eb3a31df78187ae10ce20

14 years agoDo a better job of choosing the join table order when the tables having
drh [Fri, 4 Mar 2011 00:56:58 +0000 (00:56 +0000)] 
Do a better job of choosing the join table order when the tables having
very different numbers of rows.

FossilOrigin-Name: 952f5e8c69904c48f2decfabf8ea60a2e9f3e134

14 years agoFix quoting of the result in rtreeB.test.
drh [Wed, 2 Mar 2011 22:07:29 +0000 (22:07 +0000)] 
Fix quoting of the result in rtreeB.test.

FossilOrigin-Name: c6532b35cc5a81cc753a22e0165bfdd5143941f1

14 years agoAdd additional VFS methods to retrieve system call pointers and to get a
drh [Wed, 2 Mar 2011 19:06:42 +0000 (19:06 +0000)] 
Add additional VFS methods to retrieve system call pointers and to get a
list of all changeable system calls.

FossilOrigin-Name: 38558363494e3a736dcb091dd859e76b7ccd78b0

14 years agoAdd more system calls to the set that can be overridden in os_unix.c.
drh [Wed, 2 Mar 2011 18:01:10 +0000 (18:01 +0000)] 
Add more system calls to the set that can be overridden in os_unix.c.
Also merge in recent fixes from trunk.

FossilOrigin-Name: 80fac2a6e07221bb67613af84ab9dda3e18b5ceb

14 years agoFix bugs in [7b6e30e6a7] that only show up on Mac.
drh [Wed, 2 Mar 2011 17:54:32 +0000 (17:54 +0000)] 
Fix bugs in [7b6e30e6a7] that only show up on Mac.

FossilOrigin-Name: ec55e8c6bb4f2419b3813aa2fd1a20d8f5016159

14 years agoMake sure the rtreenode() testing and analysis routine in the RTREE extension
drh [Wed, 2 Mar 2011 15:44:35 +0000 (15:44 +0000)] 
Make sure the rtreenode() testing and analysis routine in the RTREE extension
can handle 64-bit rowids.  This fix is in response to a message on the
mailing list.

FossilOrigin-Name: 24602557fc3295fe2836d269175f12ec680ac011

14 years agoProof-of-concept prototype for the proposed xSetSystemCall extension method
drh [Wed, 2 Mar 2011 15:09:07 +0000 (15:09 +0000)] 
Proof-of-concept prototype for the proposed xSetSystemCall extension method
on the VFS.

FossilOrigin-Name: 92b5a76abc53290e1bb87b6b55bc64bb1b331dfc

14 years agoLog all error from close() in os_unix.c to sqlite3_log() but do not attempt to
drh [Wed, 2 Mar 2011 02:08:13 +0000 (02:08 +0000)] 
Log all error from close() in os_unix.c to sqlite3_log() but do not attempt to
report errors back up to the application.  Update the unix error logging to
put the most important information earlier in the message.

FossilOrigin-Name: 7b6e30e6a712311d4ef275253b085b85e6e17116

14 years agoComment out some code in os_unix.c that only runs on MacOSX with
drh [Fri, 25 Feb 2011 03:25:07 +0000 (03:25 +0000)] 
Comment out some code in os_unix.c that only runs on MacOSX with
SQLITE_ENABLE_LOCKING_STYLE.

FossilOrigin-Name: 4e50b0362ab6604a4b6c9f4ad849ec1733d6ce1a

14 years agoFix a typo in a comment. No changes to code.
drh [Thu, 24 Feb 2011 21:10:00 +0000 (21:10 +0000)] 
Fix a typo in a comment.  No changes to code.

FossilOrigin-Name: af4756184a255f5d8a5cd276bf9f2fc3b38d9169

14 years agoReserve a range of bits in the SQLITE_OPEN_xxxx bit vector for future
drh [Wed, 23 Feb 2011 22:39:23 +0000 (22:39 +0000)] 
Reserve a range of bits in the SQLITE_OPEN_xxxx bit vector for future
expansion.

FossilOrigin-Name: 9b9046546db5b060e37e7ba01c23bb7e9528d861

14 years agoFix a typo in the robust_flock() macro for systems without EINTR.
drh [Wed, 23 Feb 2011 14:00:12 +0000 (14:00 +0000)] 
Fix a typo in the robust_flock() macro for systems without EINTR.

FossilOrigin-Name: af9ba2a6d2c37915e799eec52bb827de46afd34d

14 years agoRetry selected system calls on unix when they fail with EINTR.
drh [Wed, 23 Feb 2011 13:33:46 +0000 (13:33 +0000)] 
Retry selected system calls on unix when they fail with EINTR.

FossilOrigin-Name: b9d29ea385bafcf87c7dd07822ce9ec3d3892bd1

14 years agoWhen a stale schema-cookie is seen, expire only the one statement that
drh [Tue, 22 Feb 2011 03:34:56 +0000 (03:34 +0000)] 
When a stale schema-cookie is seen, expire only the one statement that
encountered the bad cookie, not every statement on the database
connection.  Ticket [b72787b1a7cea1f]

FossilOrigin-Name: 1bca0a7e198391202fd2bc1650c0a62028a9aaa5

14 years agoFix a problem with "EXPLAIN QUERY PLAN SELECT count(*) FROM tbl".
dan [Mon, 21 Feb 2011 17:49:49 +0000 (17:49 +0000)] 
Fix a problem with "EXPLAIN QUERY PLAN SELECT count(*) FROM tbl".

FossilOrigin-Name: 9f9f32882501ac9b6e60f81195a64bdbf6e4497b

14 years agoHave os_unix.c call sqlite3_log() following errors in certain system calls.
dan [Mon, 21 Feb 2011 11:46:24 +0000 (11:46 +0000)] 
Have os_unix.c call sqlite3_log() following errors in certain system calls.

FossilOrigin-Name: 01076528a43b61ae20ef6969b7d326de9b5313e4

14 years agoAn SQLITE_PROTOCOL error counts as a locking error for verification
drh [Sat, 19 Feb 2011 23:18:12 +0000 (23:18 +0000)] 
An SQLITE_PROTOCOL error counts as a locking error for verification
purposes.

FossilOrigin-Name: e87d499a4f8a456111c1f96ca6da31d0810fb7c8

14 years agoChange a testcase() added by the previous checkin into an assert().
drh [Sat, 19 Feb 2011 17:02:44 +0000 (17:02 +0000)] 
Change a testcase() added by the previous checkin into an assert().

FossilOrigin-Name: 6f3dad32aa0e1e9ee374302c82bea9bd60d5854b

14 years agoAdd testcase macros to verify that all return values from
drh [Sat, 19 Feb 2011 16:51:45 +0000 (16:51 +0000)] 
Add testcase macros to verify that all return values from
walTryBeginRead() are tested.

FossilOrigin-Name: 262b6fca0b7a251c02604c684a9f7e7a1434d630

14 years agoChanges to make WAL more robust against SQLITE_PROTOCOL errors.
drh [Sat, 19 Feb 2011 15:22:14 +0000 (15:22 +0000)] 
Changes to make WAL more robust against SQLITE_PROTOCOL errors.

FossilOrigin-Name: fd578a32f8e9f04957359e73f244a60f02afe08c

14 years agoFix the sqlite3ValueFromExpr() routine so that it returns SQLITE_NOMEM
drh [Fri, 18 Feb 2011 17:23:23 +0000 (17:23 +0000)] 
Fix the sqlite3ValueFromExpr() routine so that it returns SQLITE_NOMEM
on an OOM when trying to extract a NULL.

FossilOrigin-Name: 1061e94fa983a441b289753b873559163ab849e6

14 years agoRemove a no-op code path from sqlite3ExprIsInteger(). Replace it with an
drh [Thu, 17 Feb 2011 15:58:20 +0000 (15:58 +0000)] 
Remove a no-op code path from sqlite3ExprIsInteger().  Replace it with an
assert() that proves it always does nothing.

FossilOrigin-Name: 7af66d1bd53fd5973281646511e4e1d3b16601a3

14 years agoRemove an assert() that was made redundant by the previous checkin.
drh [Thu, 17 Feb 2011 13:52:02 +0000 (13:52 +0000)] 
Remove an assert() that was made redundant by the previous checkin.

FossilOrigin-Name: 21db719156deef9fb26aff27a01e324da255c825

14 years agoAdd an ALWAYS() around a always-true test in where.c.
drh [Thu, 17 Feb 2011 13:33:15 +0000 (13:33 +0000)] 
Add an ALWAYS() around a always-true test in where.c.

FossilOrigin-Name: 8123283ee1a360586a1721a56b4db15718c25ee0

14 years agoFix harmless compiler warnings in the query planner.
drh [Wed, 16 Feb 2011 23:32:24 +0000 (23:32 +0000)] 
Fix harmless compiler warnings in the query planner.

FossilOrigin-Name: 31fc4ba66e76876b2e7b6b2b74c07f47571938ce

14 years agoAdd "do_not_use_codec" logic to some of the TCL based test cases that read/write...
shaneh [Wed, 16 Feb 2011 01:23:50 +0000 (01:23 +0000)] 
Add "do_not_use_codec" logic to some of the TCL based test cases that read/write directly to the DB.

FossilOrigin-Name: edd27669f3d0ec8c878267fb5cae9b73fcdfd2b8

14 years agoSkip some tests in capi3e.test when compiled with SQLITE_OMIT_UTF16.
shaneh [Mon, 14 Feb 2011 03:49:40 +0000 (03:49 +0000)] 
Skip some tests in capi3e.test when compiled with SQLITE_OMIT_UTF16.

FossilOrigin-Name: b04304b9677b84c4bfca011bf7fa0488e7d56d08

14 years agoAdd a NEVER() around a test that is believed to always be false.
drh [Fri, 11 Feb 2011 22:54:28 +0000 (22:54 +0000)] 
Add a NEVER() around a test that is believed to always be false.

FossilOrigin-Name: f7e2ea33d5b37e5b133d96e96a11d2842504355c

14 years agoSkip flattening if subquery has LIMIT and outer query is DISTINCT. Fix for ticket...
shaneh [Fri, 11 Feb 2011 20:52:20 +0000 (20:52 +0000)] 
Skip flattening if subquery has LIMIT and outer query is DISTINCT. Fix for ticket 752e1646fc.

FossilOrigin-Name: 559739998833643f589fa76d8360080691f83c18

14 years agoFix a bug in the new WHERE-clause processing that tries to use an
drh [Fri, 11 Feb 2011 06:59:02 +0000 (06:59 +0000)] 
Fix a bug in the new WHERE-clause processing that tries to use an
index to resolve IS NOT NULL constraints when SQLITE_ENABLE_STAT2 is
defined.  The bug could cause memory overruns and segfaults.  The bug
was new to the code and has not appeared in an official release.
Found during structural testing.

FossilOrigin-Name: a5c36b9f39ab9629b857ec9c550f3892c0d94fb4

14 years agoAllow an index paired with a NOT NULL constraint to be used for sorting
drh [Fri, 11 Feb 2011 03:56:11 +0000 (03:56 +0000)] 
Allow an index paired with a NOT NULL constraint to be used for sorting
under the condition that the index be treated as a non-unique index.

FossilOrigin-Name: d78949fc93077e1aa7f05cf9f7e947727939cc96

14 years agoDisable unused NULL tests when SQLITE_ENABLE_STAT2 is not in use.
drh [Fri, 11 Feb 2011 02:43:14 +0000 (02:43 +0000)] 
Disable unused NULL tests when SQLITE_ENABLE_STAT2 is not in use.

FossilOrigin-Name: 5ecd11788269e78dc26639b2503a10b7e25b2483

14 years agoAdd .testctrl option to CLI.
shaneh [Thu, 10 Feb 2011 21:08:58 +0000 (21:08 +0000)] 
Add .testctrl option to CLI.

FossilOrigin-Name: f85afa0ecc7b31d32659ae53e70771cd42abda38

14 years agoSplit the documentation for sqlite3_wal_checkpoint_v2() and its constants
drh [Thu, 10 Feb 2011 18:56:09 +0000 (18:56 +0000)] 
Split the documentation for sqlite3_wal_checkpoint_v2() and its constants
onto separate pages.  No changes to code.

FossilOrigin-Name: 0ef8ffd12fce47c3c89e851e5116e2777ea9f435

14 years agoPrevent a segfault when automatic indices try to use a column with an
drh [Thu, 10 Feb 2011 17:46:14 +0000 (17:46 +0000)] 
Prevent a segfault when automatic indices try to use a column with an
unknown collating function.  Ticket [77aa3b1e6592582e38605d36].  This
check-in also removes some stray \r characters unrelated to the problem.

FossilOrigin-Name: f01030a0df4f94f886ab209ee8766b095da28c1e

14 years agoRefactor the cost function in the query planner. Give extra cost (thus
drh [Thu, 10 Feb 2011 00:08:47 +0000 (00:08 +0000)] 
Refactor the cost function in the query planner.  Give extra cost (thus
reduce likelihood of selection) to full table scans.

FossilOrigin-Name: 878da276ebf643b716ddd650d4d0ca3595fe5bf2

14 years agoMake sure code *compiles* with each OMIT and ENABLE option. Mostly changes to test...
shaneh [Wed, 9 Feb 2011 19:55:20 +0000 (19:55 +0000)] 
Make sure code *compiles* with each OMIT and ENABLE option.  Mostly changes to test modules.

FossilOrigin-Name: 7cc515edc9cade2bc6c74699b3e4153bf2b74ebb

14 years agoDo not report corruption if the the db size header field is greater than the file...
dan [Wed, 9 Feb 2011 18:19:20 +0000 (18:19 +0000)] 
Do not report corruption if the the db size header field is greater than the file size on disk unless the two change-counter header fields are identical. Fix for ticket [89b8c9ac54].

FossilOrigin-Name: 00c4596f0b270120848ab8d06dcdec7813a9a315

14 years agoUpdate Makefile.in for fts3_aux changes.
shaneh [Wed, 9 Feb 2011 15:25:17 +0000 (15:25 +0000)] 
Update Makefile.in for fts3_aux changes.

FossilOrigin-Name: 38b7cb33c55c1498618721b3a11a35559b755fb2

14 years agoUse macros to define the relative costs of search and seek operations when
drh [Wed, 9 Feb 2011 03:04:27 +0000 (03:04 +0000)] 
Use macros to define the relative costs of search and seek operations when
computing costs in the query planner.  Current constants seems wrong and
need to be fixed, but doing so will alter test results.  Need more
experimentation to determine accurate relative costs.

FossilOrigin-Name: 5f2ec44b22062ee9d31e20806fcec0101675aced

14 years agoSimplifications to the sqlite3_wal_checkpoint_v2() logic.
drh [Wed, 9 Feb 2011 03:03:16 +0000 (03:03 +0000)] 
Simplifications to the sqlite3_wal_checkpoint_v2() logic.

FossilOrigin-Name: 652b8835c58fc9d474c9837fc966d8857bec4a91

14 years agoCleanup to the OP_Checkpoint opcode.
drh [Mon, 7 Feb 2011 23:56:01 +0000 (23:56 +0000)] 
Cleanup to the OP_Checkpoint opcode.

FossilOrigin-Name: f611a5a879b7dec1ed1d8bf32413c8a6b81c3172

14 years agoFix some test cases in walfault.test. Extend one test case to restore code coverage...
dan [Mon, 7 Feb 2011 16:24:39 +0000 (16:24 +0000)] 
Fix some test cases in walfault.test. Extend one test case to restore code coverage. Add wal5.test to the "coverage-wal" permutation.

FossilOrigin-Name: f83b07ace340c9dd3e0cbe3cd3c106db003b0bd4

14 years agoChange blocking-checkpoint tests so that they run once using "PRAGMA wal_checkpoint...
dan [Mon, 7 Feb 2011 15:12:12 +0000 (15:12 +0000)] 
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().

FossilOrigin-Name: 5a4b6652cf3780ffed6fe0fe669e8090b0b71e81

14 years agoEnsure fts4aux can handle a table name in single or double quotes as a constructor...
dan [Sat, 5 Feb 2011 15:47:12 +0000 (15:47 +0000)] 
Ensure fts4aux can handle a table name in single or double quotes as a constructor argument.

FossilOrigin-Name: 929d62e496bb36a3ee0e19ec4609329d79aaeddc

14 years agoAdd test cases for fts4aux. Fix a bug affecting fts3 tables with multiple columns.
dan [Sat, 5 Feb 2011 14:37:57 +0000 (14:37 +0000)] 
Add test cases for fts4aux. Fix a bug affecting fts3 tables with multiple columns.

FossilOrigin-Name: dc511e60a65232a7087e12ff40b63506cf37a634

14 years agoChange fts4aux to (additionally) report on term frequency in individual columns of...
dan [Fri, 4 Feb 2011 18:56:25 +0000 (18:56 +0000)] 
Change fts4aux to (additionally) report on term frequency in individual columns of an fts table.

FossilOrigin-Name: 3996f92a9aca9ac2628be003eca83c8f954c71de

14 years agoSignificant changes have occurred since the 3.7.5 release so go ahead and
drh [Fri, 4 Feb 2011 14:28:34 +0000 (14:28 +0000)] 
Significant changes have occurred since the 3.7.5 release so go ahead and
increase the version number to 3.7.6.

FossilOrigin-Name: 999c915a4a075a4d1736ae786cbe7d1587809fee

14 years agoMerge the stat2 query planner enhancements into the trunk.
drh [Fri, 4 Feb 2011 06:36:44 +0000 (06:36 +0000)] 
Merge the stat2 query planner enhancements into the trunk.

FossilOrigin-Name: 499edcbc8ab70fcf35431d4e672c68dbcb6c5aad

14 years agoIf a deferred foreign key constraint fails on a statement that is not part
drh [Fri, 4 Feb 2011 05:47:51 +0000 (05:47 +0000)] 
If a deferred foreign key constraint fails on a statement that is not part
of a larger transation, make sure that the statement fully ends so that
subsequent invocations of the same statement will not pass the constraint
because they think the transaction is not closed.  This is a merge of
the deferred-fk-quirk branch together with a test case.

FossilOrigin-Name: 2f94d4623f9aae1b5bc7041bd85f4e3a7462c60e

14 years agoFix the ATTACH command so that the filename argument can be any expression
drh [Fri, 4 Feb 2011 00:51:16 +0000 (00:51 +0000)] 
Fix the ATTACH command so that the filename argument can be any expression
and so that if authorizer callback gets a NULL pointer for the filename
if the filename argument is anything other than a string literal.
Ticket [9013e13dba5b58c7]

FossilOrigin-Name: e64e1453a9c204d93de1af92dc0b3ca26762b024

14 years agoExtra tests for fts4 compress/uncompress hooks. Fix some minor problems with the...
dan [Thu, 3 Feb 2011 12:48:17 +0000 (12:48 +0000)] 
Extra tests for fts4 compress/uncompress hooks. Fix some minor problems with the same.

FossilOrigin-Name: 80225abe79b0a7723b922ec129954438af95855a