]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
8 years agoUse Knuth multiplicative hashing for the symbol table.
drh [Wed, 28 Sep 2016 20:42:31 +0000 (20:42 +0000)] 
Use Knuth multiplicative hashing for the symbol table.

FossilOrigin-Name: cc29ddd6be60bdbf107f285c9eb57d5896ebca2d

8 years agoTwo more typo fixes in comments.
drh [Wed, 28 Sep 2016 16:05:53 +0000 (16:05 +0000)] 
Two more typo fixes in comments.

FossilOrigin-Name: 40c0fb0af678797c39a99853f9f4102464c16f4b

8 years agoFix typos in comments. No code changes.
drh [Wed, 28 Sep 2016 16:04:22 +0000 (16:04 +0000)] 
Fix typos in comments.  No code changes.

FossilOrigin-Name: 5bbd071d57a8048e2ca17bf97761e4f27fc5a6bf

8 years agoUpdate requirements marks due to improvements in the wording of documentation.
drh [Tue, 27 Sep 2016 00:09:33 +0000 (00:09 +0000)] 
Update requirements marks due to improvements in the wording of documentation.
No changes to code.

FossilOrigin-Name: bf903b2ecac5d7b25c9cc899cae41f1d69aafe4e

8 years agoFix FTS3 test cases due to the flattener change of the previous check-in.
drh [Tue, 27 Sep 2016 00:03:25 +0000 (00:03 +0000)] 
Fix FTS3 test cases due to the flattener change of the previous check-in.

FossilOrigin-Name: 0c8b9b211f4285e2ab77cf5e0820088ef10e05c4

8 years agoWhen flattening a query of the form "SELECT * FROM (SELECT * FROM tbl WHERE x=?)...
dan [Mon, 26 Sep 2016 14:39:05 +0000 (14:39 +0000)] 
When flattening a query of the form "SELECT * FROM (SELECT * FROM tbl WHERE x=?) WHERE y=?", ensure that the final WHERE clause is "x=? AND y=?" instead of "y=? AND x=?". Although it is still not guaranteed, this makes the order in which WHERE clause terms are processed comport more closely to users expectations.

FossilOrigin-Name: cf7f9e6d5abff273dd2f8a8dce27d52e1449b3be

8 years agoInline the relevent parts of sqlite3ExprAlloc() into spanExpr(), for a
drh [Mon, 26 Sep 2016 12:38:22 +0000 (12:38 +0000)] 
Inline the relevent parts of sqlite3ExprAlloc() into spanExpr(), for a
performance improvement.

FossilOrigin-Name: fe89225eab777c2c9cb1cbc31092b9e39f516842

8 years agoOmit the LikeOp object from the parser. Change more sqlite3PExpr() calls into
drh [Sat, 24 Sep 2016 17:42:43 +0000 (17:42 +0000)] 
Omit the LikeOp object from the parser.  Change more sqlite3PExpr() calls into
sqlite3ExprAlloc() calls.

FossilOrigin-Name: 795454a3fa5f9ccc486593b5e16e8fad38c934fb

8 years agoAdd -DSQLITE_MAX_EXPR_DEPTH=0 to the --lean option on speed-check.sh.
drh [Sat, 24 Sep 2016 01:41:59 +0000 (01:41 +0000)] 
Add -DSQLITE_MAX_EXPR_DEPTH=0 to the --lean option on speed-check.sh.

FossilOrigin-Name: a8cb1390fc1234b2e925090c4d770cca5d587bea

8 years agoAdd the EP_Leaf flag bit to the Expr.flags field to indicate Expr
drh [Fri, 23 Sep 2016 21:36:24 +0000 (21:36 +0000)] 
Add the EP_Leaf flag bit to the Expr.flags field to indicate Expr
nodes that do not have substructure.  Use that bit to avoid unnecessary
recursion.

FossilOrigin-Name: 8a6ea455cd1bf42ae0a7f1f1789baf88d782db13

8 years agoUse sqlite3ExprAlloc() instead of sqlite3PExpr() for leaf nodes in the
drh [Fri, 23 Sep 2016 20:59:31 +0000 (20:59 +0000)] 
Use sqlite3ExprAlloc() instead of sqlite3PExpr() for leaf nodes in the
expression tree, where appropriate.  This is both smaller and faster.

FossilOrigin-Name: afac0709cec577a7851e3711730712cf12eeb6af

8 years agoNew test case for the ORDER BY LIMIT optimization.
drh [Fri, 23 Sep 2016 18:13:01 +0000 (18:13 +0000)] 
New test case for the ORDER BY LIMIT optimization.

FossilOrigin-Name: 9a5a489d0d344274d0fc9fb9303503a454f42844

8 years agoFix a potential null-pointer dereference and crash in the case where one
drh [Thu, 22 Sep 2016 21:37:18 +0000 (21:37 +0000)] 
Fix a potential null-pointer dereference and crash in the case where one
thread is calling sqlite3_column_text() and another thread is calling
sqlite3_step() on the same prepared statement at the same instant.

FossilOrigin-Name: ee1382a36303eff8d94275ac3b12e5ce398ee620

8 years agoRemove the internal sqlite3CodeOnce() interface, replacing it with a
drh [Thu, 22 Sep 2016 18:53:13 +0000 (18:53 +0000)] 
Remove the internal sqlite3CodeOnce() interface, replacing it with a
direct call to sqlite3VdbeAddOp0(v,OP_Once).  Slightly smaller and faster.

FossilOrigin-Name: c3774c6a5fe48af91fda28e9e18c6ed9053ea992

8 years agoMakefile changes to support building winsqlite3.dll using STDCALL rather than CDECL.
mistachkin [Thu, 22 Sep 2016 18:46:38 +0000 (18:46 +0000)] 
Makefile changes to support building winsqlite3.dll using STDCALL rather than CDECL.

FossilOrigin-Name: 5e892d60935e5c82234d1bfaef4c5026061acceb

8 years agoFix speedtest1.c so that it works with SQLITE_OMIT_DEPRECATED.
drh [Wed, 21 Sep 2016 23:58:49 +0000 (23:58 +0000)] 
Fix speedtest1.c so that it works with SQLITE_OMIT_DEPRECATED.
Add the --lean and --cachesize options to speed-check.sh.

FossilOrigin-Name: 7785b3a25778cc19861c01f4148f72e0f724f55d

8 years agoFix a problem with the fts5 auxiliary function API causing a crash when a query conta...
dan [Wed, 21 Sep 2016 19:43:34 +0000 (19:43 +0000)] 
Fix a problem with the fts5 auxiliary function API causing a crash when a query contained a phrase of zero terms.

FossilOrigin-Name: 0741812d7fcd558479e4849fbb3ba8d03738d018

8 years agoDo not run vacuummem.test if ENABLE_MEMORY_MANAGEMENT is defined.
dan [Wed, 21 Sep 2016 19:00:37 +0000 (19:00 +0000)] 
Do not run vacuummem.test if ENABLE_MEMORY_MANAGEMENT is defined.

FossilOrigin-Name: 4a613d856433ac48e8ee0cd7f0e774e484e8acf6

8 years agoFix obsolete requirements marks. Add new tests for VACUUM of attached
drh [Wed, 21 Sep 2016 18:18:57 +0000 (18:18 +0000)] 
Fix obsolete requirements marks.  Add new tests for VACUUM of attached
databases.

FossilOrigin-Name: 2b44f9aa7d4e2089dacd6bfcf526dae9309b7af3

8 years agoAvoid running vacuum5.test in auto-vacuum mode.
dan [Wed, 21 Sep 2016 17:53:47 +0000 (17:53 +0000)] 
Avoid running vacuum5.test in auto-vacuum mode.

FossilOrigin-Name: be184befa09ef0a670a2a6d9c037b9a27bcf16d8

8 years agoDo not run test "delete_db.test" with either the journaltest or inmemoryjournal permu...
dan [Wed, 21 Sep 2016 17:47:59 +0000 (17:47 +0000)] 
Do not run test "delete_db.test" with either the journaltest or inmemoryjournal permutations. Ensure that the multiplexor tests in delete_db.test are performed in non-autovacuum mode.

FossilOrigin-Name: 46b7d19e0282ecd7622344aafad8c2feb83c9658

8 years agoUpdate the fts5vocab table to handle "ORDER BY term" efficiently.
dan [Wed, 21 Sep 2016 14:41:09 +0000 (14:41 +0000)] 
Update the fts5vocab table to handle "ORDER BY term" efficiently.

FossilOrigin-Name: d4928fb5cd63a72808f01778fa5a11395385dedf

8 years agoImproved implementation of 64-bit signed integer multiply that correctly
drh [Tue, 20 Sep 2016 22:04:05 +0000 (22:04 +0000)] 
Improved implementation of 64-bit signed integer multiply that correctly
detects overflow (and promotes to floating-point) in some corner cases.
Fix for ticket [1ec41379c9c1e400]

FossilOrigin-Name: db3ebd7c52cfc5fcc7be00f52e9d7c84719f7b93

8 years agoFix harmless compiler warning.
mistachkin [Tue, 20 Sep 2016 17:49:01 +0000 (17:49 +0000)] 
Fix harmless compiler warning.

FossilOrigin-Name: 72429063956614975d90cae2a829cfa4296694da

8 years agoFix typo in comment.
mistachkin [Tue, 20 Sep 2016 17:38:27 +0000 (17:38 +0000)] 
Fix typo in comment.

FossilOrigin-Name: bd3ecbb5c1977744321f4bbac79fd7e2e7c1b5ba

8 years agoFurther performance enhancements in zeroblob() handling.
drh [Tue, 20 Sep 2016 01:46:15 +0000 (01:46 +0000)] 
Further performance enhancements in zeroblob() handling.

FossilOrigin-Name: 21b0e3b75c531a5ce33a1503f9bf647d56f56a5b

8 years agoAvoid unnecessary calls to ExpandBlob() for smaller and faster code.
drh [Tue, 20 Sep 2016 01:19:18 +0000 (01:19 +0000)] 
Avoid unnecessary calls to ExpandBlob() for smaller and faster code.

FossilOrigin-Name: 5e196fd18169e84806cd45dd1a8190339323e772

8 years agoVery small optimization in the bytecode engine.
drh [Mon, 19 Sep 2016 23:39:34 +0000 (23:39 +0000)] 
Very small optimization in the bytecode engine.

FossilOrigin-Name: 46002511e52518bae14f210157f231c814c77c9e

8 years agoFix a segfault introduced by the row-value enhancement that comes up on
drh [Mon, 19 Sep 2016 11:00:42 +0000 (11:00 +0000)] 
Fix a segfault introduced by the row-value enhancement that comes up on
a skip-scan where the first term of the index is unconstrained and the
second term is of the form "columm IN (SELECT...)".

FossilOrigin-Name: 2401ea5acfeee8042489d1db38036ff86e8a6916

8 years agoImproved performance in sqlite3ExprCodeTarget().
drh [Mon, 19 Sep 2016 10:24:19 +0000 (10:24 +0000)] 
Improved performance in sqlite3ExprCodeTarget().

FossilOrigin-Name: 75146165dcc1ae1faab46b1a7333ef795d5eeac5

8 years agoSmall performance optimization in the expression walker.
drh [Mon, 19 Sep 2016 02:19:00 +0000 (02:19 +0000)] 
Small performance optimization in the expression walker.

FossilOrigin-Name: c6e6afb9391704d9119335f2ce17df3968acb514

8 years agoRevise the implementation of OP_Once so that it is smaller, faster, and uses
drh [Sun, 18 Sep 2016 16:08:10 +0000 (16:08 +0000)] 
Revise the implementation of OP_Once so that it is smaller, faster, and uses
less memory.  This also fixes an obscure bug introduced 3 days ago by check-in
[5990a1bdb4a073].

FossilOrigin-Name: 6bf5ba10d28f1b0a32aa9a560ae3143a1235eadb

8 years agoMinor enhancement to the TclKit batch tool: it should download the TclKit EXE alone...
mistachkin [Sat, 17 Sep 2016 22:46:13 +0000 (22:46 +0000)] 
Minor enhancement to the TclKit batch tool: it should download the TclKit EXE alone when the TCLKIT_NOENV environment variable is set.

FossilOrigin-Name: baceb988c6f4e93134e6a63173e846af2b73531a

8 years agoSmall performance optimization in the freeSpace() routine of btree.c.
drh [Sat, 17 Sep 2016 19:34:32 +0000 (19:34 +0000)] 
Small performance optimization in the freeSpace() routine of btree.c.

FossilOrigin-Name: 63962e2a927963575be74c3ce11f39f722c07c72

8 years agoImproved description of the ElseNotEq opcode in comments. No changes to code.
drh [Sat, 17 Sep 2016 17:39:01 +0000 (17:39 +0000)] 
Improved description of the ElseNotEq opcode in comments.  No changes to code.

FossilOrigin-Name: e011435e2f57ddfe315d5da48e93185d6789fc80

8 years agoFix typo in the name of a Win32 string conversion routine. Replace several uses...
mistachkin [Fri, 16 Sep 2016 20:39:21 +0000 (20:39 +0000)] 
Fix typo in the name of a Win32 string conversion routine.  Replace several uses of raw_printf() with utf8_printf() in the shell.

FossilOrigin-Name: 6fc95dd7a0b44212f30e657a850892a85a12715c

8 years agoIf no KEY is specified on ATTACH, copy the main schema key if the key size
drh [Fri, 16 Sep 2016 19:42:47 +0000 (19:42 +0000)] 
If no KEY is specified on ATTACH, copy the main schema key if the key size
is non-zero.  In other words, allow for -1 as a valid key size in support
of the --textkey to SEE.

FossilOrigin-Name: 03573887dbf357f8aa54e4a1cd03b82b0ded8139

8 years agoFix problems with the fileRead() function in the command-line shell. Fix
drh [Fri, 16 Sep 2016 19:11:03 +0000 (19:11 +0000)] 
Fix problems with the fileRead() function in the command-line shell.  Fix
a harmless memory leak in the command-line shell, to make validation testing
easier.

FossilOrigin-Name: e660402e5e654b7f37ad2ce201df5cbb2b9eb9a6

8 years agoRemove the #ifdef SQLITE_DEBUG from around the testcase_glob() routine
drh [Fri, 16 Sep 2016 18:53:42 +0000 (18:53 +0000)] 
Remove the #ifdef SQLITE_DEBUG from around the testcase_glob() routine
in the command-line shell.

FossilOrigin-Name: 9885dac4b98693c4d2ed643022127f1452f19dc6

8 years agoFix a problem causing incorrect code to be generated for IN constraints like "a IN...
dan [Fri, 16 Sep 2016 16:30:57 +0000 (16:30 +0000)] 
Fix a problem causing incorrect code to be generated for IN constraints like "a IN (1, 2, 3)" where column "a" is a rowid column with an extra UNIQUE index created on it. Ticket [0eab1ac759].

FossilOrigin-Name: a92aee5520cfaf85ae896365a7e42bdd981f828d

8 years agoReplace a faulty assert() with a testcase() to assure the condition is
drh [Fri, 16 Sep 2016 15:42:17 +0000 (15:42 +0000)] 
Replace a faulty assert() with a testcase() to assure the condition is
tested.

FossilOrigin-Name: a49bc0a8244feb08b83e716d81c2a9512c184539

8 years agoAdd WHERETRACE macros showing every entry and exit from
drh [Fri, 16 Sep 2016 14:50:38 +0000 (14:50 +0000)] 
Add WHERETRACE macros showing every entry and exit from
whereLoopAddBtreeIndex().

FossilOrigin-Name: e7653decdcee161d379ced40aa1b27246337b000

8 years agoFix SQLITE_OMIT_AUTHORIZATION so that it compiles cleanly.
drh [Fri, 16 Sep 2016 11:53:10 +0000 (11:53 +0000)] 
Fix SQLITE_OMIT_AUTHORIZATION so that it compiles cleanly.

FossilOrigin-Name: a3e3b3e1c57178ccd38fc7375ec1de8e8ae45372

8 years agoIn the shell, make ".testcase" and ".check" available in all configurations,
drh [Fri, 16 Sep 2016 02:52:22 +0000 (02:52 +0000)] 
In the shell, make ".testcase" and ".check" available in all configurations,
not just SQLITE_DEBUG.  All testcases to be named.  Show the result of each
testcase on stdout.

FossilOrigin-Name: 792afefa9c750910082fd102f1ccd10309759dfc

8 years agoIn the command-line shell, add the --new option to the ".open" command.
drh [Fri, 16 Sep 2016 00:26:08 +0000 (00:26 +0000)] 
In the command-line shell, add the --new option to the ".open" command.
Also, report the current database filename as part of the ".show" command.

FossilOrigin-Name: 8e5c92039128a430e0509f4f06ea80ba39c35bda

8 years agoAdd the ".testcase" and ".check" dot-commands in the shell, when compiled
drh [Thu, 15 Sep 2016 21:35:24 +0000 (21:35 +0000)] 
Add the ".testcase" and ".check" dot-commands in the shell, when compiled
using SQLITE_DEBUG.

FossilOrigin-Name: 62289f27ee276090a855982bd8216a465e7d0a27

8 years agoOmit the sqlite3Apis constant object when compiling with
drh [Thu, 15 Sep 2016 19:15:19 +0000 (19:15 +0000)] 
Omit the sqlite3Apis constant object when compiling with
SQLITE_OMIT_LOAD_EXTENSION, since it is not used.

FossilOrigin-Name: 7b10461370828b9c57acaaaea518031d53986fa3

8 years agoRemove no-op code (adding an assert() to prove that the code was no-op)
drh [Thu, 15 Sep 2016 14:54:51 +0000 (14:54 +0000)] 
Remove no-op code (adding an assert() to prove that the code was no-op)
in the text affinity logic of the bytecode engine comparison operators.

FossilOrigin-Name: b9f5bdbf40ac6382e48f09ebcd53cc908e065527

8 years agoFix a typo in a comment in sqlite.h.in. No changes to code.
dan [Thu, 15 Sep 2016 05:47:00 +0000 (05:47 +0000)] 
Fix a typo in a comment in sqlite.h.in. No changes to code.

FossilOrigin-Name: 12df7152109ffce4b3e0ee233c5ea8103edb902a

8 years agoSlight size reduction and performance increase in sqlite3VdbeHalt().
drh [Thu, 15 Sep 2016 00:32:42 +0000 (00:32 +0000)] 
Slight size reduction and performance increase in sqlite3VdbeHalt().

FossilOrigin-Name: 5990a1bdb4a0734ff23015ada71cf02d0cb1381f

8 years agoOptimization to vdbeRecordCompareInt() makes it slightly smaller and faster.
drh [Thu, 15 Sep 2016 00:04:46 +0000 (00:04 +0000)] 
Optimization to vdbeRecordCompareInt() makes it slightly smaller and faster.

FossilOrigin-Name: 5a2a7712cb8e0b686942dfab4e9e67b5ea7b2be3

8 years agoUpdate comments used to generate API documentation to include the new
drh [Wed, 14 Sep 2016 18:56:20 +0000 (18:56 +0000)] 
Update comments used to generate API documentation to include the new
"[dateof:3.X.Y]" notation for dates of release where appropriate.
No changes to code.

FossilOrigin-Name: 55f7f8ee5b1c13aa219198b7ae66f59b3730f4c3

8 years agoFix a bug in sqldiff causing it to confuse blobs zero bytes in size with NULL values.
dan [Mon, 12 Sep 2016 14:23:51 +0000 (14:23 +0000)] 
Fix a bug in sqldiff causing it to confuse blobs zero bytes in size with NULL values.

FossilOrigin-Name: 264e9c75875796cad773d39b775d4604546bc57a

8 years agoAdd missing "finish_test" command to vacuum5.test.
dan [Mon, 12 Sep 2016 13:32:37 +0000 (13:32 +0000)] 
Add missing "finish_test" command to vacuum5.test.

FossilOrigin-Name: 02f40c3b934ba79f2d45eae3781f2bea0c69c95f

8 years agoHave releasetest.tcl delete all test files except for "testfixture", "testfixture...
dan [Mon, 12 Sep 2016 09:28:21 +0000 (09:28 +0000)] 
Have releasetest.tcl delete all test files except for "testfixture", "testfixture.exe", "sqlite3", "sqlite3.exe", "test.log" and "test-out.txt" after each test run is finished. Passing the "--keep" option restores the old behaviour.

FossilOrigin-Name: e0e042dca98f29c060f76db079afecb3200ffae5

8 years agoChanges to give a warning-free build with SQLITE_OMIT_INCRBLOB and
drh [Sat, 10 Sep 2016 19:51:40 +0000 (19:51 +0000)] 
Changes to give a warning-free build with SQLITE_OMIT_INCRBLOB and
SQLITE_OMIT_SHARED_CACHE.

FossilOrigin-Name: 711c59171b22df04224183a713e6c36e0bb3bba8

8 years agoAdd test code to delete an SQLite database and its auxiliary files.
dan [Sat, 10 Sep 2016 14:43:07 +0000 (14:43 +0000)] 
Add test code to delete an SQLite database and its auxiliary files.

FossilOrigin-Name: 8a9d128119fde36c175735be56876d30e5c8586f

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 agoRemove an unnecessary call to sqlite3VdbeMemExpandBlob() when casting to
drh [Fri, 9 Sep 2016 20:23:59 +0000 (20:23 +0000)] 
Remove an unnecessary call to sqlite3VdbeMemExpandBlob() when casting to
text.

FossilOrigin-Name: 19e2e5950541f1a93eed994cc2b1eaf64b68e858

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 agoPerformance improvements to the comparison operators in the bytecode engine.
drh [Fri, 9 Sep 2016 19:33:00 +0000 (19:33 +0000)] 
Performance improvements to the comparison operators in the bytecode engine.

FossilOrigin-Name: 37803b19d219f4107f29b240d5d314600e4bd236

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 agoRemove an extra space before function names in the amalgamation. callbackConv
mistachkin [Thu, 8 Sep 2016 23:16:02 +0000 (23:16 +0000)] 
Remove an extra space before function names in the amalgamation.

FossilOrigin-Name: 20f3c7436f6a8a7bab3968adc010c7c8325e4618

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 agoSync up the MSVC makefiles.
mistachkin [Mon, 5 Sep 2016 20:46:02 +0000 (20:46 +0000)] 
Sync up the MSVC makefiles.

FossilOrigin-Name: f66d0d8cf6976c62f7bc0e9390b09fb9976178c1

8 years agoMerge updates from trunk.
mistachkin [Mon, 5 Sep 2016 20:40:38 +0000 (20:40 +0000)] 
Merge updates from trunk.

FossilOrigin-Name: ea635bf97edb35b95b34adcb63f726f3573b1c4d

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