]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
8 years agoMake the new file test_delete.c portable to MSVC on Windows. test_delete
mistachkin [Fri, 9 Sep 2016 20:26:27 +0000 (20:26 +0000)] 
Make the new file test_delete.c portable to MSVC on Windows.

FossilOrigin-Name: 0e3ace39f234c204649ec69c6a69fb0e062c58f7

8 years agoAdd new file test_delete.c, containing test code for deleting an sqlite database.
dan [Fri, 9 Sep 2016 20:00:40 +0000 (20:00 +0000)] 
Add new file test_delete.c, containing test code for deleting an sqlite database.

FossilOrigin-Name: fb0b95e9405a3180d13c6318409af361e9df7632

8 years agoFix a out-of-order variable declaration for some compile-time configurations.
drh [Fri, 9 Sep 2016 15:12:41 +0000 (15:12 +0000)] 
Fix a out-of-order variable declaration for some compile-time configurations.

FossilOrigin-Name: 6ac932c92a61cd68cc5b1816216e4748a5c7b3cd

8 years agoIn releasetest.tcl, the --srcdir option is automatic, so no need to mention
drh [Fri, 9 Sep 2016 13:23:36 +0000 (13:23 +0000)] 
In releasetest.tcl, the --srcdir option is automatic, so no need to mention
it in the --help output.

FossilOrigin-Name: 2bdd838e2c434f1d26b1836ef39fa938ef93131d

8 years agoFix an obsolete comment in the releasetest.tcl source code.
drh [Fri, 9 Sep 2016 13:17:26 +0000 (13:17 +0000)] 
Fix an obsolete comment in the releasetest.tcl source code.

FossilOrigin-Name: afaaa276b256f56adf63cb568e486cb3315c3ec2

8 years agoIn releasetest.tcl:
drh [Fri, 9 Sep 2016 12:29:57 +0000 (12:29 +0000)] 
In releasetest.tcl:
Improved testing for uncommitted changes.  If uncommitted changes are seen,
exit immediately unless the --force option is used.

FossilOrigin-Name: 9a14e6c46cdda9f10151ee96a0540798573edcf2

8 years agoIssue a warning and prompt the user to continue if the releasetest.tcl script
drh [Thu, 8 Sep 2016 23:12:08 +0000 (23:12 +0000)] 
Issue a warning and prompt the user to continue if the releasetest.tcl script
is run in a checkout with uncommitted changes.

FossilOrigin-Name: 30e917fff05b02ce2cb1f1c871d638200fbe5716

8 years agoAdd support for row-value comparisons, including IN operators, and
drh [Wed, 7 Sep 2016 19:54:24 +0000 (19:54 +0000)] 
Add support for row-value comparisons, including IN operators, and
row-value updates in the UPDATE statement.

FossilOrigin-Name: ddb5f0558c44569913d22781ab78f3e9b58d7aea

8 years agoFix a problem handling expressions like "(a, b) IN (SELECT ... ORDER BY 1, 2)" when... rowvalue
dan [Wed, 7 Sep 2016 19:37:20 +0000 (19:37 +0000)] 
Fix a problem handling expressions like "(a, b) IN (SELECT ... ORDER BY 1, 2)" when there is an index on "a" but not "b".

FossilOrigin-Name: 7f2c5c9ee3628c968306a5ab2e5a9a761f1b8055

8 years agoAdd the ext/misc/memvfs.c extension that implements a VFS for read-only
drh [Wed, 7 Sep 2016 18:11:11 +0000 (18:11 +0000)] 
Add the ext/misc/memvfs.c extension that implements a VFS for read-only
database files contained in memory.

FossilOrigin-Name: 12b7782a9af91eab913e159149cb28b3f5a6557c

8 years agoSimplify the affinity handling logic in codeAllEqualityTerms(). Logically
drh [Wed, 7 Sep 2016 13:30:40 +0000 (13:30 +0000)] 
Simplify the affinity handling logic in codeAllEqualityTerms().  Logically
the same, just a little easier to read and understand.

FossilOrigin-Name: bbab9621f512b04684163b98b6fc669c68038044

8 years agoMerge fixes from trunk.
drh [Wed, 7 Sep 2016 13:12:13 +0000 (13:12 +0000)] 
Merge fixes from trunk.

FossilOrigin-Name: 193f036c87857bd77577ceb462af5034c7cc77da

8 years agoFix the ".read" command in the command-line shell so that it understands
drh [Wed, 7 Sep 2016 10:10:18 +0000 (10:10 +0000)] 
Fix the ".read" command in the command-line shell so that it understands
that the input is not interactive.

FossilOrigin-Name: d8451fe84d09db6ec7e1bd5f0708ea1b5e85f3d6

8 years agoThe ORDER BY LIMIT optimization is not valid unless the inner-most IN operator
drh [Wed, 7 Sep 2016 01:51:46 +0000 (01:51 +0000)] 
The ORDER BY LIMIT optimization is not valid unless the inner-most IN operator
loop is actually used by the query plan.
Fix for ticket [0c4df46116e90f92].

FossilOrigin-Name: 820644b886f81e991fceb5f1c3290b8959b34528

8 years agoRemove obsolete vector-IN test cases. Fix a bad testcase() macro.
drh [Tue, 6 Sep 2016 19:08:21 +0000 (19:08 +0000)] 
Remove obsolete vector-IN test cases.  Fix a bad testcase() macro.

FossilOrigin-Name: ab3f8f193a7ec36018bf26c9231a1a6a58b6a523

8 years agoFix corer cases of vector IN operators where the RHS is a compound SELECT
drh [Tue, 6 Sep 2016 18:51:25 +0000 (18:51 +0000)] 
Fix corer cases of vector IN operators where the RHS is a compound SELECT
that includes an ORDER BY clause.

FossilOrigin-Name: 8329ac6f8d1edcc19c3e0559abe9a8011dbe1497

8 years agoRemove an unnecessary branch from expr.c.
dan [Tue, 6 Sep 2016 17:21:17 +0000 (17:21 +0000)] 
Remove an unnecessary branch from expr.c.

FossilOrigin-Name: 7cc9746c5414e02012efb8180f9eca2646800e74

8 years agoAvoid unnecessary memory allocations for aiMap in codeEqualityConstraints.
drh [Tue, 6 Sep 2016 17:13:40 +0000 (17:13 +0000)] 
Avoid unnecessary memory allocations for aiMap in codeEqualityConstraints.

FossilOrigin-Name: 70319c3d76abd1e403fcf2a62668736b92a5f3d5

8 years agoAvoid a NULL pointer deref in codeAllEqualityConstraints() following an OOM.
drh [Tue, 6 Sep 2016 16:53:53 +0000 (16:53 +0000)] 
Avoid a NULL pointer deref in codeAllEqualityConstraints() following an OOM.

FossilOrigin-Name: c6e528c1c0f17c69c7745b018afa36694118258f

8 years agoSimplify the fix in commit [7d9bd22c].
dan [Tue, 6 Sep 2016 16:33:24 +0000 (16:33 +0000)] 
Simplify the fix in commit [7d9bd22c].

FossilOrigin-Name: bd5a342008575bf66f63881a0bebf43741f2a67b

8 years agoFix the header comment on codeEqualityTerm().
drh [Tue, 6 Sep 2016 15:25:53 +0000 (15:25 +0000)] 
Fix the header comment on codeEqualityTerm().

FossilOrigin-Name: b7e710e406ed22bcc316099b5e200b6bb2d9c872

8 years agoFix a problem handling (a, b) IN (SELECT ...) expressions when there is an index...
dan [Tue, 6 Sep 2016 14:58:15 +0000 (14:58 +0000)] 
Fix a problem handling (a, b) IN (SELECT ...) expressions when there is an index on just one of "a" or "b".

FossilOrigin-Name: 231c72d9f651f3a70d5c8af080f3ff181b89d939

8 years agoEnhance the sqlite3GetTempRange() and sqlite3ReleaseTempRange() internal
drh [Tue, 6 Sep 2016 14:37:05 +0000 (14:37 +0000)] 
Enhance the sqlite3GetTempRange() and sqlite3ReleaseTempRange() internal
routines so that they use sqlite3GetTempReg() and sqlite3ReleaseTempReg()
when nReg==1.

FossilOrigin-Name: 4071da2f87a2f24a279ac3bced8c794ad374b47c

8 years agoFix a typo in a comment in expr.c.
dan [Tue, 6 Sep 2016 12:04:50 +0000 (12:04 +0000)] 
Fix a typo in a comment in expr.c.

FossilOrigin-Name: 288e934f356ff6276b3e7581ac0f998ca6e93610

8 years agoSimplified logic to extract a column from a row value.
drh [Mon, 5 Sep 2016 22:50:48 +0000 (22:50 +0000)] 
Simplified logic to extract a column from a row value.

FossilOrigin-Name: e8f105c3009e9b667db2afc0088b020a2b94d370

8 years agoFix an assert() so that it does C-compiler does not combine an assert()
drh [Mon, 5 Sep 2016 19:57:46 +0000 (19:57 +0000)] 
Fix an assert() so that it does C-compiler does not combine an assert()
conditional with a production code conditional and thereby confuse the mutation
testing script.

FossilOrigin-Name: 2fa5288a7ef43f1fb26037c1b5e84b7b90400623

8 years agoSimplifications to the SQLITE_KEEPNULL flag on VDBE comparison operators.
drh [Mon, 5 Sep 2016 15:02:41 +0000 (15:02 +0000)] 
Simplifications to the SQLITE_KEEPNULL flag on VDBE comparison operators.

FossilOrigin-Name: 96269f0179a7d8fa44ee278cef362962368c59ef

8 years agoDo vector comparison size checking early - at name resolution time - to
drh [Mon, 5 Sep 2016 12:12:56 +0000 (12:12 +0000)] 
Do vector comparison size checking early - at name resolution time - to
forestall future problems.

FossilOrigin-Name: ae127bcc0a5827786853f47b229021435d6098d7

8 years agoCatch vector size mismatch problems during name resolution to avoid later early-vector-size-check
drh [Mon, 5 Sep 2016 12:02:34 +0000 (12:02 +0000)] 
Catch vector size mismatch problems during name resolution to avoid later
problems.

FossilOrigin-Name: 56562a0346170cf7b72445976864b058437a8ac3

8 years agoFix a crash that could occur under certain circumstances if the vectors on either...
dan [Mon, 5 Sep 2016 09:44:45 +0000 (09:44 +0000)] 
Fix a crash that could occur under certain circumstances if the vectors on either side of a comparison operator were of a different size.

FossilOrigin-Name: 42670935aba152ba774c2a8bdcbe72b943309d68

8 years agoFix a problem causing the affinity of sub-select row-value elements to be ignored...
dan [Sat, 3 Sep 2016 19:52:12 +0000 (19:52 +0000)] 
Fix a problem causing the affinity of sub-select row-value elements to be ignored in some contextes.

FossilOrigin-Name: 7d9bd22c0715ede2592ee1fa7ebc215aded1ca1b

8 years agoMerge the fuzzershell enhancement from trunk.
drh [Sat, 3 Sep 2016 16:24:43 +0000 (16:24 +0000)] 
Merge the fuzzershell enhancement from trunk.

FossilOrigin-Name: ed206048484667e4fe6aaeadd65882537d74bd35

8 years agoBuild the generate_series(START,END,STEP) table-valued function into
drh [Sat, 3 Sep 2016 16:23:42 +0000 (16:23 +0000)] 
Build the generate_series(START,END,STEP) table-valued function into
fuzzershell, to make it easier to construct compact test cases that contain
actual data.

FossilOrigin-Name: 672c21bcf09c5bfb67e061456a56be45409c4f34

8 years agoConsider the affinity of "b" when using an "a IN (SELECT b ...)" expression with...
dan [Sat, 3 Sep 2016 15:31:20 +0000 (15:31 +0000)] 
Consider the affinity of "b" when using an "a IN (SELECT b ...)" expression with an index on "a". Fix for [199df416].

FossilOrigin-Name: f5e49855412e389a8a410db5d7ffb2e3634c5fa3

8 years agoPerformance optimizations.
drh [Sat, 3 Sep 2016 01:46:15 +0000 (01:46 +0000)] 
Performance optimizations.

FossilOrigin-Name: f1d06c49ba0d814dc7ffb538aac3f4e6251fd8f0

8 years agoMerge recent changes from trunk.
drh [Fri, 2 Sep 2016 23:56:32 +0000 (23:56 +0000)] 
Merge recent changes from trunk.

FossilOrigin-Name: c7271fbde1aebb15daaedb7f1fa75fe410fd46f6

8 years agoAdd a test case for the OOM handled by the previous commit.
dan [Fri, 2 Sep 2016 21:34:17 +0000 (21:34 +0000)] 
Add a test case for the OOM handled by the previous commit.

FossilOrigin-Name: 9bdf7ca1b317fe0ba7efea38fb395bf6130ac89a

8 years agoCorrectly detect an OOM occurring in the setDestPgsz() subroutine of
drh [Fri, 2 Sep 2016 21:17:51 +0000 (21:17 +0000)] 
Correctly detect an OOM occurring in the setDestPgsz() subroutine of
backup.

FossilOrigin-Name: d9d8a048d4b621435870b4f8dd13b2938ac2f8fd

8 years agoWithin a backup operation, ensure that a read-transaction is opened on the source...
dan [Fri, 2 Sep 2016 17:18:20 +0000 (17:18 +0000)] 
Within a backup operation, ensure that a read-transaction is opened on the source database before its page size is read. This ensures the page-size used to write to the backup database is the same as its actual page-size, which is important for ZipVFS databases.

FossilOrigin-Name: 7908fc604991d81140c182b97981fd724ad126ae

8 years agoHave "sqldiff --rbu" ignore rows with NULL values in primary key fields. RBU can...
dan [Thu, 1 Sep 2016 14:03:28 +0000 (14:03 +0000)] 
Have "sqldiff --rbu" ignore rows with NULL values in primary key fields. RBU can't handle such rows and the documentation already says sqldiff ignores them. Because the code now uses "=" instead of "IS" to filter on primary key columns, diffs on virtual tables are faster now too.

FossilOrigin-Name: f4ba894a86aa195bcbe2fa69e91cd870ec3fb577

8 years agoIf SQLITE_ENABLE_ZIPVFS is defined, journal_mode=off is configured and a savepoint...
dan [Thu, 1 Sep 2016 09:35:20 +0000 (09:35 +0000)] 
If SQLITE_ENABLE_ZIPVFS is defined, journal_mode=off is configured and a savepoint or statement rollback is attempted, move the pager into the error state to prevent the transaction from being committed. This makes it safe to use journal_mode=off with zipvfs under some conditions.

FossilOrigin-Name: 38d31e189e7c7899e14455f2c083aa676ce4d4c0

8 years agoUse some of the example code from the sessions documenatation in the sessions test...
dan [Mon, 29 Aug 2016 14:18:18 +0000 (14:18 +0000)] 
Use some of the example code from the sessions documenatation in the sessions test cases.

FossilOrigin-Name: 6602974d17536bcb904a794bddedffd58926794b

8 years agoFix typos in comments. No changes to running code.
drh [Sat, 27 Aug 2016 20:21:51 +0000 (20:21 +0000)] 
Fix typos in comments.  No changes to running code.

FossilOrigin-Name: a07269f2a0f87e0b736127f528f6caf3b63f9052

8 years agoFix some comments in sqlite3session.h. No changes to code.
dan [Sat, 27 Aug 2016 18:35:55 +0000 (18:35 +0000)] 
Fix some comments in sqlite3session.h. No changes to code.

FossilOrigin-Name: 78cd64e202fcbe9ce69070b0f48ccd0c6b48538d

8 years agoFixes to fts5 snippet() function.
dan [Sat, 27 Aug 2016 18:34:06 +0000 (18:34 +0000)] 
Fixes to fts5 snippet() function.

FossilOrigin-Name: d464a7b18d212720a4f4e2fa4e204f1aca99c837

8 years agoMerge updates from trunk.
drh [Sat, 27 Aug 2016 14:13:58 +0000 (14:13 +0000)] 
Merge updates from trunk.

FossilOrigin-Name: 082fd5f8ac227dbb983da0a772485268af40a484

8 years agoFix the extra comments (added with -DSQLITE_ENABLE_EXPLAIN_COMMENTS) so that
drh [Sat, 27 Aug 2016 14:05:12 +0000 (14:05 +0000)] 
Fix the extra comments (added with -DSQLITE_ENABLE_EXPLAIN_COMMENTS) so that
the sense of <, <=, >, and >= tests is correct and so that the
SQLITE_STOREP2 version is shown correctly.  These changes are already in the
rowvalue branch but are added here since they are technically unrelated to
rowvalue.

FossilOrigin-Name: 4d43c4698eef4e3db7556813f0274b4018c7c2b9

8 years agoFix the "Synopsis" on the OP_Lt, OP_Le, OP_Gt, and OP_Ge opcodes, which
drh [Sat, 27 Aug 2016 01:41:53 +0000 (01:41 +0000)] 
Fix the "Synopsis" on the OP_Lt, OP_Le, OP_Gt, and OP_Ge opcodes, which
has been backwards for time out of mind.

FossilOrigin-Name: f51248dcfa22e989dacde41021e96a65f12c5ca8

8 years agoFix a minor problem in sqlite3FindInIndex() related to rowids being used
drh [Fri, 26 Aug 2016 22:09:01 +0000 (22:09 +0000)] 
Fix a minor problem in sqlite3FindInIndex() related to rowids being used
as part of the index.

FossilOrigin-Name: 829f802be7d4647dd815b739bbc9e1d1ac6a224d

8 years agoFix the sqlite3FindInIndex() to ensure that it always uses a prefix of
drh [Fri, 26 Aug 2016 21:15:35 +0000 (21:15 +0000)] 
Fix the sqlite3FindInIndex() to ensure that it always uses a prefix of
the index and uses no repeated columns.  Enhanced comments.

FossilOrigin-Name: b9fc89e432fbe4e5b41959a42797641907e075e3

8 years agoAdd an EXPLAIN QUERY PLAN line for when a index is used to implement
drh [Fri, 26 Aug 2016 19:54:12 +0000 (19:54 +0000)] 
Add an EXPLAIN QUERY PLAN line for when a index is used to implement
an IN operator.

FossilOrigin-Name: 171aa833a2e1650c3d9cf9bd6438ae46f6c35871

8 years agoAdd test cases to rowvalue2.test.
dan [Fri, 26 Aug 2016 19:47:30 +0000 (19:47 +0000)] 
Add test cases to rowvalue2.test.

FossilOrigin-Name: 078bb69e99891ba3b76a39ac974990714c43908f

8 years agoEnhance sqlite3FindInIndex() so that it is able to make use of the
drh [Fri, 26 Aug 2016 19:31:29 +0000 (19:31 +0000)] 
Enhance sqlite3FindInIndex() so that it is able to make use of the
primary keys at the end of an index.

FossilOrigin-Name: 4b589fbfcc4265902de0f552961d2df497a184da

8 years agoFix a post-OOM crash in updateRangeAffinityStr(). Add several ALWAYS()
drh [Fri, 26 Aug 2016 18:17:08 +0000 (18:17 +0000)] 
Fix a post-OOM crash in updateRangeAffinityStr().  Add several ALWAYS()
macros on unreachable branches.

FossilOrigin-Name: 87d40195ae5cc2abd9bae45073a615db81263285

8 years agoFix a problem with affinity changes and vector range comparisons.
dan [Fri, 26 Aug 2016 17:54:46 +0000 (17:54 +0000)] 
Fix a problem with affinity changes and vector range comparisons.

FossilOrigin-Name: b34413ac7e34369b4420e57b0132249dca68a7b0

8 years agoAllow ROWID values in indexed vector comparisons.
drh [Fri, 26 Aug 2016 13:19:49 +0000 (13:19 +0000)] 
Allow ROWID values in indexed vector comparisons.

FossilOrigin-Name: b0cc6be4eb81f21b11796e1f14d4412bf21dea6e

8 years agoFix a problem in internal function sqlite3OpenTableAndIndices causing an operand...
dan [Fri, 26 Aug 2016 12:00:50 +0000 (12:00 +0000)] 
Fix a problem in internal function sqlite3OpenTableAndIndices causing an operand of an unrelated VM instruction to be overwritten. Fix for [ef360601].

FossilOrigin-Name: 7090147903337864d54ecfb2cd84a3f823973167

8 years agoRename a test procedure in 'speed3.test' to avoid a name collision.
mistachkin [Fri, 26 Aug 2016 04:32:59 +0000 (04:32 +0000)] 
Rename a test procedure in 'speed3.test' to avoid a name collision.

FossilOrigin-Name: 84de17bc688f1df2be1a34420470d1b16f8f4e56

8 years agoComment improvements. Put ALWAYS and NEVER macros on three unreachable
drh [Fri, 26 Aug 2016 03:42:57 +0000 (03:42 +0000)] 
Comment improvements.  Put ALWAYS and NEVER macros on three unreachable
branches.

FossilOrigin-Name: 397617009e07004596476d6f5644fdf84c376f54

8 years agoAdapt the special case of '$' in item names for test 'vtabH-3.1' as well.
mistachkin [Fri, 26 Aug 2016 02:10:50 +0000 (02:10 +0000)] 
Adapt the special case of '$' in item names for test 'vtabH-3.1' as well.

FossilOrigin-Name: e4aeaa2bc73b57f1ef134cc4f54e2a652a20b5c9

8 years agoMake the test 'vtabH-3.1' work when there are less than 5 top-level items.
mistachkin [Fri, 26 Aug 2016 01:47:22 +0000 (01:47 +0000)] 
Make the test 'vtabH-3.1' work when there are less than 5 top-level items.

FossilOrigin-Name: 328f79bb5713abbecaeb0ef3fb37f56a0946b915

8 years agoSupport running the fstree tests in 'vtabH.test' on Windows when not using the system...
mistachkin [Fri, 26 Aug 2016 01:17:12 +0000 (01:17 +0000)] 
Support running the fstree tests in 'vtabH.test' on Windows when not using the system drive.

FossilOrigin-Name: 3680f95ff34fdcf6a18a99268678a56e4be5a023

8 years agoRemove an unreachable branch from sqlite3ExprAffinity()
drh [Fri, 26 Aug 2016 01:02:09 +0000 (01:02 +0000)] 
Remove an unreachable branch from sqlite3ExprAffinity()

FossilOrigin-Name: 9d96f61481704e5ec399ee425f0ebb246902ecc5

8 years agoFix typos in 'vtabF.test' file. No changes to code.
mistachkin [Thu, 25 Aug 2016 23:24:09 +0000 (23:24 +0000)] 
Fix typos in 'vtabF.test' file.  No changes to code.

FossilOrigin-Name: a8546feec9388d96934b16e516a165cd37d32ce9

8 years agoMerge recent changes from trunk.
drh [Thu, 25 Aug 2016 22:31:44 +0000 (22:31 +0000)] 
Merge recent changes from trunk.

FossilOrigin-Name: 5789aab8ef59ae1cdfdae123b078ee03da6e08ed

8 years agoFix the sqlite3_trace_v2() interface so that it goes disabled if either the
drh [Thu, 25 Aug 2016 22:06:37 +0000 (22:06 +0000)] 
Fix the sqlite3_trace_v2() interface so that it goes disabled if either the
callback or mask arguments are zero, in accordance with the documentation.

FossilOrigin-Name: 37e6c54b1afc634844026b3fe874dd2d550c6558

8 years agoRefactor the sqlite3ExprCodeIN() routine for improved maintainability.
drh [Thu, 25 Aug 2016 21:14:34 +0000 (21:14 +0000)] 
Refactor the sqlite3ExprCodeIN() routine for improved maintainability.

FossilOrigin-Name: b56705ae6374db9db82613ef89faa1a1e6b00a18

8 years agoAnother fix in the IN-operator algorithm description.
drh [Thu, 25 Aug 2016 17:47:36 +0000 (17:47 +0000)] 
Another fix in the IN-operator algorithm description.

FossilOrigin-Name: f474aeac4fa62d87e73189868d7c7a295ffb7265

8 years agoFurther refinement of the in-operator.md documentation.
drh [Thu, 25 Aug 2016 17:40:32 +0000 (17:40 +0000)] 
Further refinement of the in-operator.md documentation.

FossilOrigin-Name: df0648373a50006ca18d692e12552d1d53d549e3

8 years agoImprovements to IN operator code generator comments. Avoid unnecessary
drh [Thu, 25 Aug 2016 15:46:25 +0000 (15:46 +0000)] 
Improvements to IN operator code generator comments.  Avoid unnecessary
Copy operations on the LHS of the IN operator.

FossilOrigin-Name: b6344298783a1207cba3f635939ddc9ba922ab67

8 years agoCorrections to the IN-operator notes.
drh [Thu, 25 Aug 2016 14:23:59 +0000 (14:23 +0000)] 
Corrections to the IN-operator notes.

FossilOrigin-Name: 25033ee94538289ba7e0147da30a18300047123f

8 years agoAdd notes on the implementation of the IN operator.
drh [Thu, 25 Aug 2016 14:00:15 +0000 (14:00 +0000)] 
Add notes on the implementation of the IN operator.

FossilOrigin-Name: d256b2caeb9e3eb5dd88bb569ec71f91e9991c81

8 years agoSimplified VDBE code for the vector NOT IN null-scanning loop.
drh [Wed, 24 Aug 2016 21:54:47 +0000 (21:54 +0000)] 
Simplified VDBE code for the vector NOT IN null-scanning loop.

FossilOrigin-Name: 7ae504e62e9bbbbd85a676f3c3922b7fd0cc73d2

8 years agoImproved extended comments of comparison operators when the SQLITE_STOREP2
drh [Wed, 24 Aug 2016 21:24:04 +0000 (21:24 +0000)] 
Improved extended comments of comparison operators when the SQLITE_STOREP2
flags is set on P5.  No changes to non-debug code.

FossilOrigin-Name: bbc1b016164ed0793e07302614384d52119463e0

8 years agoIn sqlite3FindInIndex(), improve internal comments and avoid an
drh [Wed, 24 Aug 2016 18:51:23 +0000 (18:51 +0000)] 
In sqlite3FindInIndex(), improve internal comments and avoid an
unreachable branch.

FossilOrigin-Name: 55945fc12f8157e32e6850e41575c0c6422d29e7

8 years agoFix a bug in the fts5 snippet function causing it to return text containing zero... fts5-snippet-bias
dan [Wed, 24 Aug 2016 18:50:47 +0000 (18:50 +0000)] 
Fix a bug in the fts5 snippet function causing it to return text containing zero phrase instances.

FossilOrigin-Name: b174ed2bde43a1872374ce18b85ac9f067e86fbb

8 years agoSync up the MSVC autoconf makefile.
mistachkin [Wed, 24 Aug 2016 18:21:58 +0000 (18:21 +0000)] 
Sync up the MSVC autoconf makefile.

FossilOrigin-Name: 77f7c31a3aa44798cfa5f557242caffb593ce7af

8 years agoFix more unreachable branches.
drh [Wed, 24 Aug 2016 17:49:07 +0000 (17:49 +0000)] 
Fix more unreachable branches.

FossilOrigin-Name: 6099c180db55396d6307538a5428ae5ef1b82d10

8 years agoAdd a NEVER() on an unreachable branch in comparisonAffinity().
drh [Wed, 24 Aug 2016 15:37:31 +0000 (15:37 +0000)] 
Add a NEVER() on an unreachable branch in comparisonAffinity().

FossilOrigin-Name: 505a2f20eac62d4e170f003255c8984e4f3b0918

8 years agoFix a buffer overrun in the code for handling IN(...) operators when the LHS of the...
dan [Wed, 24 Aug 2016 12:22:17 +0000 (12:22 +0000)] 
Fix a buffer overrun in the code for handling IN(...) operators when the LHS of the operator contains indexed columns or expressions.

FossilOrigin-Name: f41a0391b732a8c4ad188163f34a0f4a22237bb5

8 years agoThe previous OOM fix was bad. Back it out and replace it with a better one.
drh [Wed, 24 Aug 2016 00:51:48 +0000 (00:51 +0000)] 
The previous OOM fix was bad.  Back it out and replace it with a better one.

FossilOrigin-Name: 1e3bc3698a4b779e6af8e3c727929c4dbddf3edb

8 years agoAvoid a potential null-pointer dereference following an OOM.
drh [Wed, 24 Aug 2016 00:25:27 +0000 (00:25 +0000)] 
Avoid a potential null-pointer dereference following an OOM.

FossilOrigin-Name: 25f6ed8de4df9c9890d4a352a6d11084433e82ea

8 years agoSimplify the row value misuse error message.
drh [Tue, 23 Aug 2016 19:02:55 +0000 (19:02 +0000)] 
Simplify the row value misuse error message.

FossilOrigin-Name: 838c50a5bf46fd0340839d577fa28ba02b4f2034

8 years agoFix a problem with rowvalue UPDATE when the rowvalue is not the left-most and
drh [Tue, 23 Aug 2016 18:30:10 +0000 (18:30 +0000)] 
Fix a problem with rowvalue UPDATE when the rowvalue is not the left-most and
the RHS is a multi-column subquery.

FossilOrigin-Name: e149e6b93a9afb3d574309c0db60e221e24078f7

8 years agoFix an uninitialized variable in CASE expression code generation.
drh [Tue, 23 Aug 2016 17:30:55 +0000 (17:30 +0000)] 
Fix an uninitialized variable in CASE expression code generation.

FossilOrigin-Name: c8ffae05e13033ec7425bf0f002df31f550bb7f1

8 years agoFix the SQLITE_USER_AUTHENTICATION login check so that the SQLITE_AUTH_USER
drh [Tue, 23 Aug 2016 14:42:15 +0000 (14:42 +0000)] 
Fix the SQLITE_USER_AUTHENTICATION login check so that the SQLITE_AUTH_USER
error code correctly propagates and is not overwritten by SQLITE_ERROR.

FossilOrigin-Name: c640489db2037f1a284d7b85fa753ccdac1b8f79

8 years agoAdd support for the SQLITE_DBCONFIG_MAINDBNAME configuration option.
drh [Mon, 22 Aug 2016 20:10:01 +0000 (20:10 +0000)] 
Add support for the SQLITE_DBCONFIG_MAINDBNAME configuration option.

FossilOrigin-Name: 7839519349c7371cdb4e16a215eacd27004cbc62

8 years agoFix the vector BETWEEN operator so that it only evaluates the left-most
drh [Mon, 22 Aug 2016 14:30:05 +0000 (14:30 +0000)] 
Fix the vector BETWEEN operator so that it only evaluates the left-most
vector expression once.  Add support for vector comparisons in the CASE
operator.

FossilOrigin-Name: 07e69f43a294d35b5145a2b0242ee42d50adab14

8 years agoReinstate the mechanism in BETWEEN that avoids evaluating the first expression
drh [Mon, 22 Aug 2016 00:48:58 +0000 (00:48 +0000)] 
Reinstate the mechanism in BETWEEN that avoids evaluating the first expression
more than once, but fix the affinity extractor so that it works with this
mechanism.  The de-duplication of the first expression still does not work
for vector expressions, though.

FossilOrigin-Name: 2f39987f21bd6dae8d2be610a1fd5f06f8878e9e

8 years agoThe docs promise the in "x BETWEEN y AND z" the x expression is only evaluated
drh [Sat, 20 Aug 2016 22:49:28 +0000 (22:49 +0000)] 
The docs promise the in "x BETWEEN y AND z" the x expression is only evaluated
once.  That is no longer true, and so some tests are failing.  This needs to
be fixed before merging to trunk.

FossilOrigin-Name: e50d264fdc2f08d19202c68f73f18df301cb233d

8 years agoFurther comment enhancements. No changes to code.
drh [Sat, 20 Aug 2016 21:11:25 +0000 (21:11 +0000)] 
Further comment enhancements.  No changes to code.

FossilOrigin-Name: d4562a9e7b1eaff41466210e3a0caaf374ec5a92

8 years agoClarification of code comments in expr.c. Clean up the implementations
drh [Sat, 20 Aug 2016 21:02:38 +0000 (21:02 +0000)] 
Clarification of code comments in expr.c.  Clean up the implementations
of sqlite3ExprIsVector() and sqlite3ExprVectorSize() slightly.

FossilOrigin-Name: 4fb66d6592b141a4a71359250dbd1ac454569cb9

8 years agoFixes for problems following OOM errors.
drh [Sat, 20 Aug 2016 18:06:14 +0000 (18:06 +0000)] 
Fixes for problems following OOM errors.

FossilOrigin-Name: 9041ee4a6f0e8389297f887f1431ab5cfe783390

8 years agoFix other minor problems with the fts5 snippet() function.
dan [Sat, 20 Aug 2016 17:23:45 +0000 (17:23 +0000)] 
Fix other minor problems with the fts5 snippet() function.

FossilOrigin-Name: b56b2a85cf377686727f3929208ede43f797cf76

8 years agoDo not duplicate the Expr.pLeft subtree of a TK_SELECT_COLUMN node.
drh [Sat, 20 Aug 2016 17:00:16 +0000 (17:00 +0000)] 
Do not duplicate the Expr.pLeft subtree of a TK_SELECT_COLUMN node.

FossilOrigin-Name: 8384c77ebb3f65fbc54c199885926f2066f0b140

8 years agoFix a segfault that could occur if a query that used a vector comparison contained...
dan [Sat, 20 Aug 2016 15:01:24 +0000 (15:01 +0000)] 
Fix a segfault that could occur if a query that used a vector comparison contained certain types of syntax errors.

FossilOrigin-Name: 203f07c5e140e74cf91d0c1e20135c21236f0fc1

8 years agoImprovements to the vector comparison splitter in exprAnalyze().
drh [Sat, 20 Aug 2016 12:00:05 +0000 (12:00 +0000)] 
Improvements to the vector comparison splitter in exprAnalyze().

FossilOrigin-Name: a3ffd283bc931b04170ef737e56bced33d27f06d

8 years agoImprovements to comments. No code changes.
drh [Sat, 20 Aug 2016 01:06:22 +0000 (01:06 +0000)] 
Improvements to comments.  No code changes.

FossilOrigin-Name: 4165d20f64d778a4e48f511a37cfced8579d4dbe

8 years agoAdd support for vector assignments in the SET clause of an UPDATE statement.
drh [Sat, 20 Aug 2016 00:51:37 +0000 (00:51 +0000)] 
Add support for vector assignments in the SET clause of an UPDATE statement.

FossilOrigin-Name: f320d47d6b7b08d9552c8444004bc256348bda90

8 years agoChange the way TK_SELECT_COLUMN is handled so that the subquery is only
drh [Sat, 20 Aug 2016 00:07:01 +0000 (00:07 +0000)] 
Change the way TK_SELECT_COLUMN is handled so that the subquery is only
generated once even if part of the vector comparison is used for indexing
and the other part is now.  This change also is a pathway to vector assignment
in UPDATE statements.

FossilOrigin-Name: d8feea7dcde83179bff303072426561cfe825e58