]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
11 years agoMerge all recent changes from trunk.
drh [Wed, 6 Aug 2014 02:03:35 +0000 (02:03 +0000)] 
Merge all recent changes from trunk.

FossilOrigin-Name: a353a8515fb2eff86042d0c33e39772f4d04e0b3

11 years agoMerge the latest 3.8.6 beta changes from trunk.
drh [Wed, 6 Aug 2014 01:25:47 +0000 (01:25 +0000)] 
Merge the latest 3.8.6 beta changes from trunk.

FossilOrigin-Name: 68a6d5e2f43702c78057ae2f2a7345c981d24e17

11 years agoFix typos in the opcode documentation. Comment changes only. No changes
drh [Wed, 6 Aug 2014 01:08:07 +0000 (01:08 +0000)] 
Fix typos in the opcode documentation.  Comment changes only.  No changes
to code.

FossilOrigin-Name: 717245d48714c08156c9b7636aaa6c3a402bad66

11 years agoA simpler fix for ticket [3a88d85f36704eebe1] - one that uses less code.
drh [Wed, 6 Aug 2014 00:29:06 +0000 (00:29 +0000)] 
A simpler fix for ticket [3a88d85f36704eebe1] - one that uses less code.
The error message is not quite as good, but as this error has apparently
not previously occurred in over 8 years of heavy use, that is not seen as
a serious problem.

FossilOrigin-Name: 0ad1ed8ef0b5fb5d8db44479373b2b93d8fcfd66

11 years agoEnsure that aggregate functions are not used when evaluating a default
drh [Tue, 5 Aug 2014 21:31:08 +0000 (21:31 +0000)] 
Ensure that aggregate functions are not used when evaluating a default
value for a table column.
Candidate fix for ticket [3a88d85f36704eebe134f7].

FossilOrigin-Name: 29ba812825bf06ef230f2480bba0579653f0a52d

11 years agoUse doclist indexes for AND queries as well as phrases.
dan [Tue, 5 Aug 2014 19:35:20 +0000 (19:35 +0000)] 
Use doclist indexes for AND queries as well as phrases.

FossilOrigin-Name: 5d38e6edc40ef188fbf96505073797036aa6783a

11 years agoAdd the ability to evaluate IN operators as a sequence of comparisons as
drh [Tue, 5 Aug 2014 19:16:22 +0000 (19:16 +0000)] 
Add the ability to evaluate IN operators as a sequence of comparisons as
an alternative to the long-standing algorithm of building a lookup table.
Use the new implementation in circumstances where it is likely to be faster,
such as when the RHS of the IN changes between successive evaluations.

FossilOrigin-Name: 952868216854e8355edf57af62bd1a6bcb70ce61

11 years agoUse doclist-indexes with "ORDER BY rowid ASC" fts5 queries as well.
dan [Tue, 5 Aug 2014 19:00:22 +0000 (19:00 +0000)] 
Use doclist-indexes with "ORDER BY rowid ASC" fts5 queries as well.

FossilOrigin-Name: d028ba6589f3122b635474c2683c0f93d5bc6c7c

11 years agoRename the internal Schema.flags field to Schema.schemaFlags.
drh [Tue, 5 Aug 2014 11:04:21 +0000 (11:04 +0000)] 
Rename the internal Schema.flags field to Schema.schemaFlags.

FossilOrigin-Name: 5ae80b3c8f032528359c8c762505ce24da8db96f

11 years agoImproved VdbeCoverage() macros. A few minor simplifications to generated IN-operator-improvements
drh [Tue, 5 Aug 2014 00:53:51 +0000 (00:53 +0000)] 
Improved VdbeCoverage() macros.  A few minor simplifications to generated
VDBE code.

FossilOrigin-Name: 01f60027ad1841051fa493a646141445f8971357

11 years agoPart of the change in the previous check-in was incorrect and can result
drh [Mon, 4 Aug 2014 21:26:58 +0000 (21:26 +0000)] 
Part of the change in the previous check-in was incorrect and can result
in an incorrect UPDATE for WITHOUT ROWID tables.  This check-in fixes the
problem.

FossilOrigin-Name: ee5f6eae57a656d09a4b3f7fbef664b2c696ddb4

11 years agoFix fts5_index.c to use doclist-indexes when possible. Only some cases work so far.
dan [Mon, 4 Aug 2014 20:07:40 +0000 (20:07 +0000)] 
Fix fts5_index.c to use doclist-indexes when possible. Only some cases work so far.

FossilOrigin-Name: 90b82d3ef613b2915e0e280dc1d2e5a2b617d59c

11 years agoFurther enhancements to IN-operator processing.
drh [Mon, 4 Aug 2014 18:50:54 +0000 (18:50 +0000)] 
Further enhancements to IN-operator processing.

FossilOrigin-Name: 7fdf26da1d2f40b80f9e44ff6f5af22ace8f95f3

11 years agoRefinements to the enhanced IN-operator logic.
drh [Mon, 4 Aug 2014 16:39:39 +0000 (16:39 +0000)] 
Refinements to the enhanced IN-operator logic.

FossilOrigin-Name: 92ba2821468ecbfac2469161d81c873de67b2243

11 years agoEnhancements to the code generator for the IN operator that result in much
drh [Sat, 2 Aug 2014 21:03:33 +0000 (21:03 +0000)] 
Enhancements to the code generator for the IN operator that result in much
faster queries in some cases, for example when the RHS of the IN operator
changes for each row of a large table scan.

FossilOrigin-Name: 436e884215e2b33ca3fbb555362237b12827c07a

11 years agoStart changing things to use doclist indexes as required. code is not activated yet.
dan [Sat, 2 Aug 2014 20:49:36 +0000 (20:49 +0000)] 
Start changing things to use doclist indexes as required. code is not activated yet.

FossilOrigin-Name: b8864da95db2c0e611116304d607e35a86c9247d

11 years agoRemove (newly) incorrect preprocessor check to fix build on WinRT.
mistachkin [Sat, 2 Aug 2014 20:44:13 +0000 (20:44 +0000)] 
Remove (newly) incorrect preprocessor check to fix build on WinRT.

FossilOrigin-Name: ba7826542908eac2e14789d183d0b3e35b143fed

11 years agoA better comment on the generated code for the NULL-in-RHS-of-IN detection
drh [Fri, 1 Aug 2014 21:12:35 +0000 (21:12 +0000)] 
A better comment on the generated code for the NULL-in-RHS-of-IN detection
logic.

FossilOrigin-Name: 9bc1c730a366e75b760b58e7a343d39165b2a469

11 years agoImproved detection and handling of NULL values on the RHS of a IN operator.
drh [Fri, 1 Aug 2014 21:00:53 +0000 (21:00 +0000)] 
Improved detection and handling of NULL values on the RHS of a IN operator.

FossilOrigin-Name: 468e730036edac22cfeb9ea3515aa16e6bcd6650

11 years agoAdd a special case to the integrity-check code to check that the final integer in...
dan [Fri, 1 Aug 2014 20:13:49 +0000 (20:13 +0000)] 
Add a special case to the integrity-check code to check that the final integer in a doclist index is as expected.

FossilOrigin-Name: c98934155cb48adfda57bd0fd1b950226d45f67a

11 years agoHave the fts5 integrity-check verify that doclist indexes match the contents of the...
dan [Fri, 1 Aug 2014 19:27:07 +0000 (19:27 +0000)] 
Have the fts5 integrity-check verify that doclist indexes match the contents of the leaf pages that they index.

FossilOrigin-Name: 37a7d3035eb4bbad7e32fe550321ac9fae611a57

11 years agoRemove an unnecessary OP_Null in the IN-operator logic. Attempt to clarify
drh [Fri, 1 Aug 2014 18:00:24 +0000 (18:00 +0000)] 
Remove an unnecessary OP_Null in the IN-operator logic.  Attempt to clarify
comments explaining the IN-operator code, though it is not clear that the
comments are correct even yet - more work to be done.

FossilOrigin-Name: c11e55fabbc718cb324ecd3540453c25db98f50c

11 years agoClean up the IN operator code generation logic to make it easier to reason
drh [Fri, 1 Aug 2014 15:51:36 +0000 (15:51 +0000)] 
Clean up the IN operator code generation logic to make it easier to reason
about.  In the process, improve code generation to omit some unused OP_Null
operations.

FossilOrigin-Name: 7c6fbcfe6ed5739e8e4639b7b123fbf9828cbfc0

11 years agoThe idea of coding IN operator with a short list on the RHS as an OR expression
drh [Fri, 1 Aug 2014 15:34:36 +0000 (15:34 +0000)] 
The idea of coding IN operator with a short list on the RHS as an OR expression
turns out to be helpful.  If the list is of length 1 or 2, the OR expression
is very slightly faster, but the ephemeral table approach is clearly better for
all list lengths greater than 2.  Better to keep the code simple.

FossilOrigin-Name: e13175d3579e1045165bab091b3b28951d691704

11 years agoBegin making changes to the IN operator in an attempt to make it run faster
drh [Fri, 1 Aug 2014 14:46:57 +0000 (14:46 +0000)] 
Begin making changes to the IN operator in an attempt to make it run faster
and to make the code easier to understand.

FossilOrigin-Name: ee0fd6aaf94cda1dce3fe752bfe3b0f83e0043f1

11 years agoAdd "doclist index" records to the database. These are to make navigating within...
dan [Fri, 1 Aug 2014 11:16:25 +0000 (11:16 +0000)] 
Add "doclist index" records to the database. These are to make navigating within very large doclists faster. They are not yet used by queries.

FossilOrigin-Name: 89377421ff69f2450364987afe781b6d8bcbf087

11 years agoEnhance the PRAGMA integrity_check command to detect UNIQUE and NOT NULL
drh [Fri, 1 Aug 2014 01:40:33 +0000 (01:40 +0000)] 
Enhance the PRAGMA integrity_check command to detect UNIQUE and NOT NULL
constraint violations.

FossilOrigin-Name: 9abcf2698c09f4f6a44a68e74f9f6b538f3253d6

11 years agoRefactoring: Change "pIndex->onError!=OE_None" to use a macro:
drh [Thu, 31 Jul 2014 22:59:04 +0000 (22:59 +0000)] 
Refactoring:  Change "pIndex->onError!=OE_None" to use a macro:
"IsUniqueIndex(pIndex)".  Easier to understand that way.

FossilOrigin-Name: e75b26ee357bb3d3c1a539b05d633ebf314726d7

11 years agoOmit a pointless OP_Null when processing a value-list RHS of an IN operator
drh [Thu, 31 Jul 2014 20:16:08 +0000 (20:16 +0000)] 
Omit a pointless OP_Null when processing a value-list RHS of an IN operator
where the LHS is a rowid.

FossilOrigin-Name: 1361450a9dfe9476e8df98f370a3695752252245

11 years agoOptimizations to the OS sub-type checking in the Win32 VFS.
mistachkin [Thu, 31 Jul 2014 18:54:01 +0000 (18:54 +0000)] 
Optimizations to the OS sub-type checking in the Win32 VFS.

FossilOrigin-Name: 1e5489faff093d6a8e538061e45532f9050e9459

11 years agoAdd a missing call to "test_sqlite3_log" to multiplex.test.
dan [Thu, 31 Jul 2014 18:14:37 +0000 (18:14 +0000)] 
Add a missing call to "test_sqlite3_log" to multiplex.test.

FossilOrigin-Name: 0708f9df23a325349f658741358c5994b5c4c873

11 years agoAdd a comment explaining why fts5 cannot cache "sorter statements".
dan [Thu, 31 Jul 2014 17:53:03 +0000 (17:53 +0000)] 
Add a comment explaining why fts5 cannot cache "sorter statements".

FossilOrigin-Name: e6af3b7a3cf331210f4c87848e2af007dbd5ef30

11 years agoFix a leaked statement handle in pager2.test.
dan [Thu, 31 Jul 2014 17:35:40 +0000 (17:35 +0000)] 
Fix a leaked statement handle in pager2.test.

FossilOrigin-Name: 47457b0488abcbec2137abf706c1d677563b9ea5

11 years agoDeactivate the DISTINCT in a SELECT on the right-hand side of an IN operator,
drh [Thu, 31 Jul 2014 15:44:44 +0000 (15:44 +0000)] 
Deactivate the DISTINCT in a SELECT on the right-hand side of an IN operator,
since it should not make any difference in the output but dues consume extra
memory and CPU time.

FossilOrigin-Name: f4cb53651b1e352fae7378878b830a902bcd9248

11 years agoAdd further tests for the extension APIs with "ORDER BY rank" queries.
dan [Thu, 31 Jul 2014 11:57:59 +0000 (11:57 +0000)] 
Add further tests for the extension APIs with "ORDER BY rank" queries.

FossilOrigin-Name: 37a417d27e4ebafd4783f62728d7467316b75b17

11 years agoRe-integrate the recent changes from the 'winMutex' branch back into the Win32 mutex...
mistachkin [Wed, 30 Jul 2014 23:11:16 +0000 (23:11 +0000)] 
Re-integrate the recent changes from the 'winMutex' branch back into the Win32 mutex subsystem.

FossilOrigin-Name: 5360ecb0b8891d0c27f3f02d81b6c7b548361a10

11 years agoAdd three new static mutexes for use by the application. This is a partial
drh [Wed, 30 Jul 2014 21:10:12 +0000 (21:10 +0000)] 
Add three new static mutexes for use by the application.  This is a partial
import of changes from the threads branch.

FossilOrigin-Name: 3aad01960f92c5e77dba64ac1a6c6b063378fb97

11 years agoFix things so that the fts5 extension API works with "ORDER BY rank" queries.
dan [Wed, 30 Jul 2014 20:26:24 +0000 (20:26 +0000)] 
Fix things so that the fts5 extension API works with "ORDER BY rank" queries.

FossilOrigin-Name: f1b4e1a98d49ecaba962beba16f8224175e4ba59

11 years agoAdd hidden column "rank". Currently this always returns the same value as the bm25...
dan [Wed, 30 Jul 2014 19:41:58 +0000 (19:41 +0000)] 
Add hidden column "rank". Currently this always returns the same value as the bm25() function.

FossilOrigin-Name: 4cc048c3651e830a6aeded924c7f3a60b634e133

11 years agoAdd a new sqlite3FaultSim() call to vdbePmaReaderSeek() to facilitate
drh [Wed, 30 Jul 2014 18:47:12 +0000 (18:47 +0000)] 
Add a new sqlite3FaultSim() call to vdbePmaReaderSeek() to facilitate
tests of error handling in the sorter.

FossilOrigin-Name: 655d8cfc752b3f5f63521a57f2155f8e14aaf7c4

11 years agoMark some invariants in the vdbesort.c logic when SQLITE_MAX_WORKER_THREADS==0.
drh [Wed, 30 Jul 2014 17:21:37 +0000 (17:21 +0000)] 
Mark some invariants in the vdbesort.c logic when SQLITE_MAX_WORKER_THREADS==0.

FossilOrigin-Name: 721cd965859c9ccc24d2a1d2851c914229e584b3

11 years agoAdd the "eForce" parameter to the sqlite3_multiplex_shutdown() entry point
drh [Wed, 30 Jul 2014 15:43:05 +0000 (15:43 +0000)] 
Add the "eForce" parameter to the sqlite3_multiplex_shutdown() entry point
in test_multiplex.c.  Shutdown is forced if true.  Shutdown is not done if
there are pending database connections and eForce is false, but an error log
entry is made instead.

FossilOrigin-Name: c7303d0139f7e7f4fa7060b52942e6c6c6d4b622

11 years agoMerge recent trunk changes, and especially the fix for the CREATE UNIQUE INDEX
drh [Wed, 30 Jul 2014 14:44:24 +0000 (14:44 +0000)] 
Merge recent trunk changes, and especially the fix for the CREATE UNIQUE INDEX
problem of ticket [9a6daf340df99ba9].

FossilOrigin-Name: 5b50a8380b2b678c1646ff303e3696efc1d7d92c

11 years agoMerge the fix for the CREATE UNIQUE INDEX problem into the sessions branch.
drh [Wed, 30 Jul 2014 14:29:54 +0000 (14:29 +0000)] 
Merge the fix for the CREATE UNIQUE INDEX problem into the sessions branch.

FossilOrigin-Name: 43401ee624587ffa166c3cda7e5265ad0d81da5c

11 years agoEnsure that the correct number of columns in a UNIQUE index are checked for
drh [Wed, 30 Jul 2014 13:56:48 +0000 (13:56 +0000)] 
Ensure that the correct number of columns in a UNIQUE index are checked for
uniqueness, regardless of whether or not the original table has a ROWID or
if the columns are NOT NULL, etc.  Ticket [9a6daf340df99ba93c].

FossilOrigin-Name: 6b785e92f279cb65746834d5cd25594fd3333342

11 years agoDisable an assert that is sometimes generated spuriously.
mistachkin [Tue, 29 Jul 2014 21:44:13 +0000 (21:44 +0000)] 
Disable an assert that is sometimes generated spuriously.

FossilOrigin-Name: bd9ee0ea69181526cfc3cadac33a5ec5190112b0

11 years agoEnhancements and updates to the Win32 mutex subsystem.
mistachkin [Tue, 29 Jul 2014 19:54:03 +0000 (19:54 +0000)] 
Enhancements and updates to the Win32 mutex subsystem.

FossilOrigin-Name: ca9868cdae19045dc522490b34dee0f14d928ebe

11 years agoUpdate return value checking to conform to the beginthreadex() specs.
mistachkin [Tue, 29 Jul 2014 19:00:43 +0000 (19:00 +0000)] 
Update return value checking to conform to the beginthreadex() specs.

FossilOrigin-Name: 3144a16f91364b455e54e6030714e1c12ab0bdb7

11 years agoAdd a couple more assert statements.
mistachkin [Tue, 29 Jul 2014 18:53:01 +0000 (18:53 +0000)] 
Add a couple more assert statements.

FossilOrigin-Name: 4e816db235025c7998c649fddabfd807290a08b9

11 years agoFix unreachable branches in the threads.c module.
drh [Tue, 29 Jul 2014 18:46:30 +0000 (18:46 +0000)] 
Fix unreachable branches in the threads.c module.

FossilOrigin-Name: 3175e366bbf7579ec9ab27214b0a4e5cd27ea204

11 years agoMerge updates from trunk. winMutex
mistachkin [Tue, 29 Jul 2014 18:03:36 +0000 (18:03 +0000)] 
Merge updates from trunk.

FossilOrigin-Name: 08c9a4ea6353900095a471365a8611a443f5f399

11 years agoFix a harmless compiler warning.
drh [Tue, 29 Jul 2014 17:22:12 +0000 (17:22 +0000)] 
Fix a harmless compiler warning.

FossilOrigin-Name: 216d21d0e62b3c0ad49f3cb395c845bf4f17ac61

11 years agoMake the Win32 thread handles are available after the threads exit.
mistachkin [Tue, 29 Jul 2014 16:37:53 +0000 (16:37 +0000)] 
Make the Win32 thread handles are available after the threads exit.

FossilOrigin-Name: 565c5af7a75ad5c759ce1a61dab3a61c42819644

11 years agoFix the threads build on Windows when SQLITE_MAX_WORKER_THREADS is greater
drh [Tue, 29 Jul 2014 15:18:00 +0000 (15:18 +0000)] 
Fix the threads build on Windows when SQLITE_MAX_WORKER_THREADS is greater
than 0.

FossilOrigin-Name: f37db3a03d95b508066745613029b7dd1240b31c

11 years agoMerge the R-Tree fix and the new SQLITE_TESTCTRL_ISINIT test control from
drh [Tue, 29 Jul 2014 14:16:42 +0000 (14:16 +0000)] 
Merge the R-Tree fix and the new SQLITE_TESTCTRL_ISINIT test control from
trunk.

FossilOrigin-Name: b2f7eb3cc27ecf9a6a88907991148bca1a7d54b3

11 years agoAdd the SQLITE_TESTCTRL_ISINIT file control.
drh [Tue, 29 Jul 2014 14:09:21 +0000 (14:09 +0000)] 
Add the SQLITE_TESTCTRL_ISINIT file control.

FossilOrigin-Name: 8b651d4d6cde7efbc0cc7155948f477477be100e

11 years agoMerge recent trunk changes, and especially the fix for the R-Tree problem
drh [Tue, 29 Jul 2014 12:40:45 +0000 (12:40 +0000)] 
Merge recent trunk changes, and especially the fix for the R-Tree problem
described in ticket [d2889096e7bdeac6].

FossilOrigin-Name: 8f1beeade0ddf802900c9d203a4fd678d1190394

11 years agoHave calls to the xFilter() method of rtree virtual tables ensure that cursor is...
dan [Tue, 29 Jul 2014 11:54:18 +0000 (11:54 +0000)] 
Have calls to the xFilter() method of rtree virtual tables ensure that cursor is initialized before proceeding. Fix for [d2889096e7bdeac].

FossilOrigin-Name: 8cc41b0bf365af47c2061ffe44c86018945dd239

11 years agoEnhancements and updates to the Win32 mutex subsystem.
mistachkin [Tue, 29 Jul 2014 05:49:02 +0000 (05:49 +0000)] 
Enhancements and updates to the Win32 mutex subsystem.

FossilOrigin-Name: 18984c321049a759f6619cfa17fb3f4e7b3e08ea

11 years agoAdd some asserts to the Win32 mutex subsystem.
mistachkin [Tue, 29 Jul 2014 00:42:39 +0000 (00:42 +0000)] 
Add some asserts to the Win32 mutex subsystem.

FossilOrigin-Name: e8f2dc5fadae96252649875c234fcdef1108bd48

11 years agoFix the build on windows.
drh [Tue, 29 Jul 2014 00:23:08 +0000 (00:23 +0000)] 
Fix the build on windows.

FossilOrigin-Name: 2773a5f9879a106a89a3d0bc3c5bfdcb2fe43c7c

11 years agoRemove an unnecessary parameter from vdbeMergeEngineStep(). Rename a couple
drh [Mon, 28 Jul 2014 20:16:41 +0000 (20:16 +0000)] 
Remove an unnecessary parameter from vdbeMergeEngineStep().  Rename a couple
other routines to be more descriptive of what they do.

FossilOrigin-Name: f2407a40f339fa6c2cec194f78ae7c93655b1ec1

11 years agoAdd the "loadfts" program, for performance testing the loading of data into fts3...
dan [Mon, 28 Jul 2014 20:14:02 +0000 (20:14 +0000)] 
Add the "loadfts" program, for performance testing the loading of data into fts3/fts4/fts5 tables.

FossilOrigin-Name: 770b9540c19ad1e3d24adff382332bf032065efd

11 years agoRename vdbeIncrMergerInit() to vdbeMergeEngineInit() - a much more accurate
drh [Mon, 28 Jul 2014 19:58:41 +0000 (19:58 +0000)] 
Rename vdbeIncrMergerInit() to vdbeMergeEngineInit() - a much more accurate
name.

FossilOrigin-Name: 5b084a2dd581141b2d0cd9d1a5975625f65ec34d

11 years agoIn vdbesort.c, rename vdbeSorterDoCompare() to vdbeMergeEngineCompare() and
drh [Mon, 28 Jul 2014 18:57:40 +0000 (18:57 +0000)] 
In vdbesort.c, rename vdbeSorterDoCompare() to vdbeMergeEngineCompare() and
move it closer to the one place where it is called.  Other minor comment
changes.

FossilOrigin-Name: 09d50d9f0fe7df26dadb0a332731683a07a89fde

11 years agoIn vdbesort.c, rename all pointers to sqlite3_file objects "pFd" and use the
drh [Mon, 28 Jul 2014 17:18:28 +0000 (17:18 +0000)] 
In vdbesort.c, rename all pointers to sqlite3_file objects "pFd" and use the
name "pFile" only for pointers to SortFile objects.  Other comment enhancements.

FossilOrigin-Name: 518290a7fc0994f9593c5c3ba5b2610a1b86dae1

11 years agoMerge recent trunk changes into the threads branch.
drh [Mon, 28 Jul 2014 15:01:37 +0000 (15:01 +0000)] 
Merge recent trunk changes into the threads branch.

FossilOrigin-Name: 163c247bd8280ab14fe577329c631c8bd884707f

11 years agoImprovements to comments in the multi-threaded sorter. Also include a
drh [Mon, 28 Jul 2014 14:54:50 +0000 (14:54 +0000)] 
Improvements to comments in the multi-threaded sorter.  Also include a
function name change for clarity.  And add a test to help show that the
MergeEngine object is only used by a single thread.

FossilOrigin-Name: 9af50a878f67c1c2a4f1520160cc989650d7196a

11 years agoRemove an unreachable branch from the sqlite3_value_numeric_type() interface.
drh [Sat, 26 Jul 2014 20:12:56 +0000 (20:12 +0000)] 
Remove an unreachable branch from the sqlite3_value_numeric_type() interface.

FossilOrigin-Name: 5350229b52b18a4961858a30538c5c75e5bd3048

11 years agoAdd tests and fixes for bm25() function.
dan [Sat, 26 Jul 2014 18:38:51 +0000 (18:38 +0000)] 
Add tests and fixes for bm25() function.

FossilOrigin-Name: 71d32f53e81921e43c933cc968cb1c18d83fe1e0

11 years agoAvoid unnecessary no-op calls to applyNumericAffinity() for a small
drh [Sat, 26 Jul 2014 16:47:23 +0000 (16:47 +0000)] 
Avoid unnecessary no-op calls to applyNumericAffinity() for a small
performance improvement.

FossilOrigin-Name: 413d7287977702fa651c0140bd5cf29021fe3e79

11 years agoTry to fix harmless compiler warnings reported by Fortify.
drh [Fri, 25 Jul 2014 21:35:39 +0000 (21:35 +0000)] 
Try to fix harmless compiler warnings reported by Fortify.

FossilOrigin-Name: e0fa6fdc14ac5458f9200cbae124f8025ea534ea

11 years agoAdd extension apis xRowCount, xQueryPhrase, xSetAuxdata and xGetAuxdata. And a rankin...
dan [Fri, 25 Jul 2014 20:30:47 +0000 (20:30 +0000)] 
Add extension apis xRowCount, xQueryPhrase, xSetAuxdata and xGetAuxdata. And a ranking function that uses all of the above.

FossilOrigin-Name: c4d50428ab97f77e6721c4f8d03eaaf3ea91f3eb

11 years agoImproved comments on VDBE opcodes, for better documentation. No code
drh [Fri, 25 Jul 2014 18:37:42 +0000 (18:37 +0000)] 
Improved comments on VDBE opcodes, for better documentation.  No code
or logic changes.

FossilOrigin-Name: 2d32e4876e0b162730f81e5c2658be12d64a9a99

11 years agoAdd constraints (enforced only when SQLITE_DEBUG is enabled) on the use of
drh [Fri, 25 Jul 2014 18:01:06 +0000 (18:01 +0000)] 
Add constraints (enforced only when SQLITE_DEBUG is enabled) on the use of
OP_Next and OP_Prev.

FossilOrigin-Name: 2230c74f1efa591770176c9b40e920724a3c39e1

11 years agoImprove the performance of the ANALYZE command by taking advantage of
drh [Thu, 24 Jul 2014 23:23:26 +0000 (23:23 +0000)] 
Improve the performance of the ANALYZE command by taking advantage of
UNIQUE constraints on indices.

FossilOrigin-Name: 114dcf33670fd98a1ebbac0e44f66b2d8bcccddf

11 years agoCorrect help text and make consistent use of snprintf.
mistachkin [Thu, 24 Jul 2014 22:51:18 +0000 (22:51 +0000)] 
Correct help text and make consistent use of snprintf.

FossilOrigin-Name: 9c424a5c50e4a2ed36556e99fba0e7072a2d3468

11 years agoFix a bug in the whereRangeSkipScanEst() procedure (added by
drh [Thu, 24 Jul 2014 22:41:20 +0000 (22:41 +0000)] 
Fix a bug in the whereRangeSkipScanEst() procedure (added by
check-in [d09ca6d5efad3e4cfa]) where it fails to consider the possibility
of a ROWID column when computing the affinity of a table column.

FossilOrigin-Name: 6aea2258dd7d3967900cefe4cd0af48a7ee7e169

11 years agoUpdate a shell test case.
mistachkin [Thu, 24 Jul 2014 22:33:47 +0000 (22:33 +0000)] 
Update a shell test case.

FossilOrigin-Name: b84008cb964f234b6a6b441f738e344158c4c92a

11 years agoFix typo in comment and update help text.
mistachkin [Thu, 24 Jul 2014 22:20:23 +0000 (22:20 +0000)] 
Fix typo in comment and update help text.

FossilOrigin-Name: 289092bb64463efe78a5f01b06b24aa664a31feb

11 years agoMerge updates from trunk.
mistachkin [Thu, 24 Jul 2014 22:13:12 +0000 (22:13 +0000)] 
Merge updates from trunk.

FossilOrigin-Name: 8dc0cdf652f099d464d3de416dffd83efb895009

11 years agoAvoid trying to allocation zero bytes when analyzing a unique non-null index. faster-analyze
drh [Thu, 24 Jul 2014 20:25:16 +0000 (20:25 +0000)] 
Avoid trying to allocation zero bytes when analyzing a unique non-null index.

FossilOrigin-Name: 85e2badeeb7f7599eb6fd35512f9bd524f0b1b3f

11 years agoAvoid change tests when analyzing single-column unique indexes after
drh [Thu, 24 Jul 2014 19:54:20 +0000 (19:54 +0000)] 
Avoid change tests when analyzing single-column unique indexes after
getting past the initial NULL entries.

FossilOrigin-Name: 4690e99c07024f40fafba1db8e4487b287b788a9

11 years agoMerge all recent trunk changes into the threads branch.
drh [Thu, 24 Jul 2014 16:54:28 +0000 (16:54 +0000)] 
Merge all recent trunk changes into the threads branch.

FossilOrigin-Name: 770685892c8f09b9cddb2fbb2877cfb291e19425

11 years agoMerge recent trunk changes into the sessions branch.
drh [Thu, 24 Jul 2014 16:23:51 +0000 (16:23 +0000)] 
Merge recent trunk changes into the sessions branch.

FossilOrigin-Name: a9db017eabdefafcda87c497e8bafa07002ac0fe

11 years agoAdd the readfile(FILENAME) and writefile(FILENAME,CONTENT) SQL functions to
drh [Thu, 24 Jul 2014 12:39:59 +0000 (12:39 +0000)] 
Add the readfile(FILENAME) and writefile(FILENAME,CONTENT) SQL functions to
the command-line shell.

FossilOrigin-Name: fb1048cb2b613a0dbfe625a5df05e9dcd736a433

11 years agoAdd support for hexadecimal integer literals in the parser.
drh [Thu, 24 Jul 2014 12:19:41 +0000 (12:19 +0000)] 
Add support for hexadecimal integer literals in the parser.

FossilOrigin-Name: f8f79f28785db716b10c3bc9d6652b98253fd125

11 years agoIn the command-line shell, in CSV output mode, terminate rows with CRNL but
drh [Thu, 24 Jul 2014 12:09:47 +0000 (12:09 +0000)] 
In the command-line shell, in CSV output mode, terminate rows with CRNL but
do not expand NL characters in data into CRNL.  Provide the extra -newline
command-line option and the extra argument to .separator to designate an
alternative newline character sequence for CSV output.

FossilOrigin-Name: 16c8ce10e1530731441e6c4538691b71564684ed

11 years agoAdd experimental "costmult" logic. Only enabled when compiled with
drh [Wed, 23 Jul 2014 23:57:42 +0000 (23:57 +0000)] 
Add experimental "costmult" logic.  Only enabled when compiled with
-DSQLITE_ENABLE_COSTMULT.

FossilOrigin-Name: 729ece40885ed7f52c5981364833fc62281a388b

11 years agoUgh. Consecutive UNIQUE index entries are only distinct if the index is
drh [Wed, 23 Jul 2014 19:37:21 +0000 (19:37 +0000)] 
Ugh.  Consecutive UNIQUE index entries are only distinct if the index is
on NOT NULL columns.  So the previous version was not quite right.  This
check-in fixes the problem.

FossilOrigin-Name: 30033f965030a015fad15e532bcaba1314c8cc0f

11 years agoAdd a snippet() function to fts5.
dan [Wed, 23 Jul 2014 19:31:56 +0000 (19:31 +0000)] 
Add a snippet() function to fts5.

FossilOrigin-Name: bdc58fd28a63ac9632c3df6c7768a9a236566605

11 years agoEnhancements to the hex literal tests. hex-literal
mistachkin [Wed, 23 Jul 2014 19:04:25 +0000 (19:04 +0000)] 
Enhancements to the hex literal tests.

FossilOrigin-Name: a3cc027fa7ca41da23ecd0770a075a48416af020

11 years agoImprove the performance of the ANALYZE command by taking advantage of the
drh [Wed, 23 Jul 2014 18:36:55 +0000 (18:36 +0000)] 
Improve the performance of the ANALYZE command by taking advantage of the
fact that every row of a UNIQUE index is distinct.

FossilOrigin-Name: 3e1e79e1335f7ad33cd35f384f2a063c4aa2253b

11 years agoUpdated documentation on sqlite3_temp_directory. No changes to code.
drh [Wed, 23 Jul 2014 15:51:29 +0000 (15:51 +0000)] 
Updated documentation on sqlite3_temp_directory.  No changes to code.

FossilOrigin-Name: e6225a7bf77a700b318563b1a854b4b3a9e031e1

11 years agoRemove a surplus function prototype. #ifdef code that is not used when
drh [Wed, 23 Jul 2014 14:52:05 +0000 (14:52 +0000)] 
Remove a surplus function prototype.  #ifdef code that is not used when
hex integers are omitted at compile time.

FossilOrigin-Name: a5b383e077e4b277a65920f7cc202f32f07aa9ee

11 years agoChange the hex literal processing so that only the SQL parser understands
drh [Wed, 23 Jul 2014 13:40:49 +0000 (13:40 +0000)] 
Change the hex literal processing so that only the SQL parser understands
hex literals.  Casting and coercing string literals into numeric values does
not understand hexadecimal integers.  This preserves backwards compatibility.
Also:  Throw an error on any hex literal that is too big to fit into 64 bits.

FossilOrigin-Name: 6c6f0de59bf96b79c8ace8c9bfe48c7a6a306a50

11 years agoCasting hex literals directly from string to float always results in a
drh [Wed, 23 Jul 2014 02:07:11 +0000 (02:07 +0000)] 
Casting hex literals directly from string to float always results in a
positive number.

FossilOrigin-Name: 4b86ccdf4f4eb4339a5706e10ad24f01b6c3939e

11 years agoReformatting a few test cases for clarity.
drh [Wed, 23 Jul 2014 01:59:47 +0000 (01:59 +0000)] 
Reformatting a few test cases for clarity.

FossilOrigin-Name: 7e1bbacb11a4689b69856450125cae3d045307af

11 years agoTest cases for hex literals.
drh [Wed, 23 Jul 2014 01:56:32 +0000 (01:56 +0000)] 
Test cases for hex literals.

FossilOrigin-Name: 19054339c47448bcdfd1f7be35daa3826c409077

11 years agoAdd support for parsing C-style hexadecimal literals.
drh [Wed, 23 Jul 2014 01:26:51 +0000 (01:26 +0000)] 
Add support for parsing C-style hexadecimal literals.

FossilOrigin-Name: 34a1f38b7a23c64f5c6e5b34c19a20480be53961