]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
10 years agoAdd the built-in affinity() SQL function. This turns out to be not as useful affinity-func
drh [Tue, 2 Jun 2015 16:09:58 +0000 (16:09 +0000)] 
Add the built-in affinity() SQL function.  This turns out to be not as useful
as originally envisioned, so abandon it on a branch.

FossilOrigin-Name: 80889306bf57b886a248b880bc90197b8975a666

10 years agoRename SQLITE_AFF_NONE to SQLITE_AFF_BLOB. blob-affinity-rename
drh [Tue, 2 Jun 2015 15:32:08 +0000 (15:32 +0000)] 
Rename SQLITE_AFF_NONE to SQLITE_AFF_BLOB.

FossilOrigin-Name: bce3f04186cd2d69414a5a98b5b77dc8f060554a

10 years agoFix a faulty assert() in btree.c. Update the database fuzz test file with
drh [Tue, 2 Jun 2015 14:02:18 +0000 (14:02 +0000)] 
Fix a faulty assert() in btree.c.  Update the database fuzz test file with
new test cases.

FossilOrigin-Name: 4e621af1345a001360938de76e3b0a14deb5e991

10 years agoCorrections to comments in expr.c. No code changes.
drh [Mon, 1 Jun 2015 18:13:16 +0000 (18:13 +0000)] 
Corrections to comments in expr.c.  No code changes.

FossilOrigin-Name: f925389eaf5bf8962a28fcaa652b75caa606efba

10 years agoTypo fixes and additional background information in README.md.
drh [Mon, 1 Jun 2015 11:10:39 +0000 (11:10 +0000)] 
Typo fixes and additional background information in README.md.

FossilOrigin-Name: 9b8e5823bccf69f5cdedd8655e75df6e9718b809

10 years agoUpdates to configure.ac to help it find where the TCL libraries hidden
drh [Sat, 30 May 2015 22:57:49 +0000 (22:57 +0000)] 
Updates to configure.ac to help it find where the TCL libraries hidden
on Ubuntu 14.04.

FossilOrigin-Name: c864ff912db8bc0a3c3ecc1ceac61a25332e76c5

10 years agoFix minor typo in comment. No changes to code.
mistachkin [Sat, 30 May 2015 22:05:17 +0000 (22:05 +0000)] 
Fix minor typo in comment.  No changes to code.

FossilOrigin-Name: 73fc058b3a74c1b018cff990de793f19a602c12f

10 years agoEnsure that allocateBtreePage() always clears the MemPage pointer when
drh [Fri, 29 May 2015 18:42:11 +0000 (18:42 +0000)] 
Ensure that allocateBtreePage() always clears the MemPage pointer when
it fails due to an I/O or memory allocation error.

FossilOrigin-Name: 09a38bf665902834936d39341627ded88142e6ae

10 years agoMove two unreachable conditionals inside of NEVER() or assert().
drh [Fri, 29 May 2015 17:51:16 +0000 (17:51 +0000)] 
Move two unreachable conditionals inside of NEVER() or assert().

FossilOrigin-Name: db4e9728fae5f7b0fad6aa0a5be317a7c9e7c417

10 years agoRemove a corruption test in balance_nonroot that is superceded by a prior
drh [Fri, 29 May 2015 17:13:14 +0000 (17:13 +0000)] 
Remove a corruption test in balance_nonroot that is superceded by a prior
better check.

FossilOrigin-Name: 00693682d8664fa608ba43684f6376a9bd5b84eb

10 years agoOmit the rowallock.test script (Read-Only WAL lock) from the
drh [Fri, 29 May 2015 15:15:40 +0000 (15:15 +0000)] 
Omit the rowallock.test script (Read-Only WAL lock) from the
inmemory_journal permutation.

FossilOrigin-Name: d21db3308996510ffc3c869c2ac093de70d03412

10 years agoAdd support for automatic indexes on FROM-clause subqueries that are
drh [Fri, 29 May 2015 14:47:18 +0000 (14:47 +0000)] 
Add support for automatic indexes on FROM-clause subqueries that are
implemented via co-routine.

FossilOrigin-Name: 020b8b106fc8f840f6b506e1c9c3bc75676daec3

10 years agoAdd some extra source-code comments and a test case. coroutine-autoindex
drh [Fri, 29 May 2015 14:36:30 +0000 (14:36 +0000)] 
Add some extra source-code comments and a test case.

FossilOrigin-Name: 6d410442fb532e2cf0ad1859bc9e843651f8ff4d

10 years agoAn attempt to allow automatic index creation on subqueries accessed via
drh [Fri, 29 May 2015 13:55:33 +0000 (13:55 +0000)] 
An attempt to allow automatic index creation on subqueries accessed via
co-routine.

FossilOrigin-Name: 521345add67e9dfd7df1446eb942aa0d84b9e6eb

10 years agoUsing "SELECT ALL" instead of just "SELECT" on a query that uses a single
drh [Fri, 29 May 2015 01:35:19 +0000 (01:35 +0000)] 
Using "SELECT ALL" instead of just "SELECT" on a query that uses a single
unflattenable subquery or view in its FROM clause will force the subquery to
be manifested into a temporary table rather than run incrementally using a
co-routine.  This is a stop-gap means of controlling the decision to manifest
while we try to work out a better to make that decision automatically.

FossilOrigin-Name: a29e117d7ecec05da949348689dbfb0d3acb1280

10 years agoAdded comments and testcase() macros to error cases in the btree search.
drh [Thu, 28 May 2015 15:14:32 +0000 (15:14 +0000)] 
Added comments and testcase() macros to error cases in the btree search.

FossilOrigin-Name: 7da7dc714bf1fe34b38fc33a923490dfd3e4f070

10 years agoEarlier detection of incompatible sibling pages in balance_nonroot.
drh [Thu, 28 May 2015 11:23:11 +0000 (11:23 +0000)] 
Earlier detection of incompatible sibling pages in balance_nonroot.

FossilOrigin-Name: 60a09f17d8b70dbc4b020586a1b81bce76882729

10 years agoAdd new test cases to the fuzzdata3.db set of database fuzz tests.
drh [Thu, 28 May 2015 03:45:03 +0000 (03:45 +0000)] 
Add new test cases to the fuzzdata3.db set of database fuzz tests.

FossilOrigin-Name: 467b13a40171dd8462dc11d05bb1e9cb588e6a23

10 years agoAdd the btreeGetUnusedPage() routine to btree.c, and use it to detect content
drh [Thu, 28 May 2015 03:28:27 +0000 (03:28 +0000)] 
Add the btreeGetUnusedPage() routine to btree.c, and use it to detect content
pages on the freelist and to cause that condition to trigger an SQLITE_CORRUPT.

FossilOrigin-Name: fe15d1f70360d6fef8ef1a111dd43e060d059623

10 years agoDo not attempt to take any write lock on a read-only database on Windows.
drh [Thu, 28 May 2015 00:54:35 +0000 (00:54 +0000)] 
Do not attempt to take any write lock on a read-only database on Windows.

FossilOrigin-Name: a47ff0cdab0f82398c68ea770053f193f4812a51

10 years agoThe fuzzoomtest makefile target is no longer supported, so update
drh [Wed, 27 May 2015 19:35:08 +0000 (19:35 +0000)] 
The fuzzoomtest makefile target is no longer supported, so update
releasetest.tcl accordingly.

FossilOrigin-Name: 06959d4ada53b765cae4b192a691fced4b8aebbb

10 years agoFix a minor and harmless memory leak in fuzzcheck. Adjust the makefiles
drh [Wed, 27 May 2015 18:19:50 +0000 (18:19 +0000)] 
Fix a minor and harmless memory leak in fuzzcheck.  Adjust the makefiles
to run fuzzcheck with --quiet on valgrind tests.

FossilOrigin-Name: 8bfe834432b37f94779da6c71fc369651f024590

10 years agoAll bytes of a page are initialized, even bytes that follow a 2-byte cell
drh [Wed, 27 May 2015 18:13:35 +0000 (18:13 +0000)] 
All bytes of a page are initialized, even bytes that follow a 2-byte cell
on a malformed page.

FossilOrigin-Name: 7373a004ed0e2781cda503c73e9a94f24350ef79

10 years agoA different approach to preventing buffer overreads when comparing a vector
drh [Wed, 27 May 2015 15:42:53 +0000 (15:42 +0000)] 
A different approach to preventing buffer overreads when comparing a vector
of values with a corrupt index record that spans at least one overflow page.

FossilOrigin-Name: 95eaa49f4ee071c7a0f690a695f1f2d1ebca68a8

10 years agoDisallow the use of "rowid" in CTEs - it has never worked correctly and it
drh [Wed, 27 May 2015 15:10:20 +0000 (15:10 +0000)] 
Disallow the use of "rowid" in CTEs - it has never worked correctly and it
makes no sense, so we might as well make it an explicit error.
Also: add the PRAGMA cell_size_check=ON command.

FossilOrigin-Name: 19e2cebc12aaa4e72d3bad74af73575a0457e5d4

10 years agoA different approach to preventing buffer overreads when comparing a vector of values... avoid-buffer-overread
dan [Wed, 27 May 2015 14:21:05 +0000 (14:21 +0000)] 
A different approach to preventing buffer overreads when comparing a vector of values with a corrupt index record that spans at least one overflow page.

FossilOrigin-Name: 7e9e1b6123bc455dd7d1c894b6154ccd27acec18

10 years agoCTEs have never add working rowids. So disallow the use of the "rowid" column no-rowid-in-cte
drh [Wed, 27 May 2015 13:06:55 +0000 (13:06 +0000)] 
CTEs have never add working rowids.  So disallow the use of the "rowid" column
within CTEs.

FossilOrigin-Name: 0055df0445932a43e42b318ef88672dcbe312c3a

10 years agoAdd the "PRAGMA cell_size_check=ON" command. cell-size-check-pragma
drh [Wed, 27 May 2015 03:46:18 +0000 (03:46 +0000)] 
Add the "PRAGMA cell_size_check=ON" command.

FossilOrigin-Name: 2ead43f074d01312c7642e1df9abccc95547f019

10 years agoAvoid a buffer overread when comparing against a corrupt record that spans at least...
dan [Tue, 26 May 2015 20:31:20 +0000 (20:31 +0000)] 
Avoid a buffer overread when comparing against a corrupt record that spans at least one overflow page.

FossilOrigin-Name: 62a5b3633a086694ef0e579a0a82322cb1ae3d60

10 years agoAvoid branching on an uninitalized variable when comparing SQL values with the undefi...
dan [Tue, 26 May 2015 20:07:32 +0000 (20:07 +0000)] 
Avoid branching on an uninitalized variable when comparing SQL values with the undefined serial types 10 and 11 (which only appear in corrupt databases).

FossilOrigin-Name: b4a45d3b78fede2433ac18f20b1ab7bddee77059

10 years agoThe "make fuzztest" target now uses fuzzcheck instead of fuzzershell. Test
drh [Tue, 26 May 2015 19:08:14 +0000 (19:08 +0000)] 
The "make fuzztest" target now uses fuzzcheck instead of fuzzershell.  Test
data is added for database fuzz testing.

FossilOrigin-Name: 5e3e410bf49a29efbf9ff3ef048e158804ca0027

10 years agoMerge accidental fork. test-using-fuzzcheck
dan [Tue, 26 May 2015 19:01:36 +0000 (19:01 +0000)] 
Merge accidental fork.

FossilOrigin-Name: e85628e34ac684b8a23f49eee71e4d6546e0ef64

10 years agoFix a one-byte buffer overread that may follow a syntax error while preparing an...
dan [Tue, 26 May 2015 18:58:57 +0000 (18:58 +0000)] 
Fix a one-byte buffer overread that may follow a syntax error while preparing an SQL statement.

FossilOrigin-Name: 075003930da98419f671b7833a5850693529fb62

10 years agoFix fuzzcheck so that it responds correctly to the TEST_FAILURE environment
drh [Tue, 26 May 2015 18:58:32 +0000 (18:58 +0000)] 
Fix fuzzcheck so that it responds correctly to the TEST_FAILURE environment
variable.

FossilOrigin-Name: 76770c9e061e2eb106d7ea402eef888b98ba9d0e

10 years agoThe "make fuzztest" target now uses fuzzcheck instead of fuzzershell.
drh [Tue, 26 May 2015 18:15:08 +0000 (18:15 +0000)] 
The "make fuzztest" target now uses fuzzcheck instead of fuzzershell.

FossilOrigin-Name: 4a5f6f1f0128657fd8d4d99d0682edd5bac2a19e

10 years agoEnhance fuzzcheck with the ability to store descriptions in each source
drh [Tue, 26 May 2015 17:57:56 +0000 (17:57 +0000)] 
Enhance fuzzcheck with the ability to store descriptions in each source
database and to run multiple source databases in a single invocation.

FossilOrigin-Name: 193364c81c301a41c16835108d23ad2ab84d9dd7

10 years agoAdd a cast to one side of the test added by [97806a78] in order to avoid a signed...
dan [Tue, 26 May 2015 17:33:30 +0000 (17:33 +0000)] 
Add a cast to one side of the test added by [97806a78] in order to avoid a signed/unsigned comparison warning.

FossilOrigin-Name: 5b46d2a78a45de4176b666bfc89c2aaa6f083662

10 years agoAvoid using a zero-sized array within a struct in fts3 code.
dan [Tue, 26 May 2015 17:29:48 +0000 (17:29 +0000)] 
Avoid using a zero-sized array within a struct in fts3 code.

FossilOrigin-Name: b05cae36cedd98d59813e637f328a52eee7ef0d2

10 years agoFix another bug in the in-memory VFS for fuzzcheck.
drh [Tue, 26 May 2015 16:12:45 +0000 (16:12 +0000)] 
Fix another bug in the in-memory VFS for fuzzcheck.

FossilOrigin-Name: 16878a314baceb14632a3ec43187fcc020089a76

10 years agoUpdate test cases in corruptI.test so that they work with both SQLITE_ENABLE_OVERSIZE...
dan [Tue, 26 May 2015 14:57:45 +0000 (14:57 +0000)] 
Update test cases in corruptI.test so that they work with both SQLITE_ENABLE_OVERSIZE_CELL_CHECK and SQLITE_DEFAULT_AUTOVACUUM builds.

FossilOrigin-Name: 22a14663782312fa7f4f18545509ef4b27e9b8c1

10 years agoReturn SQLITE_CORRUPT to the user if an attempt is made to add database page 1 to...
dan [Tue, 26 May 2015 12:18:17 +0000 (12:18 +0000)] 
Return SQLITE_CORRUPT to the user if an attempt is made to add database page 1 to the free page list.

FossilOrigin-Name: 68876003f922635737349f55bc73a78891ea7028

10 years agoFix a problem with ignoring UNIQUE constraints on WITHOUT ROWID tables rendered redun...
dan [Tue, 26 May 2015 11:53:14 +0000 (11:53 +0000)] 
Fix a problem with ignoring UNIQUE constraints on WITHOUT ROWID tables rendered redundant by the PRIMARY KEY.

FossilOrigin-Name: 3b936913f3dc2cae4c94f983f28d85b136a44c9f

10 years agoSilence harmless compiler warnings when building the command line utilities with...
mistachkin [Tue, 26 May 2015 03:31:46 +0000 (03:31 +0000)] 
Silence harmless compiler warnings when building the command line utilities with MSVC.

FossilOrigin-Name: d26060c468cc6997e9933d9623a47fcc7d86c2da

10 years agoAdd fuzzcheck to makefile clean targets. Also, for consistency, replace a few tabs...
mistachkin [Tue, 26 May 2015 03:24:33 +0000 (03:24 +0000)] 
Add fuzzcheck to makefile clean targets.  Also, for consistency, replace a few tabs with spaces.

FossilOrigin-Name: eda2a437506f148bcb5bb33baa64b5ad8ae73ada

10 years agoAdd the --result-trace option to fuzzcheck, and other interface enhancements.
drh [Tue, 26 May 2015 00:28:08 +0000 (00:28 +0000)] 
Add the --result-trace option to fuzzcheck, and other interface enhancements.

FossilOrigin-Name: c415bb7bbfd531b138462589cdd58fa0204804e8

10 years agoFix an important bug in the xRead method of the in-memory VFS for fuzzcheck.
drh [Mon, 25 May 2015 23:14:37 +0000 (23:14 +0000)] 
Fix an important bug in the xRead method of the in-memory VFS for fuzzcheck.

FossilOrigin-Name: 58cd40e89f3060c63abb9a3fca385a1e72ce7bb4

10 years agoAdd the fuzzcheck test program.
drh [Mon, 25 May 2015 22:38:00 +0000 (22:38 +0000)] 
Add the fuzzcheck test program.

FossilOrigin-Name: 341cb6abe74e1e9d03c82ffdeba86be6a2d00397

10 years agoAdd fuzzcheck to all makefiles and fix compiler warnings. fuzzcheck
drh [Mon, 25 May 2015 22:29:26 +0000 (22:29 +0000)] 
Add fuzzcheck to all makefiles and fix compiler warnings.

FossilOrigin-Name: 7b3d21906a9650377cda56b94facdff75b2cb858

10 years agoMerge in trunk fixes.
drh [Mon, 25 May 2015 22:18:33 +0000 (22:18 +0000)] 
Merge in trunk fixes.

FossilOrigin-Name: c71c2e1a991775e1711e9621a59dd8a60eec329b

10 years agoImproved tracing capabilities in fuzzcheck.
drh [Mon, 25 May 2015 22:17:06 +0000 (22:17 +0000)] 
Improved tracing capabilities in fuzzcheck.

FossilOrigin-Name: 864bfdbfe7b196cc9df2136b15a28e2a0f2713cb

10 years agoAdd the --native-vfs option on fuzzcheck.
drh [Mon, 25 May 2015 21:59:05 +0000 (21:59 +0000)] 
Add the --native-vfs option on fuzzcheck.

FossilOrigin-Name: 12e95e3f178b89d649bc7e30db731df439ae1653

10 years agoFix a case of a corrupt database causing SQLite to read from up to 4 bytes before...
dan [Mon, 25 May 2015 20:04:15 +0000 (20:04 +0000)] 
Fix a case of a corrupt database causing SQLite to read from up to 4 bytes before the start of a memory allocation.

FossilOrigin-Name: 7d2c4f7b6695806ab8ce0c6f49d8bc1d77a4320b

10 years agoMerge the btree fixes out of trunk.
drh [Mon, 25 May 2015 19:37:17 +0000 (19:37 +0000)] 
Merge the btree fixes out of trunk.

FossilOrigin-Name: f3cd8cecf4f7aa3429e3ebc90ed31c4e8fff7bc2

10 years agoAdd the --dbid and --sqlid parameters to fuzzcheck. Other fuzzcheck fixes.
drh [Mon, 25 May 2015 19:35:42 +0000 (19:35 +0000)] 
Add the --dbid and --sqlid parameters to fuzzcheck.  Other fuzzcheck fixes.

FossilOrigin-Name: 75ec9299faca8ce3d49d825ba6ea60588a91d113

10 years agoHave the b-tree layer return SQLITE_CORRUPT to any attempt to open a cursor with...
dan [Mon, 25 May 2015 19:24:36 +0000 (19:24 +0000)] 
Have the b-tree layer return SQLITE_CORRUPT to any attempt to open a cursor with a root page number less than 1.

FossilOrigin-Name: aa18c8e9d1676b1caa53bc5f5c1dc5f201089b88

10 years agoFirst code for a new utility program to rerun checks on a large number of
drh [Mon, 25 May 2015 18:48:19 +0000 (18:48 +0000)] 
First code for a new utility program to rerun checks on a large number of
fuzzer-generated test cases.

FossilOrigin-Name: c5b4e363528aa1d2d5f41451f16de0aa91152b38

10 years agoFix a couple of btree asserts that would fail when encountering 32-bit rollover in...
dan [Mon, 25 May 2015 18:47:26 +0000 (18:47 +0000)] 
Fix a couple of btree asserts that would fail when encountering 32-bit rollover in cell payload size fields (cell payloads this large always indicate corruption).

FossilOrigin-Name: 8fa0937a2f3476dd280259e252d6f422c33d38ee

10 years agoFix a case where database corruption may cause SQLite to write past the end of a...
dan [Mon, 25 May 2015 17:07:29 +0000 (17:07 +0000)] 
Fix a case where database corruption may cause SQLite to write past the end of a buffer.

FossilOrigin-Name: 97806a78142b15f89878e25ee70dc5b0524d6793

10 years agoFix an assert() in btree routine freeSpace() that may be false if the database is...
dan [Mon, 25 May 2015 15:03:49 +0000 (15:03 +0000)] 
Fix an assert() in btree routine freeSpace() that may be false if the database is corrupt.

FossilOrigin-Name: 00a473c56188cd60a74559effb114140e3fe8a8d

10 years agoFix an fts4 matchinf() problem triggered by deferred tokens that are part of phrases...
dan [Mon, 25 May 2015 10:57:13 +0000 (10:57 +0000)] 
Fix an fts4 matchinf() problem triggered by deferred tokens that are part of phrases that are part of AND expressions.

FossilOrigin-Name: f1e942a1dda496a509741e9cc2a17e8b4dac63a3

10 years agoFix an obsolete comment - no changes to code.
drh [Mon, 25 May 2015 10:29:52 +0000 (10:29 +0000)] 
Fix an obsolete comment - no changes to code.

FossilOrigin-Name: 4e4228c47f862c7f1fb078bf1b8c1d604f09d365

10 years agoRemove an incorrect and pointless assert().
drh [Mon, 25 May 2015 09:33:48 +0000 (09:33 +0000)] 
Remove an incorrect and pointless assert().

FossilOrigin-Name: 8c3929bd42ff9c041df341aced5b7dbc0f563506

10 years agoThe assert() changes removed in the previous check-in are needed after all.
drh [Sun, 24 May 2015 21:46:03 +0000 (21:46 +0000)] 
The assert() changes removed in the previous check-in are needed after all.

FossilOrigin-Name: 336fccc84cd7b770c9c3720efc9976269096232e

10 years agoBetter detection of corruption in allocateSpace() in btree.c.
drh [Sun, 24 May 2015 21:09:52 +0000 (21:09 +0000)] 
Better detection of corruption in allocateSpace() in btree.c.

FossilOrigin-Name: bf7bb53ee2485a5342916d514d6c7291eb84c5f1

10 years agoDetect database corruption in the modifyPagePointer() routine and abort.
drh [Sun, 24 May 2015 10:18:12 +0000 (10:18 +0000)] 
Detect database corruption in the modifyPagePointer() routine and abort.

FossilOrigin-Name: 4f0bba42f904e505900be67b00179ebb1f24ed03

10 years agoInstead of early detection of corruption in balance_nonroot, simply ignore
drh [Sat, 23 May 2015 19:53:48 +0000 (19:53 +0000)] 
Instead of early detection of corruption in balance_nonroot, simply ignore
the error, as it is harmless and exceedingly uncommon.

FossilOrigin-Name: 7bbf9b3cd6ebf103ebd8347579aef721d0dcd2dc

10 years agoEarlier detection of a specific kind of corruption in the balance_nonroot()
drh [Sat, 23 May 2015 19:29:08 +0000 (19:29 +0000)] 
Earlier detection of a specific kind of corruption in the balance_nonroot()
routine.

FossilOrigin-Name: ee6dc9913a8733891576e6e298241f7440209c5e

10 years agoMinor documentation improvements. No changes to code.
drh [Sat, 23 May 2015 02:44:00 +0000 (02:44 +0000)] 
Minor documentation improvements.  No changes to code.

FossilOrigin-Name: e446d9ce0049b8ce0fd4f03205a0c32776fc76cd

10 years agoImproved error messages in fuzzershell when unable to open the database.
drh [Fri, 22 May 2015 23:50:19 +0000 (23:50 +0000)] 
Improved error messages in fuzzershell when unable to open the database.

FossilOrigin-Name: c404fcace83613a50015f15097b7f28123c221c3

10 years agoFix a bug in fuzzershell caused by an uninitialized local variable.
drh [Fri, 22 May 2015 23:45:56 +0000 (23:45 +0000)] 
Fix a bug in fuzzershell caused by an uninitialized local variable.

FossilOrigin-Name: 745deab87adc378a5376aaa9451fb9485bc2f4c4

10 years agoFix another bad assert() in btree - one that can be false on a corrupt database
drh [Fri, 22 May 2015 23:39:29 +0000 (23:39 +0000)] 
Fix another bad assert() in btree - one that can be false on a corrupt database
file.

FossilOrigin-Name: 89f0bbfde4d86a7b15e93aab9c487b4355c6fb2d

10 years agoFix incorrect validation of the size of the BLOB returned by a geometry
drh [Fri, 22 May 2015 23:17:28 +0000 (23:17 +0000)] 
Fix incorrect validation of the size of the BLOB returned by a geometry
function on the RHS of a MATCH operator in RTree.  The old code worked for
64-bit systems (by chance) but fails on 32-bit.

FossilOrigin-Name: 10cc44f5a63e6cadf6940bb7310a177ee7fa6ee2

10 years agoAdd the sqlite3_value_dup() and sqlite3_value_free() interfaces.
drh [Fri, 22 May 2015 21:12:59 +0000 (21:12 +0000)] 
Add the sqlite3_value_dup() and sqlite3_value_free() interfaces.
Use these interfaces to enhance R-Tree to add the
sqlite3_rtree_query_info.apSqlParam field.

FossilOrigin-Name: c1814242e6ce035d486cfbad5a1f4b49aa8898f3

10 years agoMake sure sqlite3_value_dup() works correctly even for sqlite3_value value-dup
drh [Fri, 22 May 2015 21:04:54 +0000 (21:04 +0000)] 
Make sure sqlite3_value_dup() works correctly even for sqlite3_value
objects that are marked SQLITE_STATIC.

FossilOrigin-Name: f332ffc39b7a17fd6254d8dc699293a57a508ba0

10 years agoFix minor issues with the sqlite3_value_dup() interface.
drh [Fri, 22 May 2015 19:55:10 +0000 (19:55 +0000)] 
Fix minor issues with the sqlite3_value_dup() interface.

FossilOrigin-Name: 95edcf5010ecb8edd8eb74279c4766f9b655d4a2

10 years agoUpdate with fixes and enhancements from trunk.
drh [Fri, 22 May 2015 18:40:48 +0000 (18:40 +0000)] 
Update with fixes and enhancements from trunk.

FossilOrigin-Name: 9605d008f5c763137e9734d033fe4510ca316858

10 years agoThe SRT_Table type for the SelectDest object is now just an SRT_EphemTab for
drh [Fri, 22 May 2015 17:29:27 +0000 (17:29 +0000)] 
The SRT_Table type for the SelectDest object is now just an SRT_EphemTab for
which the ephemeral table has already been allocated.

FossilOrigin-Name: b9727e6bbfc3c62c601227e86e62f2f39792fd1d

10 years agoHave r-tree prefer to use the constraint "col MATCH ?" over "rowid = ?".
dan [Fri, 22 May 2015 16:08:42 +0000 (16:08 +0000)] 
Have r-tree prefer to use the constraint "col MATCH ?" over "rowid = ?".

FossilOrigin-Name: b9fb95194d4f7c535f1d175fd2e18d69d76e8fc4

10 years agoFix two faulty assert statements discovered by fuzzing.
drh [Fri, 22 May 2015 13:09:50 +0000 (13:09 +0000)] 
Fix two faulty assert statements discovered by fuzzing.

FossilOrigin-Name: 799817bfb2bc95963c0e0d70063c4cb15c94ef74

10 years agoFix an assert in btree.c that can be false when using a corrupted database
drh [Fri, 22 May 2015 12:37:37 +0000 (12:37 +0000)] 
Fix an assert in btree.c that can be false when using a corrupted database
file.

FossilOrigin-Name: a6eb2a39357c35dc13d549ef86c785ff5c69938a

10 years agoAdd the --database option to the fuzzershell test program.
drh [Fri, 22 May 2015 11:38:22 +0000 (11:38 +0000)] 
Add the --database option to the fuzzershell test program.

FossilOrigin-Name: c6d5512f4b8b1237fa4cf5f3f2eae19b160bcf26

10 years agoAdd the sqlite3_value_dup() and sqlite3_value_free() interfaces. Use
drh [Wed, 20 May 2015 21:28:32 +0000 (21:28 +0000)] 
Add the sqlite3_value_dup() and sqlite3_value_free() interfaces.  Use
these interfaces to enhance R-Tree to add the
sqlite3_rtree_query_info.apSqlParam field.

FossilOrigin-Name: a7ee40c4fc62843ac5b96ba47ca14a66e8cd6961

10 years agoFix the initialization logic in CREATE TABLE AS so that the correct affinities
drh [Wed, 20 May 2015 17:36:49 +0000 (17:36 +0000)] 
Fix the initialization logic in CREATE TABLE AS so that the correct affinities
are applied to all values being inserted into the new table, even if the
RHS is a compound SELECT.  Fix for ticket [f2ad7de056ab1dc9200].

FossilOrigin-Name: 6a0cf3ce9e68d0127f9653232e588ed59d34eca5

10 years agoAdd a test case to verify that CREATE TABLE AS does not store INT values create-table-as-type-fix
drh [Wed, 20 May 2015 17:25:44 +0000 (17:25 +0000)] 
Add a test case to verify that CREATE TABLE AS does not store INT values
in TEXT columns.  Ticket [f2ad7de056ab1dc92].

FossilOrigin-Name: 0e45e8f1574ef19a43dbd118440ddbc5cec80ce7

10 years agoSimplification of the initialization code for CREATE TABLE AS.
drh [Wed, 20 May 2015 17:18:29 +0000 (17:18 +0000)] 
Simplification of the initialization code for CREATE TABLE AS.

FossilOrigin-Name: 937f659e8933011c44e822328a97cb5f0607c04d

10 years agoA proposed fix for the problem of CREATE TABLE AS generating a table that
drh [Wed, 20 May 2015 15:51:09 +0000 (15:51 +0000)] 
A proposed fix for the problem of CREATE TABLE AS generating a table that
has INTEGER values in a TEXT column.  Ticket [f2ad7de056ab1dc92].

FossilOrigin-Name: d5e2c1fc7625130a3cbacc95c28bb553a0119cb8

10 years agoFix handling of queries with VALUES on the left and UNION ALL SELECT on the
drh [Wed, 20 May 2015 00:15:27 +0000 (00:15 +0000)] 
Fix handling of queries with VALUES on the left and UNION ALL SELECT on the
right and a LIMIT clause.

FossilOrigin-Name: c403502cdce8b82e570e6fc49ab7f5144800c189

10 years agoEnhance the selecttrace display by showing Select.selFlags.
drh [Tue, 19 May 2015 23:56:07 +0000 (23:56 +0000)] 
Enhance the selecttrace display by showing Select.selFlags.

FossilOrigin-Name: 45d3893c6142ee1dfed48e26a13cf547da12468a

10 years agoFix the MSVC makefile so that it works with OTA. Fix a harmless compiler
drh [Tue, 19 May 2015 22:56:45 +0000 (22:56 +0000)] 
Fix the MSVC makefile so that it works with OTA.  Fix a harmless compiler
warning in FTS3.

FossilOrigin-Name: c7b16645307d6e46c4153693d6806269de64955f

10 years agoAllow R-Tree geometry functions to take 8-byte BLOB arguments which are
drh [Tue, 19 May 2015 22:20:48 +0000 (22:20 +0000)] 
Allow R-Tree geometry functions to take 8-byte BLOB arguments which are
passed directly through to the underlying callback, and which can be used
to pass pointers into the callback.

FossilOrigin-Name: b271ed56532a78323accc8a7cb348d55f95c350e

10 years agoEnsure that when the VM applies TEXT affinity to a value it discards any existing...
dan [Tue, 19 May 2015 19:44:25 +0000 (19:44 +0000)] 
Ensure that when the VM applies TEXT affinity to a value it discards any existing REAL or INTEGER value.

FossilOrigin-Name: f5d0ce80792d58ef424300f973f8876d835ed4ad

10 years agoRemove the sqlite3ota_open_v2() API. Add a new parameter to sqlite3ota_open() instead.
dan [Tue, 19 May 2015 17:48:11 +0000 (17:48 +0000)] 
Remove the sqlite3ota_open_v2() API. Add a new parameter to sqlite3ota_open() instead.

FossilOrigin-Name: c74e0bc481ce995f83ca8384e05dfbe068a0ae85

10 years agoMerge the ota-update branch with trunk.
dan [Tue, 19 May 2015 16:50:18 +0000 (16:50 +0000)] 
Merge the ota-update branch with trunk.

FossilOrigin-Name: 08e2864ed7c2d36410a248459061dcbd5576e145

10 years agoAdd a comment for SQLITE_FCNTL_OTA to sqlite.h.in. ota-update
dan [Tue, 19 May 2015 16:26:51 +0000 (16:26 +0000)] 
Add a comment for SQLITE_FCNTL_OTA to sqlite.h.in.

FossilOrigin-Name: efa20f8e41e9370f419f055efa941a8521c68c86

10 years agoAllow OTA update state data to be stored in a database separate from the OTA update...
dan [Tue, 19 May 2015 16:22:58 +0000 (16:22 +0000)] 
Allow OTA update state data to be stored in a database separate from the OTA update database.

FossilOrigin-Name: 5af8db56af457d60ea030d84666ca7fffb6821fe

10 years agoMerge latest trunk changes with this branch.
dan [Tue, 19 May 2015 14:14:57 +0000 (14:14 +0000)] 
Merge latest trunk changes with this branch.

FossilOrigin-Name: 6055a6725cb24469c10de9a04f3614dcc79193c6

10 years agoTransitive constraints should only work if operands have compatible
drh [Mon, 18 May 2015 12:28:09 +0000 (12:28 +0000)] 
Transitive constraints should only work if operands have compatible
affinities and collating sequences.

FossilOrigin-Name: 5df4056448fee1c766f8f79c735ed12abdce5101

10 years agoUse an ALWAY() on conditionals in the transitive constraint logic that are transitive-constraints
drh [Mon, 18 May 2015 12:18:37 +0000 (12:18 +0000)] 
Use an ALWAY() on conditionals in the transitive constraint logic that are
always true as far as we know.

FossilOrigin-Name: 204e567f68e4b3e069f04ca0643c6e5db781d39f

10 years agoRefinements to the determination of when an A==B term is an equivalence.
drh [Mon, 18 May 2015 11:34:52 +0000 (11:34 +0000)] 
Refinements to the determination of when an A==B term is an equivalence.
Add test cases.

FossilOrigin-Name: 6bfaf525cac2e0c0a4a3bd3a1fc7bf5bd3234303

10 years agoMake a hard copy of the results of a subquery lest the result of the
drh [Mon, 18 May 2015 04:24:27 +0000 (04:24 +0000)] 
Make a hard copy of the results of a subquery lest the result of the
subquery be referenced after a change to the table that generated the subquery
result.

FossilOrigin-Name: 9c0d80907b4dee8ee8f205c2ebdb759f5ba1d771