]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
5 years agoFix a buffer overread that could occur when running fts5 prefix queries inside a... branch-3.9
dan [Tue, 3 Sep 2019 19:29:38 +0000 (19:29 +0000)] 
Fix a buffer overread that could occur when running fts5 prefix queries inside a transaction.

FossilOrigin-Name: b584fd36f787e6d7926dd54ce7e2cfcfe6616030e4e05f42a5725173e8a8a680

5 years agoDisable the undocumented rtreenode() SQL function that is only used for testing,
drh [Tue, 3 Sep 2019 17:39:12 +0000 (17:39 +0000)] 
Disable the undocumented rtreenode() SQL function that is only used for testing,
except when doing a build that is specifically intended for testing.

FossilOrigin-Name: 7b4583f932ff0933280aa73ee69294b488f96d4f2bdc8422cd0136d944d9fb60

6 years agoAdd interfaces sqlite3_bind_pointer(), sqlite3_result_pointer(), and
dan [Wed, 19 Dec 2018 16:03:56 +0000 (16:03 +0000)] 
Add interfaces sqlite3_bind_pointer(), sqlite3_result_pointer(), and
sqlite3_value_pointer() used to safely move pointer values through SQL without
exposing underlying memory address information. Cherrypick from commit
[8201f4e1] on branch-3.18.

FossilOrigin-Name: 4cb67252d39fc537601f75532ec8271994aed8bae4d20ba48a3262b52ed004c0

6 years agoAdd extra defenses against strategically corrupt databases to fts3/4.
drh [Wed, 19 Dec 2018 01:57:20 +0000 (01:57 +0000)] 
Add extra defenses against strategically corrupt databases to fts3/4.

FossilOrigin-Name: 882ef4e39b5a2aae3786caef492c77af67693b5123ce9c40d99c10c55dc02f98

9 years agoVersion 3.9.3 version-3.9.3
drh [Thu, 31 Mar 2016 21:36:06 +0000 (21:36 +0000)] 
Version 3.9.3

FossilOrigin-Name: dfbfd34b3ff4d6da6f2db56e4664d7058f10c098

9 years agoEnhance the query planner so that IS and IS NULL operators are able to drive
drh [Thu, 31 Mar 2016 21:16:56 +0000 (21:16 +0000)] 
Enhance the query planner so that IS and IS NULL operators are able to drive
an index on a LEFT OUTER JOIN.

FossilOrigin-Name: f1e6bb952e691d504713f3f923f8019585dbd4aa

9 years agoVersion 3.9.2 version-3.9.2
drh [Mon, 2 Nov 2015 18:31:45 +0000 (18:31 +0000)] 
Version 3.9.2

FossilOrigin-Name: bda77dda9697c463c3d0704014d51627fceee328

9 years agoWhen creating an automatic-index on a sub-query, add a unique integer to the end...
drh [Mon, 2 Nov 2015 11:19:06 +0000 (11:19 +0000)] 
When creating an automatic-index on a sub-query, add a unique integer to the end of each index key to ensure the entire key is unique. Fix for [8a2adec1].

FossilOrigin-Name: c0c4b6b39648be9aa9b1e218e6d281ab17812536

9 years agoVersion 3.9.2
drh [Mon, 2 Nov 2015 11:10:13 +0000 (11:10 +0000)] 
Version 3.9.2

FossilOrigin-Name: c33a275bf1a0ea1021e723006a11bf0c3c36d59a

9 years agoIncrease the version number to 3.9.2.
drh [Sun, 1 Nov 2015 21:42:29 +0000 (21:42 +0000)] 
Increase the version number to 3.9.2.

FossilOrigin-Name: 14bd4fbf317130800db823610d440af80ae9b90b

9 years agoIf a table-constraint PRIMARY KEY lists a single column in single-quotes and
drh [Sun, 1 Nov 2015 21:35:04 +0000 (21:35 +0000)] 
If a table-constraint PRIMARY KEY lists a single column in single-quotes and
that column has type INTEGER, then make that column an integer primary key,
for historical compatibility.  Fix for ticket [ac661962a2aeab3c331].

FossilOrigin-Name: dab0e60768aa93edf44ff380198c64475fb2a67f

9 years agoVersion 3.9.1 version-3.9.1
drh [Fri, 16 Oct 2015 17:31:12 +0000 (17:31 +0000)] 
Version 3.9.1

FossilOrigin-Name: 767c1727fec4ce11b83f25b3f1bfcfe68a2c8b02

9 years agoCherrypick the json form-feed fix, and other #ifdef and build script changes
drh [Fri, 16 Oct 2015 15:56:27 +0000 (15:56 +0000)] 
Cherrypick the json form-feed fix, and other #ifdef and build script changes
to address minor issues that came to light after the 3.9.0 release.  Update
the version number to 3.9.0.  No logic changes except for the form-feed
bug-fix in json1 (ticket [57eec374ae1d0a1d4a]).

FossilOrigin-Name: 746fcd2fd412ddc27071827fb20eb6df0741dfb1

9 years agoVersion 3.9.0 version-3.9.0
drh [Wed, 14 Oct 2015 12:29:53 +0000 (12:29 +0000)] 
Version 3.9.0

FossilOrigin-Name: a721fc0d89495518fe5612e2e3bbc60befd2e90d

9 years agoAdd the missing 'extern "C" {...}' blocks to fts5.h and sqlite3rbu.h.
dan [Wed, 14 Oct 2015 10:56:34 +0000 (10:56 +0000)] 
Add the missing 'extern "C" {...}' blocks to fts5.h and sqlite3rbu.h.

FossilOrigin-Name: 47a2ce97d585e1760ffcf760c0de1753677d5713

9 years agoRemove the unused fts5ExprColsetTest() routine.
drh [Mon, 12 Oct 2015 22:31:02 +0000 (22:31 +0000)] 
Remove the unused fts5ExprColsetTest() routine.

FossilOrigin-Name: 9ecafc0c94102dca6da192f400278399464086fb

9 years agoFix a couple harmless compiler warnings.
mistachkin [Mon, 12 Oct 2015 22:20:29 +0000 (22:20 +0000)] 
Fix a couple harmless compiler warnings.

FossilOrigin-Name: 7f896a971c5953d5370215ecd834d1fb711b4263

9 years agoFurther tweaks to improve fts5 prefix query performance.
dan [Mon, 12 Oct 2015 19:12:29 +0000 (19:12 +0000)] 
Further tweaks to improve fts5 prefix query performance.

FossilOrigin-Name: 1c20c1c28b56411f106cf2f6961b3ad4b4d6f6c8

9 years agoChange all references to 3.8.12 into 3.9.0. Comment changes only - no
drh [Mon, 12 Oct 2015 04:56:12 +0000 (04:56 +0000)] 
Change all references to 3.8.12 into 3.9.0.  Comment changes only - no
changes to code.

FossilOrigin-Name: 6f2858f6817ca70c132f0437ac2f0f74deb273d2

9 years agoDetect and report circularly defined views even if the views have the
drh [Sun, 11 Oct 2015 20:39:46 +0000 (20:39 +0000)] 
Detect and report circularly defined views even if the views have the
columns defined in the CREATE VIEW statement.

FossilOrigin-Name: 9ab9c8c6d747647f8ade58c2c4812fc69a813368

9 years agoRemove an unreachable branch in the query flattener substitution logic.
drh [Sun, 11 Oct 2015 20:08:31 +0000 (20:08 +0000)] 
Remove an unreachable branch in the query flattener substitution logic.

FossilOrigin-Name: 46ee3453a31b5e793d5aaad471cec1b1a11ab2cf

9 years agoImproved substitution logic in the query flattener. Saves code space, and
drh [Sun, 11 Oct 2015 19:46:59 +0000 (19:46 +0000)] 
Improved substitution logic in the query flattener.  Saves code space, and
(more importantly) works correctly with table-valued functions.

FossilOrigin-Name: 3d0bd95e977db50c314d33ec292f99e0539d7b4a

9 years agoWork around a "security feature" bug in memcpy() on OpenBSD.
drh [Sat, 10 Oct 2015 16:41:28 +0000 (16:41 +0000)] 
Work around a "security feature" bug in memcpy() on OpenBSD.

FossilOrigin-Name: fab6f09044d033dd09ed8a22e06bc6a7851bbabf

9 years agoRemove another instance of strcpy() from FTS5, to mollify OpenBSD.
drh [Sat, 10 Oct 2015 15:57:20 +0000 (15:57 +0000)] 
Remove another instance of strcpy() from FTS5, to mollify OpenBSD.

FossilOrigin-Name: 35e6248abb4435a8b26d270092b856beff867406

9 years agoOmit the use of strcpy() in FTS5 since OpenBSD hates strcpy().
drh [Sat, 10 Oct 2015 15:11:49 +0000 (15:11 +0000)] 
Omit the use of strcpy() in FTS5 since OpenBSD hates strcpy().

FossilOrigin-Name: bc24a5bbfd95df3518611b221de69b73776111bc

9 years agoCompiler warning fixes: Rename some local variables from "j1" to avoid a
drh [Sat, 10 Oct 2015 14:41:28 +0000 (14:41 +0000)] 
Compiler warning fixes:  Rename some local variables from "j1" to avoid a
name collision with the j1() bessel function in the math library.  Omit a
dummy initializer that gcc 4.6.3 does not like.

FossilOrigin-Name: 9ddef84d432813f3ece8012047d08441caa3315d

9 years agoAdd some #ifdef-ery to json1.c to avoid a duplicate typedef when used in the
drh [Sat, 10 Oct 2015 14:00:37 +0000 (14:00 +0000)] 
Add some #ifdef-ery to json1.c to avoid a duplicate typedef when used in the
amalgamation, since some compilers become upset over duplicate typedefs.

FossilOrigin-Name: de28acd42f29693341feb884b7223cd3d2b96730

9 years agoThe previous fix to JSON1 was not complete. A few more tweaks are needed
drh [Fri, 9 Oct 2015 20:40:44 +0000 (20:40 +0000)] 
The previous fix to JSON1 was not complete.  A few more tweaks are needed
for correct handling of all oversized integers.

FossilOrigin-Name: 4a47f0177851721cdf6c981df962b6e8862372e7

9 years agoFix the JSON1 extension so that it renders integers outside the range
drh [Fri, 9 Oct 2015 18:21:43 +0000 (18:21 +0000)] 
Fix the JSON1 extension so that it renders integers outside the range
of -9223372036854775808 to +9223372036854775807 as floating-point numbers.

FossilOrigin-Name: ae736e35fb59c9aed33a8c805cf2ecdee528051f

9 years agoRemove fts5 sources from TESTSRC2 in main.mk as there is no SQLITE_TEST code in said...
dan [Fri, 9 Oct 2015 17:54:10 +0000 (17:54 +0000)] 
Remove fts5 sources from TESTSRC2 in main.mk as there is no SQLITE_TEST code in said files.

FossilOrigin-Name: c1840639b8ce8314602cd2396a324de8fac98dbe

9 years agoAdd --enable-fts5 and --enable-json1 options to the amalgamation autoconf package.
dan [Fri, 9 Oct 2015 14:37:15 +0000 (14:37 +0000)] 
Add --enable-fts5 and --enable-json1 options to the amalgamation autoconf package.

FossilOrigin-Name: 8a4e19888f512c3ee95aa3040924fc932fbdab1a

9 years agoIn the MSVC makefile, adjust the names of two nmake variables for consistency.
mistachkin [Fri, 9 Oct 2015 14:23:56 +0000 (14:23 +0000)] 
In the MSVC makefile, adjust the names of two nmake variables for consistency.

FossilOrigin-Name: 92aa4b6b6fbb83f965e4c4be0aa21a8b7e330ed8

9 years agoChange the version number of the next release to 3.9.0.
drh [Fri, 9 Oct 2015 13:42:52 +0000 (13:42 +0000)] 
Change the version number of the next release to 3.9.0.

FossilOrigin-Name: aa8fdadf2defed00a28366a3b35a3e2eefecf0ed

9 years agoAdd the JSON1 and FTS5 extensions to the amalgamation. Add new options
drh [Fri, 9 Oct 2015 13:39:51 +0000 (13:39 +0000)] 
Add the JSON1 and FTS5 extensions to the amalgamation.  Add new options
to ./configure: --enable-json1 and --enable-fts5.

FossilOrigin-Name: 1eb769933108cf401b25c8d784ea23f27324a0bd

9 years agoFix a typo in the MSVC Makefile amalg-json1-fts5
drh [Fri, 9 Oct 2015 13:29:27 +0000 (13:29 +0000)] 
Fix a typo in the MSVC Makefile

FossilOrigin-Name: c8a12082380991781b5ecd2f479ec65600f4f695

9 years agoAdd configure script options --enable-fts5 and --enable-json1. Automatically
drh [Fri, 9 Oct 2015 12:48:33 +0000 (12:48 +0000)] 
Add configure script options --enable-fts5 and --enable-json1.  Automatically
search for -lm when using --enable-fts5.

FossilOrigin-Name: a0c44f1d46f1f31043d66f20c8dc0df53db15c30

9 years agoMakefile and fts5 changes so that fts5 works with main.mk. Still does not work with...
dan [Fri, 9 Oct 2015 11:09:47 +0000 (11:09 +0000)] 
Makefile and fts5 changes so that fts5 works with main.mk. Still does not work with Makefile.in.

FossilOrigin-Name: 6ebac32d8378e46f44a6eb55aaa30baf4d7dde7d

9 years agoTrying to get FTS5 tests to build and run using main.mk. Not yet working.
drh [Fri, 9 Oct 2015 01:42:49 +0000 (01:42 +0000)] 
Trying to get FTS5 tests to build and run using main.mk.  Not yet working.

FossilOrigin-Name: 206174f9b154c590a3e2e94236db38e111d64bdb

9 years agoJson1 tests are working. Builds without FTS5 enabled. Still some problems
drh [Thu, 8 Oct 2015 23:37:00 +0000 (23:37 +0000)] 
Json1 tests are working.  Builds without FTS5 enabled.  Still some problems
building with FTS5.

FossilOrigin-Name: 2928f8e87d2e5d121e6e7e5993cbb773bb2b0603

9 years agoRemove calls to "load_static_extension" from fts5 test scripts.
dan [Thu, 8 Oct 2015 21:02:29 +0000 (21:02 +0000)] 
Remove calls to "load_static_extension" from fts5 test scripts.

FossilOrigin-Name: 53dd7c4c65842c5c9ed3e84edd62e24f2c9be15b

9 years agoFurther tweaks to main.mk so that fts5 builds as part of testfixture.
dan [Thu, 8 Oct 2015 21:00:46 +0000 (21:00 +0000)] 
Further tweaks to main.mk so that fts5 builds as part of testfixture.

FossilOrigin-Name: 97e11b79a52fb1c57f0afd2dbd6ee66cf00a922d

9 years agoFix further fts5 compilation issues.
dan [Thu, 8 Oct 2015 20:40:18 +0000 (20:40 +0000)] 
Fix further fts5 compilation issues.

FossilOrigin-Name: 0d7f301fb03c8546a5dbce5d061a1d74e3c86bcf

9 years agoFix two more warnings in fts5 code.
dan [Thu, 8 Oct 2015 20:28:33 +0000 (20:28 +0000)] 
Fix two more warnings in fts5 code.

FossilOrigin-Name: 5343e601fb6f0f24f4e4d5d442f7b5b074734143

9 years agoFix a couple of errors in fts5 compilation. This branch still does not build with...
dan [Thu, 8 Oct 2015 20:11:42 +0000 (20:11 +0000)] 
Fix a couple of errors in fts5 compilation. This branch still does not build with -Wall -Werror.

FossilOrigin-Name: e9e76e12812b9b42b1142246b71cea98e26903aa

9 years agoFirst attempt to add json1 and fts5 to the amalgamation. This check-in does
drh [Thu, 8 Oct 2015 19:29:18 +0000 (19:29 +0000)] 
First attempt to add json1 and fts5 to the amalgamation.  This check-in does
not compile.

FossilOrigin-Name: d820a1bd1b8dd702d1b3a099af393530cc5a5d51

9 years agoIn the RBU extension, use MoveFile() instead of rename() on Windows CE.
mistachkin [Thu, 8 Oct 2015 17:35:51 +0000 (17:35 +0000)] 
In the RBU extension, use MoveFile() instead of rename() on Windows CE.

FossilOrigin-Name: df9ef61f1ba2e3a3420fae84e3eaa2e0e235bc28

9 years agoRemove two unused lines of code - discovered by scan-build.
drh [Thu, 8 Oct 2015 02:44:42 +0000 (02:44 +0000)] 
Remove two unused lines of code - discovered by scan-build.

FossilOrigin-Name: 77b707b77496a08703fe9405e8e4521a4e5b419e

9 years agoFurther optimizations for fts5 prefix queries without a prefix index.
dan [Wed, 7 Oct 2015 19:06:21 +0000 (19:06 +0000)] 
Further optimizations for fts5 prefix queries without a prefix index.

FossilOrigin-Name: 83dc1ff7fa010715ca7f406a572f4ee444a967d7

9 years agoFix harmless compiler warning in FTS5.
mistachkin [Wed, 7 Oct 2015 17:06:17 +0000 (17:06 +0000)] 
Fix harmless compiler warning in FTS5.

FossilOrigin-Name: 13adcd038fc20dd1b6f344f79b449b4034f8f8f2

9 years agoAllow the subsitute character (codepoint 26 - 0x1A) to appear in fts5 barewords.
dan [Wed, 7 Oct 2015 17:01:22 +0000 (17:01 +0000)] 
Allow the subsitute character (codepoint 26 - 0x1A) to appear in fts5 barewords.

FossilOrigin-Name: baec1b96cb64a6a6317143a8df841e502afe3914

9 years agoAdjustments to spellfix2.test so that it works reliably on mac.
drh [Wed, 7 Oct 2015 16:14:18 +0000 (16:14 +0000)] 
Adjustments to spellfix2.test so that it works reliably on mac.

FossilOrigin-Name: d591e860d3d7c61637b4b07989bf176cb337db2c

9 years agoAdd tests for fts5 phrase queries with column filters.
dan [Wed, 7 Oct 2015 13:24:27 +0000 (13:24 +0000)] 
Add tests for fts5 phrase queries with column filters.

FossilOrigin-Name: f20f9f813f00cefcd427e506a09b0b973c782e3f

9 years agoAdd further tests for fts5 prefix queries.
dan [Wed, 7 Oct 2015 09:02:50 +0000 (09:02 +0000)] 
Add further tests for fts5 prefix queries.

FossilOrigin-Name: accdc98b1291f07b802fd23f3ebc7dbc02ba09d3

9 years agoFix a typo in the previous check-in.
mistachkin [Wed, 7 Oct 2015 04:20:34 +0000 (04:20 +0000)] 
Fix a typo in the previous check-in.

FossilOrigin-Name: 80027709c3ba2a8c9bda4d37779f65104be1045c

9 years agoWhen running tests on Tcl 8.6 under Windows, skip tests 'uri-1.12.*' due to a change...
mistachkin [Wed, 7 Oct 2015 03:07:41 +0000 (03:07 +0000)] 
When running tests on Tcl 8.6 under Windows, skip tests 'uri-1.12.*' due to a change in Tcl behavior related to NTFS ADS (alternate data streams).

FossilOrigin-Name: 8a0a2aa5a6df3d7b5995457b57f051e39d6cf9e9

9 years agoRemove three obsolete and unused files from tool/
drh [Wed, 7 Oct 2015 00:35:18 +0000 (00:35 +0000)] 
Remove three obsolete and unused files from tool/

FossilOrigin-Name: 0abd65294e6e8db68e7ce6724f02f17ba1cb3422

9 years agoFix typo in comments. No changes to code.
mistachkin [Tue, 6 Oct 2015 21:49:55 +0000 (21:49 +0000)] 
Fix typo in comments.  No changes to code.

FossilOrigin-Name: a05f903c64edeba8a9748aad68f5981943e68b3c

9 years agoSimplifications to the VDBE bytecode that handles LIMIT and OFFSET.
drh [Tue, 6 Oct 2015 21:07:06 +0000 (21:07 +0000)] 
Simplifications to the VDBE bytecode that handles LIMIT and OFFSET.

FossilOrigin-Name: 041df7c2f14b95868a08090354ebb3308050790e

9 years agoOptimizations for fts5 expressions that filter on column. More still to come.
dan [Tue, 6 Oct 2015 20:53:26 +0000 (20:53 +0000)] 
Optimizations for fts5 expressions that filter on column. More still to come.

FossilOrigin-Name: bf1607ac155018573ca40fb58aca62c5fea7e60b

9 years agoFix the LIMIT and OFFSET handling for UNION ALL queries that contain a
drh [Tue, 6 Oct 2015 17:27:18 +0000 (17:27 +0000)] 
Fix the LIMIT and OFFSET handling for UNION ALL queries that contain a
subquery with ORDER BY on the right-hand side.  Fix for ticket
[b65cb2c8d91f668584].

FossilOrigin-Name: 4b631364354068af95a01630469cb6fbfe8b52fd

9 years agoAdjustments to sqlite3MemoryBarrier() when compiling with MSVC and/or WinCE.
mistachkin [Tue, 6 Oct 2015 01:44:53 +0000 (01:44 +0000)] 
Adjustments to sqlite3MemoryBarrier() when compiling with MSVC and/or WinCE.

FossilOrigin-Name: 3168326ebfa1c961d8fc6435453b02be23d910cc

9 years agoImprove performance of prefix queries without a prefix index on fts5 tables.
dan [Mon, 5 Oct 2015 19:41:16 +0000 (19:41 +0000)] 
Improve performance of prefix queries without a prefix index on fts5 tables.

FossilOrigin-Name: f2f0184e9e1c9f121ee2ac864cd28c8cd8efecb5

9 years agoUpdate fts3 so that expressions to the left and right of a NOT operator are balanced...
dan [Mon, 5 Oct 2015 15:39:45 +0000 (15:39 +0000)] 
Update fts3 so that expressions to the left and right of a NOT operator are balanced. This prevents relatively small expressions (a dozen terms or so) that are children of NOT operators from triggering the "expression tree is too large" error.

FossilOrigin-Name: d6b66cd7b89fbd964f798d160a34caac0ba7347a

9 years agoAdd fts5txt2db.tcl, a tool for creating sample fts4/5 databases from text files.
dan [Mon, 5 Oct 2015 11:57:09 +0000 (11:57 +0000)] 
Add fts5txt2db.tcl, a tool for creating sample fts4/5 databases from text files.

FossilOrigin-Name: 44f1ce30d1e446c9ee5f8bd8a62119e00356aa0e

9 years agoUpdate fts5 to support the table function syntax. "... FROM fts5_tbl WHERE fts5_tbl...
dan [Sat, 3 Oct 2015 15:38:57 +0000 (15:38 +0000)] 
Update fts5 to support the table function syntax. "... FROM fts5_tbl WHERE fts5_tbl MATCH ?1 AND rank MATCH ?1" can now be written "FROM fts5_tbl(?1, ?2)".

FossilOrigin-Name: 41d17d9e24303aed6d549ea23c62b93bf2f71691

9 years agoAdd tests for the rtree module to verify that attempts to insert non-integer primary...
dan [Sat, 3 Oct 2015 12:23:18 +0000 (12:23 +0000)] 
Add tests for the rtree module to verify that attempts to insert non-integer primary key values or non-numeric dimensions into an rtree table are handled correctly.

FossilOrigin-Name: f653fce90846b700441e8fa5f1930c1ec5e38e31

9 years agoUpdate fts5 to avoid using a statement journal for UPDATE and DELETE operations that...
dan [Fri, 2 Oct 2015 20:04:30 +0000 (20:04 +0000)] 
Update fts5 to avoid using a statement journal for UPDATE and DELETE operations that affect at most a single row.

FossilOrigin-Name: 5c83b9db46d61cfa76a1abed50467e2f02db0eb0

9 years agoFix an fts3 bug causing NEAR queries on uncommitted data to malfunction.
dan [Thu, 1 Oct 2015 18:31:29 +0000 (18:31 +0000)] 
Fix an fts3 bug causing NEAR queries on uncommitted data to malfunction.

FossilOrigin-Name: 6f90839e91024e2006042f5eb7f21ca5b47a9b4a

9 years agoAdd a corrupt database to test/fuzzdata3.db to validate the previous
drh [Wed, 30 Sep 2015 14:30:19 +0000 (14:30 +0000)] 
Add a corrupt database to test/fuzzdata3.db to validate the previous
check-in.

FossilOrigin-Name: e796c0efb6cf17444b53af75046daf7d8fa82f78

9 years agoFix an assert() in btree.c that is only true for non-corrupt databases.
drh [Wed, 30 Sep 2015 14:19:08 +0000 (14:19 +0000)] 
Fix an assert() in btree.c that is only true for non-corrupt databases.

FossilOrigin-Name: 29f7227ff127202c53fe7c3b6558b3c101b0a7bc

9 years agoClear the BTCF_ValidNKey flag when putting a cursor into REQUIRESEEK state. Fix for...
dan [Wed, 30 Sep 2015 12:59:12 +0000 (12:59 +0000)] 
Clear the BTCF_ValidNKey flag when putting a cursor into REQUIRESEEK state. Fix for [1b266395].

FossilOrigin-Name: a6d5e4e8693bea3739c35fe9769ac9abfb9ed056

9 years agoImprove error handling in shell command ".tables".
dan [Wed, 30 Sep 2015 11:19:05 +0000 (11:19 +0000)] 
Improve error handling in shell command ".tables".

FossilOrigin-Name: 31a91ee7d32af8580a170903eb857ed9222fdb0a

9 years agoUse symbolic names XN_ROWID and XN_EXPR in place of the (-1) and (-2)
drh [Tue, 29 Sep 2015 17:20:14 +0000 (17:20 +0000)] 
Use symbolic names XN_ROWID and XN_EXPR in place of the (-1) and (-2)
magic numbers in Index.aiColumn[].  Add asserts to help verify that
Index.aiColumn[] is always used correctly.  Fix one place in FK processing
where Index.aiColumn[] was not being used correctly.

FossilOrigin-Name: 7d272aa62cd4cbbf4b5d04e3b918de27671e8301

9 years agoAdd the sqlite3_index_info.idxFlags field, allowing xBestIndex() implementations...
dan [Tue, 29 Sep 2015 16:47:53 +0000 (16:47 +0000)] 
Add the sqlite3_index_info.idxFlags field, allowing xBestIndex() implementations to specify to SQLite that a strategy may visit at most one row. Add support for this to fts3/4. Omit the statement journal from virtual table UPDATE and DELETE operations that are guaranteed not to affect more than one row.

FossilOrigin-Name: a1d08fd3d0419da8c22355d48c6d83eed6fd7e07

9 years agoEnsure that the xSavepoint() virtual table method is correctly invoked if there are...
dan [Tue, 29 Sep 2015 16:41:23 +0000 (16:41 +0000)] 
Ensure that the xSavepoint() virtual table method is correctly invoked if there are already open savepoints (or statement transactions) the first time a virtual table is written within a transaction.

FossilOrigin-Name: 77948b5eceab92a77c39d0864ac15ad453a76fd7

9 years agoRemove dead code, replacing with assert() statements that make sure the vtab-onepass
drh [Tue, 29 Sep 2015 15:50:04 +0000 (15:50 +0000)] 
Remove dead code, replacing with assert() statements that make sure the
code really was dead.

FossilOrigin-Name: 0e317dda5dfd35b742afd70dacb5bfb39aa3fc4a

9 years agoCreate the sqlite3IsToplevel(Parse*) interface to check to see if a top-level
drh [Tue, 29 Sep 2015 13:25:15 +0000 (13:25 +0000)] 
Create the sqlite3IsToplevel(Parse*) interface to check to see if a top-level
VDBE is being coded (versus a trigger) and use that interface.

FossilOrigin-Name: 59662cd2b65255a30e1a420331c07c51b644621a

9 years agoFix compiler warnings.
drh [Tue, 29 Sep 2015 12:32:56 +0000 (12:32 +0000)] 
Fix compiler warnings.

FossilOrigin-Name: d1a0783854d2e9272320d9ddfa58362532f58d1a

9 years agoFix an off-by-one error in test function fts5_decode().
dan [Tue, 29 Sep 2015 12:19:51 +0000 (12:19 +0000)] 
Fix an off-by-one error in test function fts5_decode().

FossilOrigin-Name: 3a9f076250d9559d8ea94ba44095ba3ddbc5542d

9 years agoMerge latest trunk change into this branch.
dan [Tue, 29 Sep 2015 11:59:25 +0000 (11:59 +0000)] 
Merge latest trunk change into this branch.

FossilOrigin-Name: b519c0d67a8fc39d65c17eccc9300a6187bd5661

9 years agoChange the name of the new sqlite3_index_info.flags field to "idxFlags". Add document...
dan [Tue, 29 Sep 2015 11:57:20 +0000 (11:57 +0000)] 
Change the name of the new sqlite3_index_info.flags field to "idxFlags". Add documentation for the same to sqlite.h.in.

FossilOrigin-Name: f61203bc0fb0b62e12d6270e8d9063e445a5a252

9 years agoAdd tests for fts3 and onepass update/delete operations. Also fix a problem with...
dan [Tue, 29 Sep 2015 10:11:26 +0000 (10:11 +0000)] 
Add tests for fts3 and onepass update/delete operations. Also fix a problem with onepass updates that do not affect any rows.

FossilOrigin-Name: 820c804468abff692742952de670c5d906a50956

9 years agoAlso allow UPDATE on virtual tables to use the onepass strategy.
dan [Mon, 28 Sep 2015 20:03:49 +0000 (20:03 +0000)] 
Also allow UPDATE on virtual tables to use the onepass strategy.

FossilOrigin-Name: 1aa27d706db9b2e21737ce4b94b47ecd12c2570f

9 years agoExtra information provided by .wheretrace on input flags to the query planner
drh [Mon, 28 Sep 2015 17:05:22 +0000 (17:05 +0000)] 
Extra information provided by .wheretrace on input flags to the query planner
and on the result of sqlite3WhereOkOnePass().

FossilOrigin-Name: c5566bb39c8d9b58f77380b81a873429575c7d5c

9 years agoUpdate fts3 to use the onepass strategy for delete operations.
dan [Mon, 28 Sep 2015 15:23:29 +0000 (15:23 +0000)] 
Update fts3 to use the onepass strategy for delete operations.

FossilOrigin-Name: fffab4f70f85eeb2acbb89534064a6e397c39384

9 years agoChanges to allow DELETE operations on virtual tables to use the onepass strategy...
dan [Mon, 28 Sep 2015 15:20:58 +0000 (15:20 +0000)] 
Changes to allow DELETE operations on virtual tables to use the onepass strategy under some circumstances.

FossilOrigin-Name: e73f919fae1833c6ffb36eddbc76d9a8d9324214

9 years agoAdd test cases to the ONEPASS optimization corruption problem fixed by the
drh [Mon, 28 Sep 2015 15:08:28 +0000 (15:08 +0000)] 
Add test cases to the ONEPASS optimization corruption problem fixed by the
previous check-in.

FossilOrigin-Name: 5c14d447055bb337428eb1fe0a2934abee381829

9 years agoFix a database corruption bug caused by the ONEPASS optimization added
drh [Mon, 28 Sep 2015 14:40:20 +0000 (14:40 +0000)] 
Fix a database corruption bug caused by the ONEPASS optimization added
in check-in [8b93cc5937000535].  Bug detected (prior to release) by
[https://www.sqlite.org/sqllogictest|sqllogictest].  Test cases to follow.

FossilOrigin-Name: 9d057f52217e7ef9c3f3eb84117abe3365503f44

9 years agoEnable adding JSON1 by appending the json1.c source file to the amalgamation
drh [Sat, 26 Sep 2015 17:44:59 +0000 (17:44 +0000)] 
Enable adding JSON1 by appending the json1.c source file to the amalgamation
and compiling with -DSQLITE_ENABLE_JSON1

FossilOrigin-Name: 33404b2029120d4aabe1e25d484871810777e934

9 years agoFix a memory leak that can occur following a syntax error in CREATE VIEW.
drh [Sat, 26 Sep 2015 11:15:44 +0000 (11:15 +0000)] 
Fix a memory leak that can occur following a syntax error in CREATE VIEW.

FossilOrigin-Name: f4704035a6134f702c00110358e36f1579e2ea78

9 years agoFix the title of the documentation on sqlite3_value_subtype(). This is a
drh [Sat, 26 Sep 2015 03:31:47 +0000 (03:31 +0000)] 
Fix the title of the documentation on sqlite3_value_subtype().  This is a
comment change only.

FossilOrigin-Name: b79023542458f7e839469c5e313694f1e4cf223a

9 years agoExpand the header comment to clarify the purpose for the
drh [Sat, 26 Sep 2015 03:23:29 +0000 (03:23 +0000)] 
Expand the header comment to clarify the purpose for the
sqlite3MemoryBarrier() function.

FossilOrigin-Name: b89495ae09aa0e9652475b2ba1943dfd87c73e07

9 years agoRemove an assert in the windows worker-thread logic that can fail in a race
drh [Sat, 26 Sep 2015 01:28:46 +0000 (01:28 +0000)] 
Remove an assert in the windows worker-thread logic that can fail in a race
condition.

FossilOrigin-Name: d7bfb96092a6b812af194f32b22283a0f6a7da96

9 years agoFix threads.c so that setting sqlite3FaultSim(200) using the
drh [Fri, 25 Sep 2015 23:40:01 +0000 (23:40 +0000)] 
Fix threads.c so that setting sqlite3FaultSim(200) using the
SQLITE_TESTCTRL_FAULT_INSTALL callback causes both unix and windows worker
threads to be sequential and deterministic, so that they can be tested
reliably.

FossilOrigin-Name: 2d867c054d6d3e1e841ba9ca524e986bc6993ac3

9 years agoFix PRAGMA integrity_check so that it works with a UNIQUE index over
drh [Fri, 25 Sep 2015 20:49:16 +0000 (20:49 +0000)] 
Fix PRAGMA integrity_check so that it works with a UNIQUE index over
expressions.

FossilOrigin-Name: 113181cec4db418b07640d6b1967923992efd71a

9 years agoReport an error if the number of named columns in a VIEW is different
drh [Fri, 25 Sep 2015 13:42:55 +0000 (13:42 +0000)] 
Report an error if the number of named columns in a VIEW is different
from the number of result columns in the SELECT statement that implements
the VIEW.

FossilOrigin-Name: 6e4ac0be2de1a16fcbb2a314504122ad95aa257e

9 years agoFix a problem computing affinities for indexes during skip-scan code
drh [Fri, 25 Sep 2015 01:09:27 +0000 (01:09 +0000)] 
Fix a problem computing affinities for indexes during skip-scan code
generation when SQLITE_ENABLE_STAT4 is on.  Bug introduced by
check-in [1ee089a72d789002].

FossilOrigin-Name: 1350dd42d056508337b1a07ad8b1c9c97593f8d3

9 years agoEnhance the query planner so that it is able to use indexed expressions
drh [Thu, 24 Sep 2015 18:47:59 +0000 (18:47 +0000)] 
Enhance the query planner so that it is able to use indexed expressions
to help fulfill an ORDER BY clause.

FossilOrigin-Name: 668fc1ebaf426f9eed3ed7865e41f1023dafebfb

9 years agoFix over-length source code lines in where.c. No logic changes.
drh [Thu, 24 Sep 2015 17:38:01 +0000 (17:38 +0000)] 
Fix over-length source code lines in where.c.  No logic changes.

FossilOrigin-Name: 1c8c5380a8b45c9e04d9663c3cb8182ef3a61b81

9 years agoStrengthen the implementations of xShmMemoryBarrier on both the unix and
drh [Thu, 24 Sep 2015 12:40:43 +0000 (12:40 +0000)] 
Strengthen the implementations of xShmMemoryBarrier on both the unix and
windows VFSes, so that they likely work even if SQLITE_THREADSAFE=0 is used.

FossilOrigin-Name: c6ab807b72ddfc1462f61aa91442b6fac04ace8a