]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
11 years agoIn the index_list pragma, make sure the "r" column is the same on output index-scan-rate
drh [Sat, 5 Oct 2013 02:56:25 +0000 (02:56 +0000)] 
In the index_list pragma, make sure the "r" column is the same on output
as it was on input in the sqlite_stat1 table.

FossilOrigin-Name: de78250ad2a6210dd4f03045248f7192d64427f2

11 years agoMerge trunk changes.
drh [Fri, 4 Oct 2013 20:39:44 +0000 (20:39 +0000)] 
Merge trunk changes.

FossilOrigin-Name: c6ac80ed8d5240dd30783d62d9f133e159809dec

11 years agoFurther refinements of the index scanning speed logic.
drh [Fri, 4 Oct 2013 18:29:25 +0000 (18:29 +0000)] 
Further refinements of the index scanning speed logic.

FossilOrigin-Name: e5d9371da92b4cc2c1df177cf40e0ced4d4c7421

11 years agoIf an "INSERT INTO ... SELECT" can use the xfer optimization, pass the OPFLAG_BULKCSR...
dan [Fri, 4 Oct 2013 18:17:18 +0000 (18:17 +0000)] 
If an "INSERT INTO ... SELECT" can use the xfer optimization, pass the OPFLAG_BULKCSR hint to btree cursors used to update indices. This results in a tighter key packing.

FossilOrigin-Name: 087af29ee2e1572f8668dd0152a14d7f9796a530

11 years agoFix test cases so that they work when the query planner uses index size
drh [Fri, 4 Oct 2013 15:58:59 +0000 (15:58 +0000)] 
Fix test cases so that they work when the query planner uses index size
estimates to determine whether or not to try an covering index scan.

FossilOrigin-Name: 2f394de88f23dacd3c61e586a4214ffc6f927d97

11 years agoImproved estimates of the relative speed of index scans based on declared
drh [Fri, 4 Oct 2013 15:30:21 +0000 (15:30 +0000)] 
Improved estimates of the relative speed of index scans based on declared
datatypes of columns in the table.  Add "r" column to PRAGMA index_info,
showing the estimated relative scan rate.

FossilOrigin-Name: 07462bb6059f023c22a6c84a4a02afbd84e69255

11 years agoProgress toward using the iScanRatio information on indices. Many tests
drh [Fri, 4 Oct 2013 02:36:19 +0000 (02:36 +0000)] 
Progress toward using the iScanRatio information on indices.  Many tests
are still failing.

FossilOrigin-Name: 6c352edbba85a15ca356b5e131f4b3b2723d1774

11 years agoMake sure the count(*) optimization works correctly even when partial
drh [Fri, 4 Oct 2013 00:00:12 +0000 (00:00 +0000)] 
Make sure the count(*) optimization works correctly even when partial
indices are present.  Ticket [a5c8ed66cae].

FossilOrigin-Name: 9f2f4c0a50808910ad01c8c4352367f25747be08

11 years agoHave FTS take advantage of "docid<?" constraints when they are present. Extend the...
dan [Thu, 3 Oct 2013 20:41:18 +0000 (20:41 +0000)] 
Have FTS take advantage of "docid<?" constraints when they are present. Extend the FTS "incremental doclist" optimization so that it is used for tokens within multi-token phrases.

FossilOrigin-Name: baf8ce5916ea9baf0ec557263cb9c7ecf716431f

11 years agoMerge latest trunk changes. fts4-docid-range-constraints
dan [Thu, 3 Oct 2013 20:28:22 +0000 (20:28 +0000)] 
Merge latest trunk changes.

FossilOrigin-Name: 24aa20da222a9cc181473bc41d0f8791be91fa97

11 years agoAllow FTS4 multi-token phrases to use a combination of in-memory and incrementally...
dan [Thu, 3 Oct 2013 19:27:14 +0000 (19:27 +0000)] 
Allow FTS4 multi-token phrases to use a combination of in-memory and incrementally loaded doclists. This allows phrases to (partially) benefit from incremental doclists without disabling the deferred token optimization.

FossilOrigin-Name: f6819c5f3363d358e7ef65fe6978f13991bd44af

11 years agoExperimental branch allowing different postulated scan rates for each index.
drh [Thu, 3 Oct 2013 19:21:41 +0000 (19:21 +0000)] 
Experimental branch allowing different postulated scan rates for each index.

FossilOrigin-Name: d59d97b0a8d70dc31d45db61bbc11ebb5375a224

11 years agoThe sqlite3FixInit() routine cannot fail. So change the return type from "int"
drh [Thu, 3 Oct 2013 15:39:44 +0000 (15:39 +0000)] 
The sqlite3FixInit() routine cannot fail.  So change the return type from "int"
to "void".

FossilOrigin-Name: 500c5932fe3f5fcd0940522f7839d581c555e0eb

11 years agoRework the PRAGMA implementation to only call sqlite3ReadSchema() from a single
drh [Thu, 3 Oct 2013 14:08:07 +0000 (14:08 +0000)] 
Rework the PRAGMA implementation to only call sqlite3ReadSchema() from a single
place, based on a flag in the pragma table, rather than separately from each
case which needs the schema.

FossilOrigin-Name: 8338232a111be16d6c2ab57176d0a23a001f02ad

11 years agoReturn an error if an attempt is made to create a trigger with an SQL variable embedd...
dan [Thu, 3 Oct 2013 12:29:38 +0000 (12:29 +0000)] 
Return an error if an attempt is made to create a trigger with an SQL variable embedded within it. If such a variable reference is found within a trigger definition loaded from the sqlite_master table, silently replace it with a NULL.

FossilOrigin-Name: f35f6ae3da77dbdf5f7a4a9927475659fc6e0ca6

11 years agoRemove unnecessary memset() calls from test code.
drh [Thu, 3 Oct 2013 11:27:56 +0000 (11:27 +0000)] 
Remove unnecessary memset() calls from test code.

FossilOrigin-Name: eec3187bc68ddebdbc2113f77c7f5cd32e9be61f

11 years agoIn the lemon parser generator, change all hashes to unsigned to avoid
drh [Wed, 2 Oct 2013 20:46:30 +0000 (20:46 +0000)] 
In the lemon parser generator, change all hashes to unsigned to avoid
potential problems with signed integer overflow.

FossilOrigin-Name: 8d399a03de63c15908d63ed69140ee15c6275b8d

11 years agoAdd a test to check that the new multi-token phrase optimization is actually helping.
dan [Wed, 2 Oct 2013 08:04:27 +0000 (08:04 +0000)] 
Add a test to check that the new multi-token phrase optimization is actually helping.

FossilOrigin-Name: bc3a2ed5fb2402805928b0002457eebf06f87c47

11 years agoBring some file format comments in btreeInt.h up to date.
drh [Tue, 1 Oct 2013 20:29:30 +0000 (20:29 +0000)] 
Bring some file format comments in btreeInt.h up to date.

FossilOrigin-Name: 012d54d0d2b40888d08915082592ba75d70891c1

11 years agoMerge trunk changes with this branch.
dan [Tue, 1 Oct 2013 20:10:26 +0000 (20:10 +0000)] 
Merge trunk changes with this branch.

FossilOrigin-Name: 65d9c6fafbc19d3582e07c31fd915a70e7fcfa8e

11 years agoAllow multi-token phrases to load doclists from the database incrementally. This...
dan [Tue, 1 Oct 2013 20:02:32 +0000 (20:02 +0000)] 
Allow multi-token phrases to load doclists from the database incrementally. This allows queries that feature such phrases to benefit from the "docid<?" optimization.

FossilOrigin-Name: ea543f081d93ed1bf66c21ce2108ec94e349f4c5

11 years agoFix comments in the fast_vacuum.c demonstration program.
drh [Tue, 1 Oct 2013 19:36:15 +0000 (19:36 +0000)] 
Fix comments in the fast_vacuum.c demonstration program.

FossilOrigin-Name: e0db7b38e1bc0edb1c3995cb23c46488aa6a0909

11 years agoAdd the "fast_vacuum.c" demonstration program to the tool/ subdirectgory.
drh [Tue, 1 Oct 2013 19:02:56 +0000 (19:02 +0000)] 
Add the "fast_vacuum.c" demonstration program to the tool/ subdirectgory.

FossilOrigin-Name: 2b60320d57a4638ebf97a2854527649c671d108e

11 years agoChange the ".dump" command in the command-line shell so that it COMMITs
drh [Tue, 1 Oct 2013 15:30:05 +0000 (15:30 +0000)] 
Change the ".dump" command in the command-line shell so that it COMMITs
if there are database corruption errors but invokes ROLLBACK on any other
kind of error.

FossilOrigin-Name: 473234632ff7617680ab151076153f5c1088e55b

11 years agoFix a minor typo in a comment in where.c.
drh [Mon, 30 Sep 2013 19:33:06 +0000 (19:33 +0000)] 
Fix a minor typo in a comment in where.c.

FossilOrigin-Name: 9c9fa151e9a3bdab0264c08b66cbcc89d61bfca5

11 years agoAdd some timing tests to the amatch test script.
drh [Mon, 30 Sep 2013 19:05:03 +0000 (19:05 +0000)] 
Add some timing tests to the amatch test script.

FossilOrigin-Name: ad71c72be56786d8dcf6917efd10a8d3c2d50419

11 years agoMerge trunk changes with this branch.
dan [Mon, 30 Sep 2013 18:16:07 +0000 (18:16 +0000)] 
Merge trunk changes with this branch.

FossilOrigin-Name: e294a9c7c525d1da698259c2fef089579bfd1c0b

11 years agoFix a performance problem in the FTS4 auxiliary functions triggered by an OR clause...
dan [Mon, 30 Sep 2013 18:14:45 +0000 (18:14 +0000)] 
Fix a performance problem in the FTS4 auxiliary functions triggered by an OR clause in the full-text query.

FossilOrigin-Name: fa0f2f0e3e79ae653118b901e1cca7725dfaf249

11 years agoFix memory leaks in the amatch extension. Add a few simple test cases.
drh [Mon, 30 Sep 2013 17:37:15 +0000 (17:37 +0000)] 
Fix memory leaks in the amatch extension.  Add a few simple test cases.

FossilOrigin-Name: 604134732e309a738e21bcb4240b9ff285d2bfe4

11 years agoHave fts4 full-text queries consider "docid<?" and similar constraints.
dan [Mon, 30 Sep 2013 11:42:19 +0000 (11:42 +0000)] 
Have fts4 full-text queries consider "docid<?" and similar constraints.

FossilOrigin-Name: 6622424a3a149edd35ba2ba0881aa41b4536417b

11 years agoUpdate and modernize an obsolete comment associated with VACUUM. No
drh [Mon, 30 Sep 2013 11:01:28 +0000 (11:01 +0000)] 
Update and modernize an obsolete comment associated with VACUUM.  No
changes to code.

FossilOrigin-Name: 94c914e3fa632f88a0d0c14537f81aa46759e2be

11 years agoFix typo in comment. No changes to code.
mistachkin [Sun, 29 Sep 2013 04:56:43 +0000 (04:56 +0000)] 
Fix typo in comment.  No changes to code.

FossilOrigin-Name: 0b7bd46825b09c9e46290baee3e239344ca5bf0e

11 years agoAdd new test file fts3defer3.test.
dan [Sat, 28 Sep 2013 16:43:49 +0000 (16:43 +0000)] 
Add new test file fts3defer3.test.

FossilOrigin-Name: a6cd14effef0a4e5520eea871523e6e7a7d30aef

11 years agoIn the nextchar.c extension, allow the second argument to the next_char()
drh [Sat, 28 Sep 2013 13:28:40 +0000 (13:28 +0000)] 
In the nextchar.c extension, allow the second argument to the next_char()
function to be a subquery.

FossilOrigin-Name: 59b9fa223681a7329533b350be7bf5a0a3609255

11 years agoUpdates to the sqlite3_analyzer utility: Change the names of some labels,
drh [Sat, 28 Sep 2013 12:40:55 +0000 (12:40 +0000)] 
Updates to the sqlite3_analyzer utility:  Change the names of some labels,
especially change "Fragmentation" to "Non-sequential pages".  Revise the
computation of non-sequential pages so that it ignores itercalated non-leaf
pages (overflow and index pages).

FossilOrigin-Name: 3e5c7771fa91d8ae1e495432329b87af87b1ebc6

11 years agoObtain the required shared-cache write-lock when executing "DELETE FROM tbl" statemen...
dan [Thu, 26 Sep 2013 15:21:16 +0000 (15:21 +0000)] 
Obtain the required shared-cache write-lock when executing "DELETE FROM tbl" statements. Fix for [1e1321ee98].

FossilOrigin-Name: 1f8f4fdf3ff2b8de27e167a44a19b0f479f5ee1a

11 years agoFix a faulty assert() in sqlite3BtreeBeginTrans() that may fail in shared-cache mode.
dan [Thu, 26 Sep 2013 11:04:33 +0000 (11:04 +0000)] 
Fix a faulty assert() in sqlite3BtreeBeginTrans() that may fail in shared-cache mode.

FossilOrigin-Name: 1e1321ee985370c2b7e5bd64286bb4d7704b5a30

11 years agoTest that the unicode61 tokenchars= and separators= options work with the fts3tokeniz...
dan [Wed, 18 Sep 2013 11:16:32 +0000 (11:16 +0000)] 
Test that the unicode61 tokenchars= and separators= options work with the fts3tokenize virtual table.

FossilOrigin-Name: ed24051462c09220ebfb82a347b4a2b5c820ef63

11 years agoClear the current time value on prepared statements when the prepared statement
drh [Tue, 17 Sep 2013 23:36:33 +0000 (23:36 +0000)] 
Clear the current time value on prepared statements when the prepared statement
is reset.

FossilOrigin-Name: cebd6fc551d26aea0f28cd7d25338fe0b72aae88

11 years agoReadability improvements to the Win32 RC file.
mistachkin [Mon, 16 Sep 2013 20:46:34 +0000 (20:46 +0000)] 
Readability improvements to the Win32 RC file.

FossilOrigin-Name: e64590625774228b5602a66cfb087cf74e2b438b

11 years agoMinor consistency fixes to the Win32 RC file.
mistachkin [Mon, 16 Sep 2013 19:27:36 +0000 (19:27 +0000)] 
Minor consistency fixes to the Win32 RC file.

FossilOrigin-Name: 619c5211b91aef98794e2e0a6f03832619fc83c0

11 years agoThe date and time functions use the exact same notion of "now" for every
drh [Mon, 16 Sep 2013 12:57:19 +0000 (12:57 +0000)] 
The date and time functions use the exact same notion of "now" for every
invocation within the same call to sqlite3_step().

FossilOrigin-Name: daf6ba413cb3cb6065774ba07495eab4a28b49b0

11 years agoFix Windows SDK compiler warning.
mistachkin [Fri, 13 Sep 2013 23:27:39 +0000 (23:27 +0000)] 
Fix Windows SDK compiler warning.

FossilOrigin-Name: d5fc3f1dabc7227230dcabdd808357f63432357b

11 years agoFix test issues for Windows portability.
mistachkin [Fri, 13 Sep 2013 23:26:47 +0000 (23:26 +0000)] 
Fix test issues for Windows portability.

FossilOrigin-Name: 650b32825a85baff11b8e568649fd797066c8ab1

11 years agoVSIX tooling changes to support Visual Studio 2013.
mistachkin [Fri, 13 Sep 2013 22:38:54 +0000 (22:38 +0000)] 
VSIX tooling changes to support Visual Studio 2013.

FossilOrigin-Name: d56fac40313e7d2e77dac3e2bc47cbbb3d10c656

11 years agoFix the "const" qualifiers on the pragma name table.
drh [Fri, 13 Sep 2013 21:03:45 +0000 (21:03 +0000)] 
Fix the "const" qualifiers on the pragma name table.

FossilOrigin-Name: b74e6be818fa7d19f1af6d86ad1d2ecba334b01b

11 years agoAdd the soft_heap_limit pragma.
drh [Fri, 13 Sep 2013 21:01:56 +0000 (21:01 +0000)] 
Add the soft_heap_limit pragma.

FossilOrigin-Name: c326356f9a18bff5cf36bd59331e2cc207e349fa

11 years agoTweak the new PRAGMA name parser to achieve full branch test coverage.
drh [Fri, 13 Sep 2013 19:00:06 +0000 (19:00 +0000)] 
Tweak the new PRAGMA name parser to achieve full branch test coverage.

FossilOrigin-Name: c82e05c4b8e000684d95ac8417afaef5e4d633e6

11 years agoRemove one unreachable branch and add asserts() to dupedExprStructSize().
drh [Fri, 13 Sep 2013 18:15:15 +0000 (18:15 +0000)] 
Remove one unreachable branch and add asserts() to dupedExprStructSize().
New asserts verify that removed branch is unused and that constants that are
ORed together in the output do not overlap.

FossilOrigin-Name: 86ad358b5a7567857f2f998fbb8266b7de9ec87e

11 years agoAdjust the query planner to take into account WHERE clause terms that do not
drh [Fri, 13 Sep 2013 17:47:57 +0000 (17:47 +0000)] 
Adjust the query planner to take into account WHERE clause terms that do not
drive indices.  Add the unlikely() and likelihood() functions used to give
hints to the query planner about the selectivity of WHERE clause terms.

FossilOrigin-Name: bc446449a19171c0fa0681973b06bc80d3c0517f

11 years agoEnhance the pragma lookup table generator script to output a comment that
drh [Fri, 13 Sep 2013 16:56:17 +0000 (16:56 +0000)] 
Enhance the pragma lookup table generator script to output a comment that
gives the number of pragmas.

FossilOrigin-Name: ca05205050752b5d5f583421b7813fba62f5085c

11 years agoChange the PRAGMA parser to use a binary search for the pragma name.
drh [Fri, 13 Sep 2013 16:36:46 +0000 (16:36 +0000)] 
Change the PRAGMA parser to use a binary search for the pragma name.
Also:  Minor performance enhancement to sqlite3DbFree() and to the
token dequoter.

FossilOrigin-Name: 870c030b4e1854e6e0d39907fadbd82774c16f56

11 years agoAdd tests for the fts4 unicode61 tokenchars and separators options.
dan [Fri, 13 Sep 2013 12:10:09 +0000 (12:10 +0000)] 
Add tests for the fts4 unicode61 tokenchars and separators options.

FossilOrigin-Name: 9ce6f40dfb54b35cecba3cc9c1ec0d111f6e9f11

11 years agoRefactor the ExprSetIrreducible() macro into ExprSetVVAProperty(*,EP_NoReduce). unlikely-func
drh [Thu, 12 Sep 2013 23:42:22 +0000 (23:42 +0000)] 
Refactor the ExprSetIrreducible() macro into ExprSetVVAProperty(*,EP_NoReduce).
This is a naming change only.  The logic is the same.

FossilOrigin-Name: 695aee46e9bdf15159ab52db7f522b30c91aed0f

11 years agoFix typo in a macro name: "GlogUpperToLower" should be "GlobUpperToLower"
drh [Thu, 12 Sep 2013 23:12:08 +0000 (23:12 +0000)] 
Fix typo in a macro name:  "GlogUpperToLower" should be "GlobUpperToLower"

FossilOrigin-Name: 73634ca463f46027bfa8ea23f18abaa530460e24

11 years agoMerge in the Expr.flags expansion to 32-bits. Use an extra bit to help
drh [Thu, 12 Sep 2013 17:29:25 +0000 (17:29 +0000)] 
Merge in the Expr.flags expansion to 32-bits.  Use an extra bit to help
optimize the sqlite3ExprSkipCollate() routine.

FossilOrigin-Name: 4c84d1b4c20f18921dd705bf67e8225975b83e86

11 years agoIncrease the number of bits available in Expr.flags. Other tweaks aimed at expr-tuning
drh [Thu, 12 Sep 2013 16:50:49 +0000 (16:50 +0000)] 
Increase the number of bits available in Expr.flags.  Other tweaks aimed at
making expression processing more robust.

FossilOrigin-Name: 579a512538528cf4bb4381ba393c5d9e7310086b

11 years agoFor error log messages generated by the Win32 native allocator, make sure the correct...
mistachkin [Thu, 12 Sep 2013 02:09:05 +0000 (02:09 +0000)] 
For error log messages generated by the Win32 native allocator, make sure the correct format specifier is used for the value returned by GetLastError().

FossilOrigin-Name: 75a8a8c1b39725d36db627536d0c69401f8e0815

11 years agoFix a couple more harmless compiler warnings.
mistachkin [Thu, 12 Sep 2013 01:47:57 +0000 (01:47 +0000)] 
Fix a couple more harmless compiler warnings.

FossilOrigin-Name: 59708674f66e06c9c31c1a24f2f1c51f0bf4fa3e

11 years agoRemove two obsolete fields from the sqlite3 object.
drh [Thu, 12 Sep 2013 01:33:53 +0000 (01:33 +0000)] 
Remove two obsolete fields from the sqlite3 object.

FossilOrigin-Name: 117fa5fbc9bed1a7b982c8ddc21b7e228905ccb4

11 years agoFix harmless compiler warning.
mistachkin [Thu, 12 Sep 2013 00:54:59 +0000 (00:54 +0000)] 
Fix harmless compiler warning.

FossilOrigin-Name: 2b510614dc6d878bd49eb428f167014f7f2e2568

11 years agoMerge updates from trunk. vsix2013
mistachkin [Thu, 12 Sep 2013 00:40:54 +0000 (00:40 +0000)] 
Merge updates from trunk.

FossilOrigin-Name: fca799f03ad04b7d36381108ff10e9c7d03656ac

11 years agoImprovements to likelihood processing so that commuting an unindexed term in
drh [Wed, 11 Sep 2013 17:39:09 +0000 (17:39 +0000)] 
Improvements to likelihood processing so that commuting an unindexed term in
the WHERE clause does not change the query plan.

FossilOrigin-Name: 6e6bded055cdbc902731687c86d92c39a3ba5904

11 years agoAdd test cases to cover TPC-H Q8.
drh [Wed, 11 Sep 2013 14:57:11 +0000 (14:57 +0000)] 
Add test cases to cover TPC-H Q8.

FossilOrigin-Name: eb5cef8351d12c0f8550dac96ee7a6e495975b5a

11 years agoAdditional unlikely() test cases. Logic tweaks to support test coverage.
drh [Wed, 11 Sep 2013 14:34:58 +0000 (14:34 +0000)] 
Additional unlikely() test cases.  Logic tweaks to support test coverage.

FossilOrigin-Name: 5d00cce74a7aefaf30022ae971ab1e0451e0ad6e

11 years agoChange the name of the two-argument unlikely() function to likelihood().
drh [Wed, 11 Sep 2013 11:38:58 +0000 (11:38 +0000)] 
Change the name of the two-argument unlikely() function to likelihood().
Add test cases.

FossilOrigin-Name: 29a359b8d7f90e6fa2b28ce2a112284fd3870494

11 years agoTweaks to the index selection logic.
drh [Wed, 11 Sep 2013 03:53:22 +0000 (03:53 +0000)] 
Tweaks to the index selection logic.

FossilOrigin-Name: 52d52688644f635a50a60ff17b160f3affa8fa6c

11 years agoMerge trunk fixes into the unlikely-func branch.
drh [Tue, 10 Sep 2013 01:53:18 +0000 (01:53 +0000)] 
Merge trunk fixes into the unlikely-func branch.

FossilOrigin-Name: a51d751553b14aa26912c516f60727551deb8e60

11 years agoDeterministically initialize the PRNG used as a tie-breaker in the ANALYZE
drh [Tue, 10 Sep 2013 01:41:25 +0000 (01:41 +0000)] 
Deterministically initialize the PRNG used as a tie-breaker in the ANALYZE
command, so that the analysis is always the same given the same database.
This simplifies testing.

FossilOrigin-Name: 48ed8b565b84c8fa7898c2f9817c01f7e9c9182e

11 years agoMake sure that the transitive constraint optimization does not cause
drh [Mon, 9 Sep 2013 19:37:46 +0000 (19:37 +0000)] 
Make sure that the transitive constraint optimization does not cause
WHERE clause terms to be disabled prematurely.  We are unable to find a test
case that fails because of this, but it seems prudent to make this
preventative change nevertheless.

FossilOrigin-Name: d6e361d7fb8013d616af91ef2c10038c97d1be5f

11 years agoContinuing refinements of the logic to take WHERE clause terms not used for
drh [Sat, 7 Sep 2013 00:29:06 +0000 (00:29 +0000)] 
Continuing refinements of the logic to take WHERE clause terms not used for
indexing into account when computing the number of output rows from each
table.

FossilOrigin-Name: b65dc53415f42d8402d0ec7f4bedf59d7b39b486

11 years agoEnhance the plan solver to take into account the number of output rows when
drh [Fri, 6 Sep 2013 17:45:42 +0000 (17:45 +0000)] 
Enhance the plan solver to take into account the number of output rows when
computing the set of paths to retain for the next cycle.

FossilOrigin-Name: 1a46a7242313da96420985fa52e1de3f84533e5b

11 years agoInitial implementation of the unlikely() SQL function used as a hint to
drh [Fri, 6 Sep 2013 15:23:29 +0000 (15:23 +0000)] 
Initial implementation of the unlikely() SQL function used as a hint to
the query planner.

FossilOrigin-Name: 036fc37a034093a4c6fc190633bd41c2b7230d77

11 years agoCombine the FuncDef.iPrefEnc and FuncDef.flags fields into a single
drh [Fri, 6 Sep 2013 13:10:12 +0000 (13:10 +0000)] 
Combine the FuncDef.iPrefEnc and FuncDef.flags fields into a single
new FuncDef.funcFlags field.

FossilOrigin-Name: 97b10e66e98e84755aa577f8da017bf1aea2056c

11 years agoMake sure the destination WhereLoop is left in a sane state when an
drh [Fri, 6 Sep 2013 00:40:59 +0000 (00:40 +0000)] 
Make sure the destination WhereLoop is left in a sane state when an
OOM fault occurs inside of whereLoopXfer().

FossilOrigin-Name: a99a53b81e29c9514b85318bea028d1667e5f760

11 years agoWhen preparing an UPDATE statement, avoid generating VDBE code for those foreign...
dan [Thu, 5 Sep 2013 18:40:29 +0000 (18:40 +0000)] 
When preparing an UPDATE statement, avoid generating VDBE code for those foreign key related actions and constraint checks that may be seen to be unnecessary by considering the subset of table columns potentially modified by the UPDATE.

FossilOrigin-Name: e940b5de49baa1d6a4cf859fbbc0e0df86ac5dbf

11 years agoRearrange the order of conditions in an "if" statement to facilitate testing.
drh [Wed, 4 Sep 2013 18:14:53 +0000 (18:14 +0000)] 
Rearrange the order of conditions in an "if" statement to facilitate testing.

FossilOrigin-Name: 8462fb43c275a70db59c4339650225deeadeef00

11 years agoAdd tests to improve coverage when SQLITE_ENABLE_STAT3 is defined.
dan [Wed, 4 Sep 2013 16:38:42 +0000 (16:38 +0000)] 
Add tests to improve coverage when SQLITE_ENABLE_STAT3 is defined.

FossilOrigin-Name: f929e9b41f2f69b086be3dd48fe557adbba7ae5c

11 years agoFix a bug in the command-line shell for ".mode insert" on UTF16 databases
drh [Wed, 4 Sep 2013 16:08:50 +0000 (16:08 +0000)] 
Fix a bug in the command-line shell for ".mode insert" on UTF16 databases
with BLOB values.

FossilOrigin-Name: d8fdc7821808e2bfa048144ee3015b745232dc30

11 years agoThe sqlite3Stat4ProbeSetValue() routine should always return results using
drh [Wed, 4 Sep 2013 15:15:10 +0000 (15:15 +0000)] 
The sqlite3Stat4ProbeSetValue() routine should always return results using
the database encoding.

FossilOrigin-Name: eb21663271369c3862bc8fd800f76d568c8579fe

11 years agoFix out-of-order variable declaration. Fix harmless compiler warning.
mistachkin [Wed, 4 Sep 2013 04:04:08 +0000 (04:04 +0000)] 
Fix out-of-order variable declaration.  Fix harmless compiler warning.

FossilOrigin-Name: 8df95bb0b3f72222cf262174247a467c234f9939

11 years agoConditionally exclude code from analyze.c that is not used by STAT3.
drh [Wed, 4 Sep 2013 02:07:38 +0000 (02:07 +0000)] 
Conditionally exclude code from analyze.c that is not used by STAT3.

FossilOrigin-Name: a48948a170056dfb87541dd5eb2773094dec6f8a

11 years agoHarden the STAT4 logic in where.c against OOM faults.
drh [Tue, 3 Sep 2013 19:26:22 +0000 (19:26 +0000)] 
Harden the STAT4 logic in where.c against OOM faults.

FossilOrigin-Name: 91d2cfbc95c34c0040deb69106bb9f895abb94c0

11 years agoFix another problem in stat4 sample selection.
dan [Tue, 3 Sep 2013 14:43:12 +0000 (14:43 +0000)] 
Fix another problem in stat4 sample selection.

FossilOrigin-Name: d59f580904e6e7e90fc0a692a3dd4eeff5942479

11 years agoMake sure the omit-noop-left-join optimization is not applied if columns
drh [Tue, 3 Sep 2013 14:03:47 +0000 (14:03 +0000)] 
Make sure the omit-noop-left-join optimization is not applied if columns
of the LEFT JOIN are used in the ORDER BY clause.
Ticket [be84e357c035]

FossilOrigin-Name: 0303d6bc7112e6f810ae1bd75cafc5ffc51f5212

11 years agoSimplify branch coverage testing by interchanging the order of two tests
drh [Mon, 2 Sep 2013 20:22:18 +0000 (20:22 +0000)] 
Simplify branch coverage testing by interchanging the order of two tests
in the whereLoopInsert() function.

FossilOrigin-Name: f7079b5365dd6cd8324a4fb23605e81476122ed6

11 years agoFurther stat4 related tests.
dan [Mon, 2 Sep 2013 18:58:11 +0000 (18:58 +0000)] 
Further stat4 related tests.

FossilOrigin-Name: 0a702c4b4c35fdbcb62e3ab88b9e57d7ea0052a8

11 years agoAdd tests to check if ANALYZE is choosing common non-periodic samples for the stat4...
dan [Mon, 2 Sep 2013 11:52:11 +0000 (11:52 +0000)] 
Add tests to check if ANALYZE is choosing common non-periodic samples for the stat4 table.

FossilOrigin-Name: 175842997af134138784bff6f8e93573deb5b36b

11 years agoFix a problem with using stat4 data to estimate the number of rows scanned by a range...
dan [Mon, 2 Sep 2013 07:16:40 +0000 (07:16 +0000)] 
Fix a problem with using stat4 data to estimate the number of rows scanned by a range constraint on the second or subsequent column of any index where an affinity transformation must be applied to the constraint argument.

FossilOrigin-Name: c21f58d84859e479a6cc619671a0df48b2f9692e

11 years agoCleanup of the windows VFS, including added support for Cygwin, fixes
drh [Sat, 31 Aug 2013 18:36:14 +0000 (18:36 +0000)] 
Cleanup of the windows VFS, including added support for Cygwin, fixes
for compiler warnings under unusual configurations, and improved diagnostic
error messages.

FossilOrigin-Name: c94933f13208f3f7d6d1b117ce6d2821100655a4

11 years agoRevise the amalgamation tool to allow 'duplicate' include files to be retained manual... cygwinTempPath
mistachkin [Sat, 31 Aug 2013 18:06:52 +0000 (18:06 +0000)] 
Revise the amalgamation tool to allow 'duplicate' include files to be retained manually while still preserving the existing line numbers.

FossilOrigin-Name: aa48284637b954d63bcf77e19b25e75c7ad1a6d3

11 years agoFix a problem causing SQLite not to use stat4 or stat3 data to analyze constraints...
dan [Sat, 31 Aug 2013 17:21:26 +0000 (17:21 +0000)] 
Fix a problem causing SQLite not to use stat4 or stat3 data to analyze constraints of the form "column = expr COLLATE collation" (those with an explicit COLLATE on the non-column side of the comparison operator).

FossilOrigin-Name: 1e86d81d46c9da6aaee0c6938ee40933f35e3d0d

11 years agoEnhancements to the Win32 API definition macros.
mistachkin [Sat, 31 Aug 2013 17:01:56 +0000 (17:01 +0000)] 
Enhancements to the Win32 API definition macros.

FossilOrigin-Name: b1811baab6e35ecb1ba920a7ed3302997758d309

11 years agoReenable a test accidentally disabled when the stat4 branch was merged.
dan [Sat, 31 Aug 2013 14:56:30 +0000 (14:56 +0000)] 
Reenable a test accidentally disabled when the stat4 branch was merged.

FossilOrigin-Name: d9fadc8fa6ef02d516678d57896d93e0a5f52cfe

11 years agoAvoid commenting out #include statements when building the amalgamation source code...
mistachkin [Sat, 31 Aug 2013 05:46:42 +0000 (05:46 +0000)] 
Avoid commenting out #include statements when building the amalgamation source code file.

FossilOrigin-Name: 2fca6d784b000fd3a4d6890e38a0b087767f3a7f

11 years agoFix harmless MSVC compiler warning with MEMDEBUG defined.
mistachkin [Sat, 31 Aug 2013 05:13:22 +0000 (05:13 +0000)] 
Fix harmless MSVC compiler warning with MEMDEBUG defined.

FossilOrigin-Name: b48cfd2dfca70091a52deeeee16619237e1c270b

11 years agoImprove the consistency of the diagnostic messages on Windows.
mistachkin [Sat, 31 Aug 2013 02:48:56 +0000 (02:48 +0000)] 
Improve the consistency of the diagnostic messages on Windows.

FossilOrigin-Name: c6f174a0cb27fe79740fffc7ce51081ec52a5dbd

11 years agoAdd support for Cygwin when handling temporary file names. Improve error codes and...
mistachkin [Fri, 30 Aug 2013 21:52:38 +0000 (21:52 +0000)] 
Add support for Cygwin when handling temporary file names.  Improve error codes and diagnostic messages for temporary file name handling on Windows.  Rename winConvertUtf8Filename to winConvertFromUtf8Filename.  Improve placement and comments for forward function declarations.

FossilOrigin-Name: a411df725153119acb3bcf44fb71deecaa307887

11 years agoFix compiler warnings in analyze.c.
dan [Fri, 30 Aug 2013 20:19:52 +0000 (20:19 +0000)] 
Fix compiler warnings in analyze.c.

FossilOrigin-Name: 5bbd2ccb3d2d6286fd667dac2ab658d6b89640a6

11 years agoFix comment typo in analyze.c. No changes to code.
mistachkin [Fri, 30 Aug 2013 19:59:48 +0000 (19:59 +0000)] 
Fix comment typo in analyze.c. No changes to code.

FossilOrigin-Name: dbc31750440226702fbf88f1bf6140ef403c9be1