Commit Graph

11356 Commits

Author SHA1 Message Date
drh 8ab88326cb Restore the hexrekey pragma which was accidently deleted during the
pragma refactoring.  Make sure the hexkey and hexrekey pragmas do not
overflow buffers with a over-length key.

FossilOrigin-Name: 0aca31e1514b3df254c049b4251bcb199831681a
2013-10-07 00:36:01 +00:00
drh 793eb043ce Remove an incorrect debugging assert() that was accidently added during the
STAT4 enhancement.

FossilOrigin-Name: 2bb7f74bbd467b74581699d16b06758f9c9457dc
2013-10-06 22:52:51 +00:00
dan 5988572876 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
2013-10-04 18:17:18 +00:00
drh 5f33f37580 Make sure the count(*) optimization works correctly even when partial
indices are present.  Ticket [a5c8ed66cae].

FossilOrigin-Name: 9f2f4c0a50808910ad01c8c4352367f25747be08
2013-10-04 00:00:12 +00:00
dan 5db2605a80 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
2013-10-03 20:41:18 +00:00
dan de07791a9c Merge latest trunk changes.
FossilOrigin-Name: 24aa20da222a9cc181473bc41d0f8791be91fa97
2013-10-03 20:28:22 +00:00
dan 9211f8a6ce 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
2013-10-03 19:27:14 +00:00
drh d100f6912d The sqlite3FixInit() routine cannot fail. So change the return type from "int"
to "void".

FossilOrigin-Name: 500c5932fe3f5fcd0940522f7839d581c555e0eb
2013-10-03 15:39:44 +00:00
drh f63936e805 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
2013-10-03 14:08:07 +00:00
dan 46539d7cfa 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
2013-10-03 12:29:38 +00:00
drh 582d47d27a Remove unnecessary memset() calls from test code.
FossilOrigin-Name: eec3187bc68ddebdbc2113f77c7f5cd32e9be61f
2013-10-03 11:27:56 +00:00
drh 01f75f2d68 In the lemon parser generator, change all hashes to unsigned to avoid
potential problems with signed integer overflow.

FossilOrigin-Name: 8d399a03de63c15908d63ed69140ee15c6275b8d
2013-10-02 20:46:30 +00:00
dan eb26672d0e Add a test to check that the new multi-token phrase optimization is actually helping.
FossilOrigin-Name: bc3a2ed5fb2402805928b0002457eebf06f87c47
2013-10-02 08:04:27 +00:00
drh e75fb06146 Bring some file format comments in btreeInt.h up to date.
FossilOrigin-Name: 012d54d0d2b40888d08915082592ba75d70891c1
2013-10-01 20:29:30 +00:00
dan 1073e26435 Merge trunk changes with this branch.
FossilOrigin-Name: 65d9c6fafbc19d3582e07c31fd915a70e7fcfa8e
2013-10-01 20:10:26 +00:00
dan ff574f4c76 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
2013-10-01 20:02:32 +00:00
drh be007dc61e Fix comments in the fast_vacuum.c demonstration program.
FossilOrigin-Name: e0db7b38e1bc0edb1c3995cb23c46488aa6a0909
2013-10-01 19:36:15 +00:00
drh ba7df1188a Add the "fast_vacuum.c" demonstration program to the tool/ subdirectgory.
FossilOrigin-Name: 2b60320d57a4638ebf97a2854527649c671d108e
2013-10-01 19:02:56 +00:00
drh 4384e98e6e 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
2013-10-01 15:30:05 +00:00
drh 24b7fe9004 Fix a minor typo in a comment in where.c.
FossilOrigin-Name: 9c9fa151e9a3bdab0264c08b66cbcc89d61bfca5
2013-09-30 19:33:06 +00:00
drh 3b6cb3ceb9 Add some timing tests to the amatch test script.
FossilOrigin-Name: ad71c72be56786d8dcf6917efd10a8d3c2d50419
2013-09-30 19:05:03 +00:00
dan 73632e37c9 Merge trunk changes with this branch.
FossilOrigin-Name: e294a9c7c525d1da698259c2fef089579bfd1c0b
2013-09-30 18:16:07 +00:00
dan 1f03e609ff Fix a performance problem in the FTS4 auxiliary functions triggered by an OR clause in the full-text query.
FossilOrigin-Name: fa0f2f0e3e79ae653118b901e1cca7725dfaf249
2013-09-30 18:14:45 +00:00
drh 92054fefcd Fix memory leaks in the amatch extension. Add a few simple test cases.
FossilOrigin-Name: 604134732e309a738e21bcb4240b9ff285d2bfe4
2013-09-30 17:37:15 +00:00
dan 19384380f3 Have fts4 full-text queries consider "docid<?" and similar constraints.
FossilOrigin-Name: 6622424a3a149edd35ba2ba0881aa41b4536417b
2013-09-30 11:42:19 +00:00
drh 8b8d28dd5a Update and modernize an obsolete comment associated with VACUUM. No
changes to code.

FossilOrigin-Name: 94c914e3fa632f88a0d0c14537f81aa46759e2be
2013-09-30 11:01:28 +00:00
mistachkin 915fe4d7e0 Fix typo in comment. No changes to code.
FossilOrigin-Name: 0b7bd46825b09c9e46290baee3e239344ca5bf0e
2013-09-29 04:56:43 +00:00
dan 07490d2b8a Add new test file fts3defer3.test.
FossilOrigin-Name: a6cd14effef0a4e5520eea871523e6e7a7d30aef
2013-09-28 16:43:49 +00:00
drh f42747246a In the nextchar.c extension, allow the second argument to the next_char()
function to be a subquery.

FossilOrigin-Name: 59b9fa223681a7329533b350be7bf5a0a3609255
2013-09-28 13:28:40 +00:00
drh 2f312ee65f 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
2013-09-28 12:40:55 +00:00
dan 5d1dcff095 Obtain the required shared-cache write-lock when executing "DELETE FROM tbl" statements. Fix for [1e1321ee98].
FossilOrigin-Name: 1f8f4fdf3ff2b8de27e167a44a19b0f479f5ee1a
2013-09-26 15:21:16 +00:00
dan 56c517aa5f Fix a faulty assert() in sqlite3BtreeBeginTrans() that may fail in shared-cache mode.
FossilOrigin-Name: 1e1321ee985370c2b7e5bd64286bb4d7704b5a30
2013-09-26 11:04:33 +00:00
dan 6284d02160 Test that the unicode61 tokenchars= and separators= options work with the fts3tokenize virtual table.
FossilOrigin-Name: ed24051462c09220ebfb82a347b4a2b5c820ef63
2013-09-18 11:16:32 +00:00
drh 7fa2092571 Clear the current time value on prepared statements when the prepared statement
is reset.

FossilOrigin-Name: cebd6fc551d26aea0f28cd7d25338fe0b72aae88
2013-09-17 23:36:33 +00:00
mistachkin dcf31a14bf Readability improvements to the Win32 RC file.
FossilOrigin-Name: e64590625774228b5602a66cfb087cf74e2b438b
2013-09-16 20:46:34 +00:00
mistachkin e62d373031 Minor consistency fixes to the Win32 RC file.
FossilOrigin-Name: 619c5211b91aef98794e2e0a6f03832619fc83c0
2013-09-16 19:27:36 +00:00
drh 95a7b3e36d 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
2013-09-16 12:57:19 +00:00
mistachkin b8af6a285c Fix Windows SDK compiler warning.
FossilOrigin-Name: d5fc3f1dabc7227230dcabdd808357f63432357b
2013-09-13 23:27:39 +00:00
mistachkin 9ac99313b5 Fix test issues for Windows portability.
FossilOrigin-Name: 650b32825a85baff11b8e568649fd797066c8ab1
2013-09-13 23:26:47 +00:00
mistachkin 02e8689233 VSIX tooling changes to support Visual Studio 2013.
FossilOrigin-Name: d56fac40313e7d2e77dac3e2bc47cbbb3d10c656
2013-09-13 22:38:54 +00:00
drh 77ff23f9c7 Fix the "const" qualifiers on the pragma name table.
FossilOrigin-Name: b74e6be818fa7d19f1af6d86ad1d2ecba334b01b
2013-09-13 21:03:45 +00:00
drh 55e85ca5f5 Add the soft_heap_limit pragma.
FossilOrigin-Name: c326356f9a18bff5cf36bd59331e2cc207e349fa
2013-09-13 21:01:56 +00:00
drh d49c358e39 Tweak the new PRAGMA name parser to achieve full branch test coverage.
FossilOrigin-Name: c82e05c4b8e000684d95ac8417afaef5e4d633e6
2013-09-13 19:00:06 +00:00
drh aecd80215c 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
2013-09-13 18:15:15 +00:00
drh a496fa7c02 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
2013-09-13 17:47:57 +00:00
drh 6bb64f6a31 Enhance the pragma lookup table generator script to output a comment that
gives the number of pragmas.

FossilOrigin-Name: ca05205050752b5d5f583421b7813fba62f5085c
2013-09-13 16:56:17 +00:00
drh 9ccd8659ff 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
2013-09-13 16:36:46 +00:00
dan f1d2670d40 Add tests for the fts4 unicode61 tokenchars and separators options.
FossilOrigin-Name: 9ce6f40dfb54b35cecba3cc9c1ec0d111f6e9f11
2013-09-13 12:10:09 +00:00
drh ebb6a65d16 Refactor the ExprSetIrreducible() macro into ExprSetVVAProperty(*,EP_NoReduce).
This is a naming change only.  The logic is the same.

FossilOrigin-Name: 695aee46e9bdf15159ab52db7f522b30c91aed0f
2013-09-12 23:42:22 +00:00
drh 6e1b167454 Fix typo in a macro name: "GlogUpperToLower" should be "GlobUpperToLower"
FossilOrigin-Name: 73634ca463f46027bfa8ea23f18abaa530460e24
2013-09-12 23:12:08 +00:00