]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
11 years agoUpdate list of supported Tcl shells to include 8.6. Remove stray OS2 references. mmapDisabled
mistachkin [Wed, 28 Aug 2013 18:06:26 +0000 (18:06 +0000)] 
Update list of supported Tcl shells to include 8.6.  Remove stray OS2 references.

FossilOrigin-Name: ecd52ccf650ce2a4ab93c7c482289c1bc4768eeb

11 years agoFix a couple comments.
mistachkin [Wed, 28 Aug 2013 17:59:38 +0000 (17:59 +0000)] 
Fix a couple comments.

FossilOrigin-Name: 945cb89ecb92a6c2075b3e58ce1ba3d419b1b6ca

11 years agoIn the win32longpath test, move the journal mode change down where it was intended...
mistachkin [Wed, 28 Aug 2013 07:42:43 +0000 (07:42 +0000)] 
In the win32longpath test, move the journal mode change down where it was intended to be.

FossilOrigin-Name: 5cead293bbbcddd7d0976db41133e40704efcc99

11 years agoSupport database file names longer than 260 characters using the new 'win32-longpath...
mistachkin [Wed, 28 Aug 2013 05:49:39 +0000 (05:49 +0000)] 
Support database file names longer than 260 characters using the new 'win32-longpath' VFS variant.

FossilOrigin-Name: 37e85e444cde18f061049437980b965d4485f43c

11 years agoMake names of private functions in the Win32 VFS consistent. Fix comment typo in...
mistachkin [Wed, 28 Aug 2013 02:37:29 +0000 (02:37 +0000)] 
Make names of private functions in the Win32 VFS consistent.  Fix comment typo in Win32 mutex implementation.

FossilOrigin-Name: c3b82c5bf97cfb35544c5b1fbcdf7b9c4827d1cf

11 years agoRemove hard-coding of the directory separator in the Win32 VFS. Fixes to OSTRACE...
mistachkin [Wed, 28 Aug 2013 02:26:48 +0000 (02:26 +0000)] 
Remove hard-coding of the directory separator in the Win32 VFS.  Fixes to OSTRACE macros.

FossilOrigin-Name: fc98092f4bd42d64059024f09547904c1d70a517

11 years agoFix several harmless compiler warnings. Fix a couple compiler issues with the shell.
mistachkin [Wed, 28 Aug 2013 01:54:12 +0000 (01:54 +0000)] 
Fix several harmless compiler warnings.  Fix a couple compiler issues with the shell.

FossilOrigin-Name: 8917e9f9a0802cbfb6f33e2ab1c2f98e4df5babd

11 years agoPreparation for further Windows path name handling changes.
mistachkin [Mon, 26 Aug 2013 23:18:57 +0000 (23:18 +0000)] 
Preparation for further Windows path name handling changes.

FossilOrigin-Name: ec99224b0c9cf1ccd64b3dc93252556d888e93a3

11 years agoChange MAX_PATH related defines to use character lengths where WCHARs are used.
mistachkin [Mon, 26 Aug 2013 20:45:50 +0000 (20:45 +0000)] 
Change MAX_PATH related defines to use character lengths where WCHARs are used.

FossilOrigin-Name: 0a497083e915520c0807cb6611264b1a35ff62b7

11 years agoMerge updates from trunk.
mistachkin [Mon, 26 Aug 2013 19:36:18 +0000 (19:36 +0000)] 
Merge updates from trunk.

FossilOrigin-Name: 9d6860098f96efc7ea60e2d6116fb7d0e2685a55

11 years agoFix for builds with both SQLITE_OMIT_WAL and SQLITE_MAX_MMAP_SIZE=0 defined.
dan [Mon, 26 Aug 2013 14:30:25 +0000 (14:30 +0000)] 
Fix for builds with both SQLITE_OMIT_WAL and SQLITE_MAX_MMAP_SIZE=0 defined.

FossilOrigin-Name: edd5dbdc3239fc88799b822941603fcc828ecbb6

11 years agoVersion 3.8.0 version-3.8.0
drh [Mon, 26 Aug 2013 04:50:08 +0000 (04:50 +0000)] 
Version 3.8.0

FossilOrigin-Name: f64cd21e2e23ed7cff48f7dafa5e76adde9321c2

11 years agoSeveral modifications to the use of the MAX_PATH macro on Windows to improve consistency.
mistachkin [Sat, 24 Aug 2013 23:55:01 +0000 (23:55 +0000)] 
Several modifications to the use of the MAX_PATH macro on Windows to improve consistency.

FossilOrigin-Name: bda4c47df8e80b4cc9e8aac8fd74482869f96107

11 years agoFix a couple compilation issues on Unix.
mistachkin [Sat, 24 Aug 2013 01:12:03 +0000 (01:12 +0000)] 
Fix a couple compilation issues on Unix.

FossilOrigin-Name: 25b029d8f32440a94ef8af45153423f6702d7431

11 years agoUnify the result of PRAGMA mmap_size when mmap support is disabled.
mistachkin [Sat, 24 Aug 2013 00:59:24 +0000 (00:59 +0000)] 
Unify the result of PRAGMA mmap_size when mmap support is disabled.

FossilOrigin-Name: 032c31593d6f569842830cac6222362be68b2084

11 years agoAdjust #ifdefs to get SQLITE_OMIT_AUTOMATIC_INDEX and SQLITE_OMIT_PAGER_PRAGMAS
drh [Fri, 23 Aug 2013 17:33:46 +0000 (17:33 +0000)] 
Adjust #ifdefs to get SQLITE_OMIT_AUTOMATIC_INDEX and SQLITE_OMIT_PAGER_PRAGMAS
to build.

FossilOrigin-Name: ed310201628cf79c0f57674ae7478ee6738b1c6e

11 years agoFix a requirements comment in a test case. No changes to the testcase
drh [Fri, 23 Aug 2013 16:47:40 +0000 (16:47 +0000)] 
Fix a requirements comment in a test case.  No changes to the testcase
itself nor to any code.

FossilOrigin-Name: 3ad1f998e5db044849b528c31c4a7e1f3d527320

11 years agoModify script mkautoconfamal.sh to use the download.html naming convention for the...
dan [Fri, 23 Aug 2013 12:04:52 +0000 (12:04 +0000)] 
Modify script mkautoconfamal.sh to use the download.html naming convention for the tar.gz it creates.

FossilOrigin-Name: 375b4e3db0e0c9e83034d1c33d7c57aca48e87b6

11 years agoDefer the creation of automatic indices until the index is actually used.
drh [Thu, 22 Aug 2013 02:56:28 +0000 (02:56 +0000)] 
Defer the creation of automatic indices until the index is actually used.

FossilOrigin-Name: 0775501acf152dcbf4dd039f4511f3d8c4330d85

11 years agoSimplify the btreeGetPage() routine so that it uses a single flag parameter
drh [Wed, 21 Aug 2013 23:42:32 +0000 (23:42 +0000)] 
Simplify the btreeGetPage() routine so that it uses a single flag parameter
in place of two boolean parameters.

FossilOrigin-Name: 617e23ec283d3147fc3fd29c474ccedf4915cdc7

11 years agoMinor performance tweaks to the pager.
drh [Wed, 21 Aug 2013 22:54:55 +0000 (22:54 +0000)] 
Minor performance tweaks to the pager.

FossilOrigin-Name: 9ae1f9ce7ea6beaeddc3711080b3796e05acc4f8

11 years agoRefactor the sqlite3_randomness() implementation for improved performance.
drh [Wed, 21 Aug 2013 22:09:25 +0000 (22:09 +0000)] 
Refactor the sqlite3_randomness() implementation for improved performance.

FossilOrigin-Name: 4144dffb57b5ed791d7a6d2f26fab5e7dc77fbd1

11 years agoSimplification to the StrAccum object and the sqlite3StrAccumAppend()
drh [Wed, 21 Aug 2013 21:12:10 +0000 (21:12 +0000)] 
Simplification to the StrAccum object and the sqlite3StrAccumAppend()
method that also results in slightly better performance.

FossilOrigin-Name: 700dbbea8647e0fdaee6d0aba3d3dd8ebfbac04a

11 years agoMinor fixes for test cases. No code changes.
dan [Wed, 21 Aug 2013 20:04:54 +0000 (20:04 +0000)] 
Minor fixes for test cases. No code changes.

FossilOrigin-Name: ef2a6a37366f91889dc2f1ba9cb6d1257d9b05db

11 years agoFix typo in test.
mistachkin [Wed, 21 Aug 2013 19:59:14 +0000 (19:59 +0000)] 
Fix typo in test.

FossilOrigin-Name: f9859fe93bcecb4be7c1034291018523124c4a5c

11 years agoUpdate sqlite3MemCompare() to try common cases first, for a modest speed
drh [Wed, 21 Aug 2013 19:13:53 +0000 (19:13 +0000)] 
Update sqlite3MemCompare() to try common cases first, for a modest speed
improvement.

FossilOrigin-Name: b25bac79191975149d88fe34618c74354de62c5e

11 years agoIf a virtual table xSync() returns an error message, copy it into a buffer allocated...
dan [Wed, 21 Aug 2013 17:35:48 +0000 (17:35 +0000)] 
If a virtual table xSync() returns an error message, copy it into a buffer allocated by sqlite3DbMalloc() before transfering it to Vdbe.zErrMsg.

FossilOrigin-Name: 854ba3049005adf033e07e6740a36e63f2a56758

11 years agoPerformance enhancement in btreeParseCellPtr().
drh [Wed, 21 Aug 2013 15:52:22 +0000 (15:52 +0000)] 
Performance enhancement in btreeParseCellPtr().

FossilOrigin-Name: a17190a2296e8cd5e59524ff5914fc5ea3560697

11 years agoFix an FTS4 problem introduced by [361084e1eb].
dan [Wed, 21 Aug 2013 15:45:27 +0000 (15:45 +0000)] 
Fix an FTS4 problem introduced by [361084e1eb].

FossilOrigin-Name: 5f35c8cb8f8b67121c70f98c02c4aa7c25327690

11 years agoCandidate fix for [d666d600a6].
dan [Wed, 21 Aug 2013 12:04:32 +0000 (12:04 +0000)] 
Candidate fix for [d666d600a6].

FossilOrigin-Name: 781592f32c8e1dcd59954c17211cf61349d1c0b1

11 years agoFix a minor problem in progress.test. No code changes.
dan [Wed, 21 Aug 2013 07:25:03 +0000 (07:25 +0000)] 
Fix a minor problem in progress.test. No code changes.

FossilOrigin-Name: a95ae93b32a9ad2ae017124ed0881802c3c741c0

11 years agoFix a couple of test scripts to work with DEFAULT_AUTOVACUUM and OMIT_VIRTUALTABLE.
dan [Tue, 20 Aug 2013 20:25:03 +0000 (20:25 +0000)] 
Fix a couple of test scripts to work with DEFAULT_AUTOVACUUM and OMIT_VIRTUALTABLE.

FossilOrigin-Name: 356c6c59311eaf7d5633476f635e94a12b8b3924

11 years agoFix an invalid assert() in where.c. Also a crash that can occur in the EXPLAIN QUERY...
dan [Tue, 20 Aug 2013 17:14:57 +0000 (17:14 +0000)] 
Fix an invalid assert() in where.c. Also a crash that can occur in the EXPLAIN QUERY PLAN code under obscure circumstances.

FossilOrigin-Name: ef192abb82c2fc31135f875d7a19908d67c076b0

11 years agoIgnore IS NOT NULL and NOT NULL constraints on NOT NULL columns.
drh [Tue, 20 Aug 2013 17:00:55 +0000 (17:00 +0000)] 
Ignore IS NOT NULL and NOT NULL constraints on NOT NULL columns.

FossilOrigin-Name: e476408e3c5ba5f3ba5e98ff264167c163d72e3f

11 years agoTest script changes to support testing sqlite3_interrupt().
dan [Tue, 20 Aug 2013 16:08:39 +0000 (16:08 +0000)] 
Test script changes to support testing sqlite3_interrupt().

FossilOrigin-Name: 0cede9f898bcd13dab51b25cb0e72213d988d3d2

11 years agoPerformance optimizations in the VDBE and especially to the OP_Next and
drh [Tue, 20 Aug 2013 03:13:51 +0000 (03:13 +0000)] 
Performance optimizations in the VDBE and especially to the OP_Next and
related opcodes and in the sqlite3BtreeNext() and sqlite3BtreePrevious()
routines.  This is a cherrypick of [6f99b54aedeb], [d2efea1682a7], and
[d78c5d89de4b].

FossilOrigin-Name: 7f72fc4f47445a2c01910b268335873de9f75059

11 years agoPerformance improvement in sqlite3BtreeNext() and sqlite3BtreePrevious()
drh [Mon, 19 Aug 2013 20:04:10 +0000 (20:04 +0000)] 
Performance improvement in sqlite3BtreeNext() and sqlite3BtreePrevious()
for the common case of a valid cursor.

FossilOrigin-Name: dc65ad8c4c67b21e3b042b8df6580d02b634a90b

11 years agoInitialize a variable in fts3_write.c on the grounds that the argument required to...
dan [Mon, 19 Aug 2013 19:29:50 +0000 (19:29 +0000)] 
Initialize a variable in fts3_write.c on the grounds that the argument required to show that it does not require initialization with is complicated. Add an assert() to where.c to silence a clang scan-build warning.

FossilOrigin-Name: d6c4d48a002a6d7057fccc30064ce0b049678f0c

11 years agoFix test script pragma2.test so that it works with ENABLE_MEMORY_MANAGEMENT.
dan [Mon, 19 Aug 2013 18:37:18 +0000 (18:37 +0000)] 
Fix test script pragma2.test so that it works with ENABLE_MEMORY_MANAGEMENT.

FossilOrigin-Name: 6acf728100ff339e4451bcefd3a20fd5c3cfd662

11 years agoAdd some extra assert() statements to silence a few clang warnings.
dan [Mon, 19 Aug 2013 18:17:03 +0000 (18:17 +0000)] 
Add some extra assert() statements to silence a few clang warnings.

FossilOrigin-Name: 1c63e9515b5f5cb9169928b108d002dcd18ad4fd

11 years agoRemove unused variables from the command-line shell sources.
drh [Mon, 19 Aug 2013 14:23:31 +0000 (14:23 +0000)] 
Remove unused variables from the command-line shell sources.

FossilOrigin-Name: 753a402e90f3c9f675155ea96ee048dbe7a68700

11 years agoFix a potential reference off the end of an array in the query planner.
drh [Mon, 19 Aug 2013 14:19:00 +0000 (14:19 +0000)] 
Fix a potential reference off the end of an array in the query planner.

FossilOrigin-Name: f15591f80212dd6d4ed8e0f14be691cd578d4cdf

11 years agoFixes for harmless compiler warnings.
drh [Mon, 19 Aug 2013 11:15:48 +0000 (11:15 +0000)] 
Fixes for harmless compiler warnings.

FossilOrigin-Name: a0d9ca4f07f1dc3a189864f8ed9cdb0b1d791b1a

11 years agoAdd the cache_spill pragma. Change the fullfsync and checkpoint_fullfsync
drh [Sat, 17 Aug 2013 16:37:04 +0000 (16:37 +0000)] 
Add the cache_spill pragma.  Change the fullfsync and checkpoint_fullfsync
pragmas to apply to all attached databases.

FossilOrigin-Name: 65a85a156f3c827890e9f1fd22484a2f875c3b6f

11 years agoThe fullfsync, checkpoint_fullfsync, and cache_spill pragmas apply to all cache_spill
drh [Sat, 17 Aug 2013 15:42:29 +0000 (15:42 +0000)] 
The fullfsync, checkpoint_fullfsync, and cache_spill pragmas apply to all
files of a database connection, including those opened by future ATTACH
statements.

FossilOrigin-Name: d07c4331a28d44deca1ece8a34118f5b121b3ee2

11 years agoTest cases for the cache_spill pragma.
drh [Sat, 17 Aug 2013 00:25:07 +0000 (00:25 +0000)] 
Test cases for the cache_spill pragma.

FossilOrigin-Name: b85c9ec5e02c1b92faa8eeb9e56e02a576a43a96

11 years agoAdd the cache_spill pragma.
drh [Fri, 16 Aug 2013 20:42:20 +0000 (20:42 +0000)] 
Add the cache_spill pragma.

FossilOrigin-Name: cdb181c04fa99c6c29f23eb68ccb5475e7f6bf9c

11 years agoMake sure that GROUP BY terms select input column names in preference to
drh [Thu, 15 Aug 2013 22:40:21 +0000 (22:40 +0000)] 
Make sure that GROUP BY terms select input column names in preference to
output column names, in compliance with the SQL standard.
Ticket [1c69be2dafc28].

FossilOrigin-Name: f2d175f975cd0be63425424ec322a98fb650019e

11 years agoBare identifiers in ORDER BY clauses bind more tightly to output column name,
drh [Thu, 15 Aug 2013 20:24:27 +0000 (20:24 +0000)] 
Bare identifiers in ORDER BY clauses bind more tightly to output column name,
but identifiers in expressions bind more tightly to input column names.
This is a compromise between SQL92 and SQL99 behavior and is what
PostgreSQL and MS-SQL do.  Ticket [f617ea3125e9c].

FossilOrigin-Name: c78b357c00a35ed48ce2ffbc041de8d22570d1e2

11 years agoMake it easy to attach a debugger the test fixture process prior to any tests being...
mistachkin [Thu, 15 Aug 2013 20:05:03 +0000 (20:05 +0000)] 
Make it easy to attach a debugger the test fixture process prior to any tests being run.

FossilOrigin-Name: 53cd9ebfaf401c7932bf591e134a527c9962b88e

11 years agoClarification and typo fixes in comments related to name resolution.
drh [Thu, 15 Aug 2013 14:27:42 +0000 (14:27 +0000)] 
Clarification and typo fixes in comments related to name resolution.
No changes to code.

FossilOrigin-Name: f30abdf9d814d6c75bf1c803054737c737ad636f

11 years agoMake it easy to attach a debugger the test fixture process prior to any tests being... dbgTestFixture
mistachkin [Thu, 15 Aug 2013 08:06:15 +0000 (08:06 +0000)] 
Make it easy to attach a debugger the test fixture process prior to any tests being run.

FossilOrigin-Name: c23acba11bfefc019b5945cfb345f9afcf4b6242

11 years agoFix a few more minor comment typos. No changes to code.
mistachkin [Wed, 14 Aug 2013 00:20:23 +0000 (00:20 +0000)] 
Fix a few more minor comment typos.  No changes to code.

FossilOrigin-Name: 9e999081a59b161a0a1f968fbc01a1db9ea43b93

11 years agoFix an outdated comment and a comment typo. No changes to code.
mistachkin [Tue, 13 Aug 2013 22:33:41 +0000 (22:33 +0000)] 
Fix an outdated comment and a comment typo.  No changes to code.

FossilOrigin-Name: ac336959490083ffeaaf25aaec97ecb59a2f4536

11 years agoIf the SQLITE_EXTRA_INIT function is defined, make sure it is called only
drh [Thu, 8 Aug 2013 14:38:45 +0000 (14:38 +0000)] 
If the SQLITE_EXTRA_INIT function is defined, make sure it is called only
once by the effective sqlite3_initialize() call.

FossilOrigin-Name: e2b597cafe7c8a8313b051d6a302fed54f235727

11 years agoIf the SQLITE_ALLOW_URI_AUTHORITY compile-time option is set, then allow
drh [Wed, 7 Aug 2013 23:15:52 +0000 (23:15 +0000)] 
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.

FossilOrigin-Name: 3adb6c1bfda897859dc9cf9ae7f1e6719855ee68

11 years agoAdd a guard #ifndef to test_intarray.h to prevent harm if it is #included
drh [Wed, 7 Aug 2013 14:18:45 +0000 (14:18 +0000)] 
Add a guard #ifndef to test_intarray.h to prevent harm if it is #included
more than once.  Add a comment on the closing #endif of the guards on
sqlite3.h and test_multiplex.h.

FossilOrigin-Name: 0ad83ceb79767738bd06a28840cf84da0464ab4f

11 years agoFix typos and add clarification to comments in where.c. No code changes.
drh [Wed, 7 Aug 2013 01:18:38 +0000 (01:18 +0000)] 
Fix typos and add clarification to comments in where.c.  No code changes.

FossilOrigin-Name: f8d8790ede0fcaf6c5b60ac22919c1d97c74e838

11 years agoFix a test case related to partial indices so that it works even if
drh [Tue, 6 Aug 2013 19:18:17 +0000 (19:18 +0000)] 
Fix a test case related to partial indices so that it works even if
STAT3 is disabled.

FossilOrigin-Name: 153c645025637bbff14dfce793e4b92210ded7e8

11 years agoAdjust #ifdefs in test_autoext.c so that it compiles with
drh [Tue, 6 Aug 2013 18:35:31 +0000 (18:35 +0000)] 
Adjust #ifdefs in test_autoext.c so that it compiles with
SQLITE_OMIT_LOAD_EXTENSION.  Fix compiler warnings in two other
test modules.  No changes to the core.

FossilOrigin-Name: 89930ea3c3b3bd078f641b2c5203d851083bbf1a

11 years agoUpdate the configure script to use the latest version number (3.8.0).
drh [Tue, 6 Aug 2013 18:21:21 +0000 (18:21 +0000)] 
Update the configure script to use the latest version number (3.8.0).

FossilOrigin-Name: 52e8ec5e24730efa6d89cbaf1e03bc1d5c59cc05

11 years agoAdd a testcase() macro to verify OOM coverage.
drh [Tue, 6 Aug 2013 17:24:23 +0000 (17:24 +0000)] 
Add a testcase() macro to verify OOM coverage.

FossilOrigin-Name: d43dcbc488120aeb7104ab9e6a27f62bb348bf6a

11 years agoRemove unreachable branches in expr.c, replacing them with assert() and
drh [Tue, 6 Aug 2013 16:56:44 +0000 (16:56 +0000)] 
Remove unreachable branches in expr.c, replacing them with assert() and
testcase() statements.

FossilOrigin-Name: 9103c27ceb3f4023ea3a41b679a10717d3f80210

11 years agoFor the ".import" command of the command-line shell, start a transaction
drh [Tue, 6 Aug 2013 14:36:36 +0000 (14:36 +0000)] 
For the ".import" command of the command-line shell, start a transaction
if there is not one active already.

FossilOrigin-Name: 5dcc2d91bd343cd0fac79d3c8f079a5ce534cdf7

11 years agoClean up the input reader in the command-line shell for improved legibility
drh [Tue, 6 Aug 2013 14:01:46 +0000 (14:01 +0000)] 
Clean up the input reader in the command-line shell for improved legibility
and performance.

FossilOrigin-Name: 2b1743d60171635c1e5a6ede6b4928f4671f948d

11 years agoMore than double the speed of the resolveP2Values() routine in vdbeaux.c by
drh [Tue, 6 Aug 2013 07:45:08 +0000 (07:45 +0000)] 
More than double the speed of the resolveP2Values() routine in vdbeaux.c by
moving from an extended if-else on every opcode to a switch.  Opcodes are
reordered in mkopcodesh.awk to put the switched opcodes close together,
for additional performance and to reduce code footprint.

FossilOrigin-Name: 924f7e4d7a8fa2fe9100836663f3733b6e1a9084

11 years agoPerformance optimization: Avoid calling convertCompoundSelecctToSubquery()
drh [Mon, 5 Aug 2013 22:05:02 +0000 (22:05 +0000)] 
Performance optimization: Avoid calling convertCompoundSelecctToSubquery()
on queries that do not use the UNION, EXCEPT, or INTERSECT operators.

FossilOrigin-Name: c589b2fed7beabc2337d701094c22635914d9c23

11 years agoFor the vtshim module, always zero out the xChildDestroy function pointer after calli...
mistachkin [Mon, 5 Aug 2013 21:54:17 +0000 (21:54 +0000)] 
For the vtshim module, always zero out the xChildDestroy function pointer after calling it.

FossilOrigin-Name: 240f7252c66ad3ff5ae0ef06455c1ff9bd78bbb4

11 years agoFactor all KeyInfo object allocations into a single function:
drh [Mon, 5 Aug 2013 19:11:29 +0000 (19:11 +0000)] 
Factor all KeyInfo object allocations into a single function:
sqlite3KeyInfoAlloc().  Always allocate enough space so that
sqlite3VdbeRecordCompare() can avoid checking boundaries and hence
run faster.

FossilOrigin-Name: 7301bedd94c8610568349953b18ff3575203e1b2

11 years agoImprove performance of sqlite3VdbeRecordCompare() by using an approximation
drh [Mon, 5 Aug 2013 15:32:09 +0000 (15:32 +0000)] 
Improve performance of sqlite3VdbeRecordCompare() by using an approximation
that might give false negatives and only running the more expensive exact
subexpression if the approximation fails.

FossilOrigin-Name: 28979dcd16f53e0ddca8eed74b668834e2856f03

11 years agoAdd a missing '#include "tcl.h"' to test_rtree.c.
drh [Mon, 5 Aug 2013 12:31:41 +0000 (12:31 +0000)] 
Add a missing '#include "tcl.h"' to test_rtree.c.

FossilOrigin-Name: 4b8b426f10f8ae13bf553f7adf5ae09383fa0bd4

11 years agoUpdates to requirements marks. No code changes.
drh [Fri, 2 Aug 2013 23:40:45 +0000 (23:40 +0000)] 
Updates to requirements marks.  No code changes.

FossilOrigin-Name: 213020769f310aec1591d97756b53891d0b64005

11 years agoAdd NEVER() and ALWAYS() macros on some unreachable yet prudent branches.
drh [Fri, 2 Aug 2013 20:11:19 +0000 (20:11 +0000)] 
Add NEVER() and ALWAYS() macros on some unreachable yet prudent branches.

FossilOrigin-Name: c5c0a8ab6c222185d5f9d4321e64d9f93cd36b7d

11 years agoAdd support for partial indices.
drh [Fri, 2 Aug 2013 16:41:02 +0000 (16:41 +0000)] 
Add support for partial indices.

FossilOrigin-Name: 478113f18b1d28606b107b5a0bed04cb90a82cf2

11 years agoSilently ignore database name qualifiers in CHECK constraints and in partial-indices
drh [Fri, 2 Aug 2013 14:18:18 +0000 (14:18 +0000)] 
Silently ignore database name qualifiers in CHECK constraints and in
partial index WHERE clauses.

FossilOrigin-Name: 2e8c845eb5011a2743dace333aa38383588f2080

11 years agoFix typos in documentation for SQLITE_DBSTATUS_DEFERRED_FKS .
drh [Fri, 2 Aug 2013 13:31:31 +0000 (13:31 +0000)] 
Fix typos in documentation for SQLITE_DBSTATUS_DEFERRED_FKS .
No changes to code.

FossilOrigin-Name: f3efbfcd515ad6ac833f4b26391dcc44603a96e8

11 years agoFix the CREATE INDEX statement so that trying to create a TEMP index on
drh [Thu, 1 Aug 2013 22:27:26 +0000 (22:27 +0000)] 
Fix the CREATE INDEX statement so that trying to create a TEMP index on
a non-TEMP table throws an error rather than segfaulting.

FossilOrigin-Name: e3c8935f8736d00dc83644fa21d86ca7fec6d2fc

11 years agoFix an incorrect expected result in a test case in corruptG.test.
drh [Thu, 1 Aug 2013 22:26:56 +0000 (22:26 +0000)] 
Fix an incorrect expected result in a test case in corruptG.test.

FossilOrigin-Name: 6913831ad2892fdc8331ee53426d935386eacb9e

11 years agoFix a potential buffer overread in sqlite3VdbeRecordCompare() when a
drh [Thu, 1 Aug 2013 20:26:04 +0000 (20:26 +0000)] 
Fix a potential buffer overread in sqlite3VdbeRecordCompare() when a
serial_type specifies a field that starts in bounds but is much too large
for the allocated buffer.  Mostly harmless.  The overread is unlikely to
go more than one or two bytes past the end of the buffer.

FossilOrigin-Name: e436b2f4e5c5e6b2f70e65332c0c7d618e2ef20a

11 years agoMake sure signed integer overflow does not cause a segfault while attempting
drh [Thu, 1 Aug 2013 19:17:39 +0000 (19:17 +0000)] 
Make sure signed integer overflow does not cause a segfault while attempting
to read a corrupt database where the header size varint on a record is larger
than the maximum 32-bit signed integer.

FossilOrigin-Name: c3baca99f4580652afb2c3f73036ab83796a1557

11 years agoAdd test case for the problem fixed by [127a5b776d].
dan [Thu, 1 Aug 2013 17:43:35 +0000 (17:43 +0000)] 
Add test case for the problem fixed by [127a5b776d].

FossilOrigin-Name: 65816718b59b286c11d939235a23c7325f25594b

11 years agoAn improved method for avoiding the use of the STAT3 samples to compute
drh [Thu, 1 Aug 2013 17:21:26 +0000 (17:21 +0000)] 
An improved method for avoiding the use of the STAT3 samples to compute
the estimated number of outputs when the left-most index is equality
constrained.  This check-in undoes the previous fix and applies a new one.

FossilOrigin-Name: 127a5b776d16e1e23c5b3d454f6aaea67f1ded3a

11 years agoAvoid using left-most column STAT3 samples if the left-most column has an
drh [Thu, 1 Aug 2013 16:52:50 +0000 (16:52 +0000)] 
Avoid using left-most column STAT3 samples if the left-most column has an
equality constrain and there are inequality constraints on the second column.

FossilOrigin-Name: 31b4e63b3c30fcad22340d84d6076a306f26b49e

11 years agoFix bug in the logic that determines the end of a CREATE INDEX statement.
drh [Thu, 1 Aug 2013 16:02:40 +0000 (16:02 +0000)] 
Fix bug in the logic that determines the end of a CREATE INDEX statement.
Added a VACUUM test case that exposed the bug.

FossilOrigin-Name: 2e3df0bc900c01286d3ce32c2bbf9e5293973f9b

11 years agoMore test cases and corresponding bug fixes.
drh [Thu, 1 Aug 2013 15:09:57 +0000 (15:09 +0000)] 
More test cases and corresponding bug fixes.

FossilOrigin-Name: 0c8cfdfae215c95cf167f404a1d346690b28e972

11 years agoFill out an initial implementation of the sqlite3ExprImpliesExpr() function.
drh [Thu, 1 Aug 2013 13:04:46 +0000 (13:04 +0000)] 
Fill out an initial implementation of the sqlite3ExprImpliesExpr() function.

FossilOrigin-Name: 8e07aa2ad5579aeb82174ce5bd432ddb9c058bc1

11 years agoRefactor internal function name sqlite3VdbeGetValue() to
drh [Thu, 1 Aug 2013 12:21:58 +0000 (12:21 +0000)] 
Refactor internal function name sqlite3VdbeGetValue() to
sqlite3VdbeGetBoundValue().

FossilOrigin-Name: 81834c3023876487a1188390aae850cf71683701

11 years agoFix the ANALYZE command to work with partial indices.
drh [Thu, 1 Aug 2013 04:39:17 +0000 (04:39 +0000)] 
Fix the ANALYZE command to work with partial indices.

FossilOrigin-Name: 60353124f4e965393ecd864019bdbca1999fb69e

11 years agoTest cases and bug fixes for the partial index logic.
drh [Thu, 1 Aug 2013 03:36:59 +0000 (03:36 +0000)] 
Test cases and bug fixes for the partial index logic.

FossilOrigin-Name: 6b73ae7c123801787c8994113cbeb87ee96ba653

11 years agoAdd the logic to keep partial indices up to date through DML statements and
drh [Thu, 1 Aug 2013 01:14:43 +0000 (01:14 +0000)] 
Add the logic to keep partial indices up to date through DML statements and
when new partial indices are created.  This new logic is untested except to
verify that it does not interfere with full indices.

FossilOrigin-Name: fb9044d15ad4fd6ae4a38858c0c0e6fe9d4faa25

11 years agoLimit the number of memset() calls used when determining a temporary file name on...
mistachkin [Wed, 31 Jul 2013 23:28:36 +0000 (23:28 +0000)] 
Limit the number of memset() calls used when determining a temporary file name on Windows.  Also, fix a harmless compiler warning.

FossilOrigin-Name: 136fc2931b156f91cdd76a7a009298cdf09d826a

11 years agoAdd logic to the query planner to only use partial indices if the WHERE clause
drh [Wed, 31 Jul 2013 23:22:39 +0000 (23:22 +0000)] 
Add logic to the query planner to only use partial indices if the WHERE clause
constrains the search to rows covered by the partial index.  This is just
infrastructure.  The key routine, sqlite3ExprImpliesExpr(), is currently a
no-op so that partial indices will never be used.

FossilOrigin-Name: 8ca3eac111e06a1854f878a74bffe8f20eb47f1b

11 years agoSlight modifications to path name translation handling for Cygwin.
mistachkin [Wed, 31 Jul 2013 22:39:26 +0000 (22:39 +0000)] 
Slight modifications to path name translation handling for Cygwin.

FossilOrigin-Name: 33ba1f4c5dc2ef8292adf17a32ade0cde0887d88

11 years agoUse a new error code to represent a failure to get the configured temporary directory...
mistachkin [Wed, 31 Jul 2013 22:27:16 +0000 (22:27 +0000)] 
Use a new error code to represent a failure to get the configured temporary directory on Windows.

FossilOrigin-Name: c93d891b03c626b9ed01ed5ef2f246b2d4a40a64

11 years agoThe MAX_PATH constant in windows is measured in characters, so multiple by 3
drh [Wed, 31 Jul 2013 19:55:25 +0000 (19:55 +0000)] 
The MAX_PATH constant in windows is measured in characters, so multiple by 3
to get the number of bytes assuming worst-case UTF8 pathnames.

FossilOrigin-Name: bb06e1579022c24546ac5117a99846b3c37ef59b

11 years agoResolve names in CREATE INDEX WHERE clauses and detect errors. Disallow
drh [Wed, 31 Jul 2013 19:05:22 +0000 (19:05 +0000)] 
Resolve names in CREATE INDEX WHERE clauses and detect errors.  Disallow
expressions that contain variables, subqueries, or functions.
The expression is still not used for anything, however.
still unused.

FossilOrigin-Name: f2aa7842c8b9df24294f09e2bde27b3f08c455c7

11 years agoHere begins an experimental branch for exploring the idea of a partial index.
drh [Wed, 31 Jul 2013 18:12:26 +0000 (18:12 +0000)] 
Here begins an experimental branch for exploring the idea of a partial index.
This check-in is able to parse a WHERE clause on a CREATE INDEX statement, but
does not actually do anythingn with that WHERE clause yet.

FossilOrigin-Name: 6794b2dcb48b3507caccfc7867fc185818cf8291

11 years agoReduce the size of the stack required by the codeOneLoopStart() function in
drh [Tue, 30 Jul 2013 15:10:32 +0000 (15:10 +0000)] 
Reduce the size of the stack required by the codeOneLoopStart() function in
where.c.

FossilOrigin-Name: eb6d4278b8516e0571269049d1eaa55066f51b1a

11 years agoFor the MSVC makefile, recompile vdbe.lo and parse.lo first.
mistachkin [Mon, 29 Jul 2013 19:03:20 +0000 (19:03 +0000)] 
For the MSVC makefile, recompile vdbe.lo and parse.lo first.

FossilOrigin-Name: 9e819f0f12b6f2a8e0e7a90251b3115ff1595f25

11 years agoComment and preprocessor macro cleanup.
drh [Mon, 29 Jul 2013 15:54:06 +0000 (15:54 +0000)] 
Comment and preprocessor macro cleanup.

FossilOrigin-Name: c0809b5e32c2ca0600098447a573e718eaeb319f