]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
11 years agoFix harmless compiler warnings.
drh [Mon, 15 Jun 2015 14:43:25 +0000 (14:43 +0000)] 
Fix harmless compiler warnings.

FossilOrigin-Name: b0badb99023e23bef0e2064cec58f2b279af0c0b

11 years agoImproved detection of database corruption in freeSpace().
drh [Mon, 15 Jun 2015 12:58:15 +0000 (12:58 +0000)] 
Improved detection of database corruption in freeSpace().

FossilOrigin-Name: 29bcb56887f862a1f06677a7b4bfae6475d29732

11 years agoComment typo fix. No code changes.
drh [Mon, 15 Jun 2015 10:49:01 +0000 (10:49 +0000)] 
Comment typo fix.  No code changes.

FossilOrigin-Name: 17f185adb960b1fa4faa13cdf685b92a20a52072

11 years agoOmit mutex calls in pcache1 when the mutex is NULL, for a significant
drh [Sat, 13 Jun 2015 11:19:47 +0000 (11:19 +0000)] 
Omit mutex calls in pcache1 when the mutex is NULL, for a significant
performance improvement.

FossilOrigin-Name: caf8f574e5c64da461c6dfba8a06cf3fb18aaa42

11 years agoAvoid unnecessary mutex usage in pcache1, for a significant speedup. faster-pcache1-fetch
drh [Sat, 13 Jun 2015 11:10:55 +0000 (11:10 +0000)] 
Avoid unnecessary mutex usage in pcache1, for a significant speedup.

FossilOrigin-Name: dcf4fb8d764611de60afea27cda0a8548ba7ca82

11 years agoAdd a fast-path implementation of pcache1Fetch() for the common case of
drh [Fri, 12 Jun 2015 13:49:26 +0000 (13:49 +0000)] 
Add a fast-path implementation of pcache1Fetch() for the common case of
separate caches that do not use a mutex.

FossilOrigin-Name: 760700edb3ff1f5d6bf3058f874cc8e2808905c7

11 years agoMinor performance optimization in pcache1.c.
drh [Fri, 12 Jun 2015 13:04:51 +0000 (13:04 +0000)] 
Minor performance optimization in pcache1.c.

FossilOrigin-Name: 2e8ad2ead9d146e312c693d9b967bbd5b92429d9

11 years agoAdd the OP_ColumnsUsed opcode (when compiled with
drh [Fri, 12 Jun 2015 12:54:15 +0000 (12:54 +0000)] 
Add the OP_ColumnsUsed opcode (when compiled with
SQLITE_ENABLE_COLUMN_USED_MASK) as a hint to the b-tree layer as to which
columns of a btree cursor will be used.

FossilOrigin-Name: 711a176cbfad5dde6defa9648fba6d0d663af134

11 years agoMerge recent trunk enhancements and fixes.
drh [Thu, 11 Jun 2015 18:01:29 +0000 (18:01 +0000)] 
Merge recent trunk enhancements and fixes.

FossilOrigin-Name: c39cb0e2571f58c87053de009e2c135d71b2c3af

11 years agoAdd the sqlite3changegroup_xxx() APIs to the sessions module. For combining multiple...
dan [Thu, 11 Jun 2015 17:26:10 +0000 (17:26 +0000)] 
Add the sqlite3changegroup_xxx() APIs to the sessions module. For combining multiple changesets or patchsets.

FossilOrigin-Name: 0c1a901cd60e557fc676b97625243163dfe9be9d

11 years agoRemove stray outputs from the test suite.
drh [Thu, 11 Jun 2015 14:19:05 +0000 (14:19 +0000)] 
Remove stray outputs from the test suite.

FossilOrigin-Name: afc6db9b105f32110112b877f06091757888a5f2

11 years agoWhen generating code for partial indexes, be sure not to modify the
drh [Thu, 11 Jun 2015 13:58:35 +0000 (13:58 +0000)] 
When generating code for partial indexes, be sure not to modify the
index condition expression in the schema.

FossilOrigin-Name: e63d01c69c3e50f49ee3022a519c4f3e91f00520

11 years agoMore test output refinements. testerOutput
mistachkin [Wed, 10 Jun 2015 23:02:38 +0000 (23:02 +0000)] 
More test output refinements.

FossilOrigin-Name: e64a5681793238fa04fe3636f48d34b2dd36cdfa

11 years agoRemove possibly stray output from various tests.
mistachkin [Wed, 10 Jun 2015 22:51:02 +0000 (22:51 +0000)] 
Remove possibly stray output from various tests.

FossilOrigin-Name: f38e0be56fc086a3ce08134ade83ab61c9fca106

11 years agoFix minor typo in the quicktest MSVC makefile target.
mistachkin [Wed, 10 Jun 2015 22:03:40 +0000 (22:03 +0000)] 
Fix minor typo in the quicktest MSVC makefile target.

FossilOrigin-Name: 75b65f9d49daaf48e97042cb82ea554e2ec74eec

11 years ago"test" targets on all makefiles use --verbose=file --output=test-out.txt.
drh [Wed, 10 Jun 2015 18:53:09 +0000 (18:53 +0000)] 
"test" targets on all makefiles use --verbose=file --output=test-out.txt.
Add the new "quicktest" target to all makefiles - designed to run in under
three minutes.  The --quick option on releasetest.tcl now uses quicktest.

FossilOrigin-Name: 6ddef2ad35ceb5822fc14c65bc7c6a2662edb63c

11 years agoAvoid passing constraints that are unusable due to LEFT or CROSS joins to virtual...
dan [Wed, 10 Jun 2015 14:27:40 +0000 (14:27 +0000)] 
Avoid passing constraints that are unusable due to LEFT or CROSS joins to virtual table xBestIndex() methods.

FossilOrigin-Name: 7b446771cadedafbe8924ad0658adc2597816dc7

11 years agoFix the fts5 xRename() method.
dan [Wed, 10 Jun 2015 10:45:34 +0000 (10:45 +0000)] 
Fix the fts5 xRename() method.

FossilOrigin-Name: 0f7fd51325875fbf0f1eaca3bbbd170ef99c4208

11 years agoAdd the "columnsize=" option to fts5, similar to fts4's "matchinfo=fts3".
dan [Tue, 9 Jun 2015 20:58:39 +0000 (20:58 +0000)] 
Add the "columnsize=" option to fts5, similar to fts4's "matchinfo=fts3".

FossilOrigin-Name: aa12f9d9b79c2f523fd6b00e47bcb66dba09ce0c

11 years agoAdd the --output=$file and --verbose=(0|1|file) options to tester.tcl.
dan [Tue, 9 Jun 2015 15:58:28 +0000 (15:58 +0000)] 
Add the --output=$file and --verbose=(0|1|file) options to tester.tcl.

FossilOrigin-Name: f7b2c70362f10ee0347c1d2318918ffefa53243d

11 years agoRemove some repeated lines of source code. Probably introduced by careless cut'n... vtab-left-join
dan [Tue, 9 Jun 2015 10:58:51 +0000 (10:58 +0000)] 
Remove some repeated lines of source code. Probably introduced by careless cut'n'pasting.

FossilOrigin-Name: a34cd71c8aafaece04a2332a127e9b8e99c1403c

11 years agoAdd the valgrindfuzz target to unix makefile.
drh [Mon, 8 Jun 2015 19:15:50 +0000 (19:15 +0000)] 
Add the valgrindfuzz target to unix makefile.

FossilOrigin-Name: e62aed01f1a6dbc12d6e21386c1671eb640b8d49

11 years agoIf a query contains "FROM t1 LEFT JOIN t2, t3, t4", ensure that tables t3 and t4...
dan [Mon, 8 Jun 2015 18:48:29 +0000 (18:48 +0000)] 
If a query contains "FROM t1 LEFT JOIN t2, t3, t4", ensure that tables t3 and t4 are not scanned before t2. The trunk already does this.

FossilOrigin-Name: 0d9edfab9fb61322620f188b48ae2a1798a07581

11 years agoAvoid passing constraints that are unusable due to LEFT or CROSS joins to virtual...
dan [Mon, 8 Jun 2015 18:05:54 +0000 (18:05 +0000)] 
Avoid passing constraints that are unusable due to LEFT or CROSS joins to virtual table xBestIndex() methods.

FossilOrigin-Name: 80ee56dda7db3860f8be5f6968c8745138f8453f

11 years agoFix typo in comment. No changes to code.
mistachkin [Mon, 8 Jun 2015 17:42:57 +0000 (17:42 +0000)] 
Fix typo in comment.  No changes to code.

FossilOrigin-Name: e49c291735e613e384f6da044ef865dd274cabc8

11 years agoSplit out some source code into new files: wherecode.c, whereexpr.c, and
drh [Mon, 8 Jun 2015 17:40:30 +0000 (17:40 +0000)] 
Split out some source code into new files: wherecode.c, whereexpr.c, and
treeview.c.  Other minor refactoring changes.

FossilOrigin-Name: 50f336818c8509d8b8bde282e9399d2b2b5ea70a

11 years agoFactor out the TreeView parse tree printing module into a separate file.
drh [Mon, 8 Jun 2015 15:08:15 +0000 (15:08 +0000)] 
Factor out the TreeView parse tree printing module into a separate file.

FossilOrigin-Name: c32ce54ca46a4be4373983be6fd44b1f3a0250d1

11 years agoSplit more subfunctions of where.c out into a new whereexpr.c source file,
drh [Mon, 8 Jun 2015 14:23:15 +0000 (14:23 +0000)] 
Split more subfunctions of where.c out into a new whereexpr.c source file,
for improved maintainability.

FossilOrigin-Name: 46ef95c108ad8961f2bf3d2dc839d4fb1fddd770

11 years agoSplit out the bulk of the actual VDBE code generation logic from where.c
drh [Sat, 6 Jun 2015 20:12:09 +0000 (20:12 +0000)] 
Split out the bulk of the actual VDBE code generation logic from where.c
into a new file, leaving behind the analysis logic.  This makes the original
where.c smaller and hopefully easier to edit.

FossilOrigin-Name: faa0e420e93a2bc1c84df9eb9fef4748d29ce339

11 years agoFix a comment in fts5.h.
dan [Sat, 6 Jun 2015 19:23:32 +0000 (19:23 +0000)] 
Fix a comment in fts5.h.

FossilOrigin-Name: e964b5877497b16cf985d3d847e82529bb3fa4a3

11 years agoCode simplifications in select.c and where.c.
drh [Sat, 6 Jun 2015 18:30:17 +0000 (18:30 +0000)] 
Code simplifications in select.c and where.c.

FossilOrigin-Name: 4f20ac90bce8bd7ba43ef59af5cc4ef7aa282fe8

11 years agoFix handling of fts5 rowid constraints in the absence of a MATCH clause. Add tests...
dan [Sat, 6 Jun 2015 16:28:29 +0000 (16:28 +0000)] 
Fix handling of fts5 rowid constraints in the absence of a MATCH clause. Add tests to cover recently added branches.

FossilOrigin-Name: 3a9cb648138a059862fb438c0787fdd888f5e88e

11 years agoMinor cleanup of the sqlite3Select() procedure.
drh [Sat, 6 Jun 2015 00:18:01 +0000 (00:18 +0000)] 
Minor cleanup of the sqlite3Select() procedure.

FossilOrigin-Name: f4c90d06bb941453d8110680c7b279e471e8f034

11 years agoSplit FROM-clause subquery flattening and code generation into separate loops.
drh [Fri, 5 Jun 2015 22:33:39 +0000 (22:33 +0000)] 
Split FROM-clause subquery flattening and code generation into separate loops.

FossilOrigin-Name: be8e3fc70e4c13b28b07985df3457960f58ffddd

11 years agoProvide one final Select tree dump prior to WHERE clause analysis
drh [Fri, 5 Jun 2015 20:27:26 +0000 (20:27 +0000)] 
Provide one final Select tree dump prior to WHERE clause analysis
when ".selecttrace 0x400" tracing bit is set with SELECTTRACE_ENABLED.
Analysis and debug changes only - normal builds are unaffected.

FossilOrigin-Name: 283bf0b64da7acc5aa5812fc659954965002d409

11 years agoMake use of range constraints on the rowid field of an fts5 table in full-text queries.
dan [Fri, 5 Jun 2015 19:05:57 +0000 (19:05 +0000)] 
Make use of range constraints on the rowid field of an fts5 table in full-text queries.

FossilOrigin-Name: 32cbc0ed3699cc21302f0b6a159493117ad4bd4f

11 years agoAdd a new opcode to the VDBE that gives the b-tree a hint about the set column-usage-hint
drh [Fri, 5 Jun 2015 15:59:57 +0000 (15:59 +0000)] 
Add a new opcode to the VDBE that gives the b-tree a hint about the set
of columns in a table or index that are actually used by the query.

FossilOrigin-Name: f167bba446b78dd7538d0b2bae3e6678f3b1ba28

11 years agoChange the name of SrcList.a[].zIndex to the more descriptive
drh [Thu, 4 Jun 2015 12:08:53 +0000 (12:08 +0000)] 
Change the name of SrcList.a[].zIndex to the more descriptive
SrcList.a[0].zIndexedBy.

FossilOrigin-Name: 6a9cf063379118dbb95c6cdc6d60af50e9867177

11 years agoFix an fts5 problem in extracting columns from position lists containing large varints.
dan [Wed, 3 Jun 2015 11:23:30 +0000 (11:23 +0000)] 
Fix an fts5 problem in extracting columns from position lists containing large varints.

FossilOrigin-Name: 4ea015ab983300d420ef104cca550b22a6395866

11 years agoChange the fts5 multi-column syntax to use parenthesis instead of square brackets.
dan [Tue, 2 Jun 2015 19:38:15 +0000 (19:38 +0000)] 
Change the fts5 multi-column syntax to use parenthesis instead of square brackets.

FossilOrigin-Name: ab85a6fc4f7580278fc9d1f0090fdcf0a90d065b

11 years agoAlways check for cell overflow before returning a slot from the
drh [Tue, 2 Jun 2015 19:36:29 +0000 (19:36 +0000)] 
Always check for cell overflow before returning a slot from the
pageFindSlot routine in btree.c.

FossilOrigin-Name: 9f035c45a4b84203e67b6e1b23cf11691dc43f1e

11 years agoFor FROM-clause subqueries that cannot be flattened, try to push relevant
drh [Tue, 2 Jun 2015 18:09:18 +0000 (18:09 +0000)] 
For FROM-clause subqueries that cannot be flattened, try to push relevant
WHERE clause terms of the outer query down into the subquery in order to help
the subquery run faster and/or use less memory.

FossilOrigin-Name: 6df18e949d3676290785143993513ea1b917d729

11 years agoMerge latest trunk changes with this branch.
dan [Tue, 2 Jun 2015 18:07:58 +0000 (18:07 +0000)] 
Merge latest trunk changes with this branch.

FossilOrigin-Name: c9ffda4abb4390bbc5719e269196e2807b254f97

11 years agoReimplement [ec69e09a] so that each call to the xNext() method does not involve two...
dan [Tue, 2 Jun 2015 17:57:01 +0000 (17:57 +0000)] 
Reimplement [ec69e09a] so that each call to the xNext() method does not involve two iterations of the match expression tree (only one).

FossilOrigin-Name: 80fe305b3eefb17310a9d6185d1c8cd73ee38b1e

11 years agoAdd test cases for type affinity rules.
drh [Tue, 2 Jun 2015 17:25:05 +0000 (17:25 +0000)] 
Add test cases for type affinity rules.

FossilOrigin-Name: 9678646d9a14ba283a83839be329599a676a537a

11 years agoRename SQLITE_AFF_NONE to SQLITE_AFF_BLOB to avoid confusion with
drh [Tue, 2 Jun 2015 16:19:56 +0000 (16:19 +0000)] 
Rename SQLITE_AFF_NONE to SQLITE_AFF_BLOB to avoid confusion with
"no affinity".

FossilOrigin-Name: 29ad9e917330969810ac1bc685bba4282401bdae

11 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

11 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

11 years agoAdd the "finish_test" command to the end of new test script sessionE.test.
dan [Tue, 2 Jun 2015 09:20:46 +0000 (09:20 +0000)] 
Add the "finish_test" command to the end of new test script sessionE.test.

FossilOrigin-Name: fb3914070791c84b5f323b7359ac845246d8a844

11 years agoModify the sessions module to ignore all operations on tables with no primary keys...
dan [Tue, 2 Jun 2015 09:19:22 +0000 (09:19 +0000)] 
Modify the sessions module to ignore all operations on tables with no primary keys as documented.

FossilOrigin-Name: bdaf9575cd9ebb33dc5da4062a84bca79e7b0fec

11 years agoFor FROM-clause subqueries that cannot be flattened, try to push WHERE clause subquery-opt
drh [Mon, 1 Jun 2015 20:28:03 +0000 (20:28 +0000)] 
For FROM-clause subqueries that cannot be flattened, try to push WHERE clause
terms of the outer query down into the subquery in order to help the subquery
run faster and/or use less memory.

FossilOrigin-Name: 297fae7551a2af9e600d833801ff79fca0602ad5

11 years agoImprove performance of the fts5 AND operator.
dan [Mon, 1 Jun 2015 19:17:06 +0000 (19:17 +0000)] 
Improve performance of the fts5 AND operator.

FossilOrigin-Name: b43e9a5b7a0483ccb102316a4dbc5e32b5bc69ec

11 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

11 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

11 years agoChange fts5 expression processing to avoid linear scans of long doclists caused by...
dan [Mon, 1 Jun 2015 09:15:20 +0000 (09:15 +0000)] 
Change fts5 expression processing to avoid linear scans of long doclists caused by phrases that match specific columns only.

FossilOrigin-Name: ec69e09a55b4daf1c40aeaaf9ee95091fe86f5c0

11 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

11 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

11 years agoRemove the "#include sqlite3Int.h" from fts5Int.h.
dan [Sat, 30 May 2015 11:49:58 +0000 (11:49 +0000)] 
Remove the "#include sqlite3Int.h" from fts5Int.h.

FossilOrigin-Name: e008c3c8e29c843ec945ddad54b9688bbf2bdb44

11 years agoImport recent enhancements from trunk.
drh [Fri, 29 May 2015 19:04:58 +0000 (19:04 +0000)] 
Import recent enhancements from trunk.

FossilOrigin-Name: 54bec164ebeaf62d783352b3c4d0de8845394091

11 years agoAdd extra tests and fixes for multi-column matches.
dan [Fri, 29 May 2015 19:00:22 +0000 (19:00 +0000)] 
Add extra tests and fixes for multi-column matches.

FossilOrigin-Name: ae6794ffa23ef6191bd8834422abf322d978c11b

11 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

11 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

11 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

11 years agoAdd syntax to fts5 used to specify that a phrase or NEAR group should match a subset...
dan [Fri, 29 May 2015 15:55:30 +0000 (15:55 +0000)] 
Add syntax to fts5 used to specify that a phrase or NEAR group should match a subset of columns. For example "[col1 col2 ...] : <phrase>".

FossilOrigin-Name: 0fc0ea20920615f3e48ea2dbe2b7dcd979b0993e

11 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

11 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

11 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

11 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

11 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

11 years agoOptimizations for fts5 queries that match against a specific column.
dan [Thu, 28 May 2015 19:57:12 +0000 (19:57 +0000)] 
Optimizations for fts5 queries that match against a specific column.

FossilOrigin-Name: b29ac50af0491a780a5a4c0985d88d0e5e014ba3

11 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

11 years agoRemove some dead code from fts5. Add auxiliary function api tests to the same.
dan [Thu, 28 May 2015 14:37:26 +0000 (14:37 +0000)] 
Remove some dead code from fts5. Add auxiliary function api tests to the same.

FossilOrigin-Name: 0f9df202cc58097afddb8dad662b7c7fdc2c7d0c

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 years agoSimplifications and minor optimizations to fts5 prefix queries that cannot use a...
dan [Tue, 26 May 2015 18:22:01 +0000 (18:22 +0000)] 
Simplifications and minor optimizations to fts5 prefix queries that cannot use a prefix index.

FossilOrigin-Name: aef89d9f6aa536efee347367558cf5d4ea81b238

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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