Commit Graph

14986 Commits

Author SHA1 Message Date
mistachkin
7ef855f156 Alternate compiler warning fix for sqlite3StatusHighwater.
FossilOrigin-Name: 4315d20200d578c9252dcb26e60739063a8eff1d
2015-10-22 18:06:40 +00:00
mistachkin
16158eeb49 Fix harmless compiler warnings in FTS5.
FossilOrigin-Name: aa4e01ea1af327d1f8398ebea1c5bacc46698c3d
2015-10-21 22:08:36 +00:00
mistachkin
1dfaa5c4b2 Fix compilation of 'testfixture' with MSVC when the FTS5 and JSON1 extensions are enabled.
FossilOrigin-Name: e31aa97a9298e49507256036cfb8fa7517a48461
2015-10-21 22:07:25 +00:00
dan
99b25309d0 Remove some branches made unreachable by recent changes from fts5.
FossilOrigin-Name: ae350bfbfd59f912c469a51bf7d1409f3c8d958a
2015-10-21 20:56:27 +00:00
dan
f2c9995dbe Minor optimization for fts5 queries.
FossilOrigin-Name: 363b36d50b6f3e3d3e79c538be1167b071a5a710
2015-10-21 20:07:08 +00:00
dan
5c22e82a17 Add extra debugging function to test_rbu.c. Enhance the documentation for sqlite3rbu_db() to define the validity of the returned database handles.
FossilOrigin-Name: b9c4aa521156d8ca09151a82a7e80aa8d1d7a313
2015-10-21 08:26:01 +00:00
mistachkin
6d7734c27d Fix harmless compiler warnings in FTS5.
FossilOrigin-Name: 0a903ec26bfbbe9bfd18bc34934e689ffdb01ce5
2015-10-20 23:27:14 +00:00
dan
219f4d48a2 More optimizations for fts5 prefix queries.
FossilOrigin-Name: b8fb263ed1b36d085437131795505e53af103d26
2015-10-20 21:05:53 +00:00
dan
9cc4ae6f2a Fix #line directives added to generated file fts5.c.
FossilOrigin-Name: 1f5f5804cd394a81b1c0712ce6d1052f228d0a40
2015-10-20 19:55:35 +00:00
dan
3f9bfa740f Initialize variables in the fts5 integrity-check code to avoid compiler warnings.
FossilOrigin-Name: e979e2cccac257ad554803e6a1103558b0f159d8
2015-10-20 15:49:02 +00:00
dan
8789fbb2bd Another optimization for fts5 prefix (and other) queries.
FossilOrigin-Name: 60a8bde055a960c5b8cb4e231802c75617c942d8
2015-10-19 20:49:10 +00:00
dan
5e5b454cd8 Another tweak to improve performance of fts5 prefix queries.
FossilOrigin-Name: 69be427c864dc3de804ca3c5f1c6addcd33cd188
2015-10-19 17:43:24 +00:00
dan
3c060c2aef Fix a problem in the fts5txt2db.tcl script causing it to fail when creating tables with more than 8 columns.
FossilOrigin-Name: 68ee426a6432ac63655909ff70cb22bde33cf28c
2015-10-19 15:59:08 +00:00
dan
0206920e27 Add tests to cover new branches added to the fts5 code by the previous commit.
FossilOrigin-Name: cf618334a8a05a067e844236e4d461b2e5706da6
2015-10-17 20:34:49 +00:00
dan
05903e6a87 Handle equality and range constraints on the "term" column of fts5vocab tables. Also have the same module report columns using names instead of indexes.
FossilOrigin-Name: 6020d96ab47a0bebe41f691a3f44fd55d8b2d2b7
2015-10-17 19:49:01 +00:00
drh
b0df963465 Fix a comment in expr.c and add a CORRUPT_DB to an assert() in btree.c.
FossilOrigin-Name: 0df371d1a51c2028aefa4c704707773750317689
2015-10-16 23:55:08 +00:00
drh
0030aaad67 Merge recent enhancements from trunk. Version now 3.9.1.
FossilOrigin-Name: 26fa091d68e89a0b6af61ba706d23a9f37e8025a
2015-10-16 20:53:57 +00:00
mistachkin
f170ea44d4 Enhancements to the MSVC makefile.
FossilOrigin-Name: 39e8a5d93fa370afb03223bf0c20ea0f3448b9fc
2015-10-16 20:13:57 +00:00
drh
04ce31fafe Merge the 3.9.1 changes into trunk. (This only updates the version number
and configure script since all the other changes in 3.9.1 were cherrypicked
from trunk.)

FossilOrigin-Name: eb2317429fc3fc81ccd92e6f84f873585829259d
2015-10-16 20:12:12 +00:00
drh
a649776664 Version 3.9.1
FossilOrigin-Name: 767c1727fec4ce11b83f25b3f1bfcfe68a2c8b02
2015-10-16 17:31:12 +00:00
drh
0b086403b4 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
2015-10-16 15:56:27 +00:00
drh
1cfc44392c Fix the fuzzershell utility program so that it compiles with the
amalgamation that includes JSON1 support.

FossilOrigin-Name: d6fc616e4c8a024f71a044e61f0493dea7d9c812
2015-10-16 15:42:50 +00:00
drh
49472655d4 Fix the JSON1 extension so that it does not depend on isdigit() and
strtod() from the standard library when compiled into SQLite as part of the
amalgamation.

FossilOrigin-Name: bc9a9a60c31ebf9b11ac89ae5f99a3b66d6efc67
2015-10-16 15:35:39 +00:00
drh
b9e8f59b63 Form-feed is not valid whitespace for json.
Fix for ticket [57eec374ae1d0a1d]

FossilOrigin-Name: 28957d635961c525f735a52b8ffe3e69ccf31382
2015-10-16 15:16:06 +00:00
drh
be37c12423 Have the sqlite3VdbeSerialType() function go ahead and compute the serial
length as well, since it is always needed.  This avoids unnecessary calls
to sqlite3VdbeSerialTypeLen().

FossilOrigin-Name: 2ad72be12477b0e8e33e56a9a17e29abbd283ec1
2015-10-16 14:54:17 +00:00
drh
faf3727904 Use a lookup table to compute the content length for serial types less
than 128, for a 1.2% performance improvement.

FossilOrigin-Name: 3395724814099d28829ef6875ca1ba77d6fe7ffa
2015-10-16 14:23:42 +00:00
drh
95fa606616 Simplify the OP_Column logic slightly. One very small performance
improvement added.

FossilOrigin-Name: 0114b45dc286c13db0d640f0486d8a5bef9ff078
2015-10-16 13:50:08 +00:00
drh
848a3326f7 OP_Column optimization: Do not check for an oversize row header unless the
row header size is larger than the content available on the local page.

FossilOrigin-Name: 8125b74cb46c372b9a319f6270f1c396767accd7
2015-10-16 12:53:47 +00:00
drh
c24658b5d7 Improved header comment on the tool/vdbe_profile.tcl script. No changes to code.
FossilOrigin-Name: b17ad8fc046ebc9529d1c146437a383e72217b01
2015-10-16 12:39:52 +00:00
drh
c6ce388301 Performance optimization for the OP_Column opcode.
FossilOrigin-Name: 076be5474df628bbbfd2b645adba30e1e093acd0
2015-10-15 21:30:24 +00:00
drh
ce78bc6e7e Enhance the use of the column cache for UPDATE statements, making them
more efficient for the case where a column is modified to be an expression
of other unmodified columns.

FossilOrigin-Name: 871e091df651b2275a672c35ff938bd4b6db0d7f
2015-10-15 19:21:51 +00:00
drh
fed7ac6f04 Add the OP_IntCopy opcode - an optimized version of OP_SCopy that only works
for integer values.

FossilOrigin-Name: 3a2f73a4924860fde8ee41ad646e7a02d29ad9d5
2015-10-15 18:04:59 +00:00
drh
9eef8c6934 Optimization to the out2Prerelease() helper routine in the VDBE engine.
FossilOrigin-Name: 79298fe8c42f64b6a6110a70b84033873ac0630d
2015-10-15 17:31:41 +00:00
drh
59a052359d Remove a superfluous conditional from the memory allocation initialization.
FossilOrigin-Name: 9ccf8f8d35723f2a9b59010b6d5f37a14164a188
2015-10-15 17:21:35 +00:00
drh
039ca6ab59 Performance optimizations to the sqlite3MallocSize() by requiring the
argument to always be non-NULL.

FossilOrigin-Name: cb65989b0710c65e4df69063b346344fdb1d12c7
2015-10-15 16:20:57 +00:00
drh
b02392e6f0 Change sqlite3StatusSet() into sqlite3StatusHighwater() so that only the
highwater mark is recorded.  This gives a small size reduction and
performance improvement.

FossilOrigin-Name: 6422d223dd10018703c6b083d29a3c35c837fc97
2015-10-15 15:28:56 +00:00
drh
9676c48199 Make sure sqlite.h is not #included by itself.
FossilOrigin-Name: a61880c223c2229ecc3b4da7e5647eca17f7ddf5
2015-10-15 12:06:11 +00:00
mistachkin
8873996b7b In the MSVC makefile, add LIBTCLPATH variable to make it easier to run tests when the Tcl library is not already present in the PATH.
FossilOrigin-Name: 54127602b9a555f73f5e446b91e460386cb8fb17
2015-10-14 23:04:08 +00:00
mistachkin
460cd9ccfd In the MSVC makefile, make sure LDFLAGS is used for the tool executables as well.
FossilOrigin-Name: 0a17ee49c6895256fefd13425b790414935efb9d
2015-10-14 22:46:37 +00:00
dan
5f93ccd7fc Tests and minor fixes to improve coverage of FTS5 code.
FossilOrigin-Name: f4de6d450e143cb1dd5447800d4b178e3db114c8
2015-10-14 21:08:48 +00:00
mistachkin
cdabd7bd50 Fix harmless compiler warnings.
FossilOrigin-Name: 1c46c194a2da24fe613d77b5a8d727cc2fc9faa4
2015-10-14 20:34:57 +00:00
drh
99f4647ef5 Merge in all the 3.9.0 updates from trunk.
FossilOrigin-Name: 29444149342fc6b1ea8cd34c2c8e1fcb06eaa7ed
2015-10-14 20:09:54 +00:00
drh
fdefc36792 Update makefiles to remove all uses of "awk" - to make building SQLite easier
on Windows systems.  The only requirements now are tclsh, a C compiler, and
common file utilities.

FossilOrigin-Name: 4bd0d43db7c1877f2d8a8d2f2a48f24a10f0c3b8
2015-10-14 20:03:00 +00:00
mistachkin
78e3f61f22 Enable cross-compiling the various tool EXEs with MSVC.
FossilOrigin-Name: 7d77233389c595237d5b3d244b8aeca1524290c0
2015-10-14 20:01:12 +00:00
drh
501b402c65 Fixes to the JSON1 extension and to its use by fuzzcheck to avoid problems
when building DLLs.

FossilOrigin-Name: 01d3ee7bbe4feeb82dcedecbe3c9058c807b18f6
2015-10-14 19:52:27 +00:00
drh
021643560b Fix fuzzcheck.c so that it assumes that JSON1 is already compiled in and
does not need to be initialized further.

FossilOrigin-Name: ec003958359d6b69b1b1a75be2a988796268e063
2015-10-14 19:44:42 +00:00
dan
8d32e8042c Avoid exporting sqlite3_json_init() from amalgamation builds.
FossilOrigin-Name: 8463f7e7908d0a96ed036377dfa3805328c62925
2015-10-14 18:45:42 +00:00
drh
b43b711587 Version 3.9.0
FossilOrigin-Name: a721fc0d89495518fe5612e2e3bbc60befd2e90d
2015-10-14 12:29:53 +00:00
dan
f4f968443b Add the missing 'extern "C" {...}' blocks to fts5.h and sqlite3rbu.h.
FossilOrigin-Name: 47a2ce97d585e1760ffcf760c0de1753677d5713
2015-10-14 10:56:34 +00:00
drh
cec7dec006 Remove the unused fts5ExprColsetTest() routine.
FossilOrigin-Name: 9ecafc0c94102dca6da192f400278399464086fb
2015-10-12 22:31:02 +00:00
mistachkin
f2c26ed17b Fix a couple harmless compiler warnings.
FossilOrigin-Name: 7f896a971c5953d5370215ecd834d1fb711b4263
2015-10-12 22:20:29 +00:00
dan
df705d8185 Further tweaks to improve fts5 prefix query performance.
FossilOrigin-Name: 1c20c1c28b56411f106cf2f6961b3ad4b4d6f6c8
2015-10-12 19:12:29 +00:00
drh
58a8a9236e Change all references to 3.8.12 into 3.9.0. Comment changes only - no
changes to code.

FossilOrigin-Name: 6f2858f6817ca70c132f0437ac2f0f74deb273d2
2015-10-12 04:56:12 +00:00
mistachkin
fcbe99ae38 Remove AWK requirement from the MSVC batch build tool.
FossilOrigin-Name: 6d9cdb931cf4e2f0830184cff32e441e4966bd7e
2015-10-12 03:56:21 +00:00
mistachkin
cf9fb7eb1c The TclKit batch tool should not download the TclKit SDK when the TCLKIT_NOSDK environment variable is set.
FossilOrigin-Name: 7c5d583bac89f8db94e7f73df09e1d04f0f24990
2015-10-12 03:44:39 +00:00
drh
bfad7be78a Detect and report circularly defined views even if the views have the
columns defined in the CREATE VIEW statement.

FossilOrigin-Name: 9ab9c8c6d747647f8ade58c2c4812fc69a813368
2015-10-11 20:39:46 +00:00
drh
2906490b71 Remove an unreachable branch in the query flattener substitution logic.
FossilOrigin-Name: 46ee3453a31b5e793d5aaad471cec1b1a11ab2cf
2015-10-11 20:08:31 +00:00
drh
d12b636330 Improved substitution logic in the query flattener. Saves code space, and
(more importantly) works correctly with table-valued functions.

FossilOrigin-Name: 3d0bd95e977db50c314d33ec292f99e0539d7b4a
2015-10-11 19:46:59 +00:00
mistachkin
5b66350ac7 Enhance TclKit batch tool (and MSVC makefile) to support targets that require the Tcl stub library.
FossilOrigin-Name: bc6223b1d6c31a47c7b734cfb8a9ecf15ab809fc
2015-10-10 23:39:55 +00:00
drh
48310f8c51 Work around a "security feature" bug in memcpy() on OpenBSD.
FossilOrigin-Name: fab6f09044d033dd09ed8a22e06bc6a7851bbabf
2015-10-10 16:41:28 +00:00
drh
72724da95a Remove another instance of strcpy() from FTS5, to mollify OpenBSD.
FossilOrigin-Name: 35e6248abb4435a8b26d270092b856beff867406
2015-10-10 15:57:20 +00:00
drh
c5971cc859 Omit the use of strcpy() in FTS5 since OpenBSD hates strcpy().
FossilOrigin-Name: bc24a5bbfd95df3518611b221de69b73776111bc
2015-10-10 15:11:49 +00:00
drh
728e0f91bb 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
2015-10-10 14:41:28 +00:00
drh
9a4718ff73 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
2015-10-10 14:00:37 +00:00
mistachkin
ba461cac7b Remove a couple superfluous double quotes in the MSVC makefile.
FossilOrigin-Name: 0f9e205b28e013412b19dfd588f2a6cf341c40e8
2015-10-10 02:06:05 +00:00
mistachkin
946ef60ad0 Fix typo in the MSVC makefile. Replace remaining uses of AWK in the MSVC makefile with a Tcl script.
FossilOrigin-Name: f8c2193b64979a2fe480fcf913573b5fac06235e
2015-10-10 01:55:57 +00:00
mistachkin
cc7304888f More fine-tuning to the new TclKit tools.
FossilOrigin-Name: 43addd8aa04c3faceb9d303672e330294af01a16
2015-10-10 00:53:28 +00:00
drh
a0882fad7c The previous fix to JSON1 was not complete. A few more tweaks are needed
for correct handling of all oversized integers.

FossilOrigin-Name: 4a47f0177851721cdf6c981df962b6e8862372e7
2015-10-09 20:40:44 +00:00
mistachkin
dfff1ffec6 Tweak batch tool added in the previous check-in to permit the base URI to be overridden.
FossilOrigin-Name: 1d2f82df6774f8d66bfc5d67d5dad9f068a1069c
2015-10-09 18:48:47 +00:00
drh
8deb4b8b17 Fix the JSON1 extension so that it renders integers outside the range
of -9223372036854775808 to +9223372036854775807 as floating-point numbers.

FossilOrigin-Name: ae736e35fb59c9aed33a8c805cf2ecdee528051f
2015-10-09 18:21:43 +00:00
dan
6cac258245 Remove fts5 sources from TESTSRC2 in main.mk as there is no SQLITE_TEST code in said files.
FossilOrigin-Name: c1840639b8ce8314602cd2396a324de8fac98dbe
2015-10-09 17:54:10 +00:00
mistachkin
80372ae248 Add tool capable of downloading a TclKit (and its associated SDK) on Windows.
FossilOrigin-Name: 50673ddaf813335777673fa8585997a7551e5323
2015-10-09 17:36:06 +00:00
dan
2572751be8 Add --enable-fts5 and --enable-json1 options to the amalgamation autoconf package.
FossilOrigin-Name: 8a4e19888f512c3ee95aa3040924fc932fbdab1a
2015-10-09 14:37:15 +00:00
mistachkin
8381be4ace In the MSVC makefile, adjust the names of two nmake variables for consistency.
FossilOrigin-Name: 92aa4b6b6fbb83f965e4c4be0aa21a8b7e330ed8
2015-10-09 14:23:56 +00:00
drh
c4e6d1775e Change the version number of the next release to 3.9.0.
FossilOrigin-Name: aa8fdadf2defed00a28366a3b35a3e2eefecf0ed
2015-10-09 13:42:52 +00:00
drh
b5c8d27c7d Add the JSON1 and FTS5 extensions to the amalgamation. Add new options
to ./configure: --enable-json1 and --enable-fts5.

FossilOrigin-Name: 1eb769933108cf401b25c8d784ea23f27324a0bd
2015-10-09 13:39:51 +00:00
drh
64db184efa Fix a typo in the MSVC Makefile
FossilOrigin-Name: c8a12082380991781b5ecd2f479ec65600f4f695
2015-10-09 13:29:27 +00:00
drh
ce1d9f546b Add configure script options --enable-fts5 and --enable-json1. Automatically
search for -lm when using --enable-fts5.

FossilOrigin-Name: a0c44f1d46f1f31043d66f20c8dc0df53db15c30
2015-10-09 12:48:33 +00:00
dan
0008ce7cc5 Makefile and fts5 changes so that fts5 works with main.mk. Still does not work with Makefile.in.
FossilOrigin-Name: 6ebac32d8378e46f44a6eb55aaa30baf4d7dde7d
2015-10-09 11:09:47 +00:00
drh
45fac88951 Trying to get FTS5 tests to build and run using main.mk. Not yet working.
FossilOrigin-Name: 206174f9b154c590a3e2e94236db38e111d64bdb
2015-10-09 01:42:49 +00:00
drh
c306e08ad5 Json1 tests are working. Builds without FTS5 enabled. Still some problems
building with FTS5.

FossilOrigin-Name: 2928f8e87d2e5d121e6e7e5993cbb773bb2b0603
2015-10-08 23:37:00 +00:00
dan
d3b90a2e41 Remove calls to "load_static_extension" from fts5 test scripts.
FossilOrigin-Name: 53dd7c4c65842c5c9ed3e84edd62e24f2c9be15b
2015-10-08 21:02:29 +00:00
dan
23fda8242c Further tweaks to main.mk so that fts5 builds as part of testfixture.
FossilOrigin-Name: 97e11b79a52fb1c57f0afd2dbd6ee66cf00a922d
2015-10-08 21:00:46 +00:00
dan
56eac26897 Fix further fts5 compilation issues.
FossilOrigin-Name: 0d7f301fb03c8546a5dbce5d061a1d74e3c86bcf
2015-10-08 20:40:18 +00:00
dan
351ccb3825 Fix two more warnings in fts5 code.
FossilOrigin-Name: 5343e601fb6f0f24f4e4d5d442f7b5b074734143
2015-10-08 20:28:33 +00:00
dan
056d7acf25 Fix a couple of errors in fts5 compilation. This branch still does not build with -Wall -Werror.
FossilOrigin-Name: e9e76e12812b9b42b1142246b71cea98e26903aa
2015-10-08 20:11:42 +00:00
drh
50065656f7 First attempt to add json1 and fts5 to the amalgamation. This check-in does
not compile.

FossilOrigin-Name: d820a1bd1b8dd702d1b3a099af393530cc5a5d51
2015-10-08 19:29:18 +00:00
mistachkin
b2682eb14b In the RBU extension, use MoveFile() instead of rename() on Windows CE.
FossilOrigin-Name: df9ef61f1ba2e3a3420fae84e3eaa2e0e235bc28
2015-10-08 17:35:51 +00:00
drh
d7fd6aa4ba Remove two unused lines of code - discovered by scan-build.
FossilOrigin-Name: 77b707b77496a08703fe9405e8e4521a4e5b419e
2015-10-08 02:44:42 +00:00
dan
98e713bb8d Further optimizations for fts5 prefix queries without a prefix index.
FossilOrigin-Name: 83dc1ff7fa010715ca7f406a572f4ee444a967d7
2015-10-07 19:06:21 +00:00
mistachkin
08114efde4 Fix harmless compiler warning in FTS5.
FossilOrigin-Name: 13adcd038fc20dd1b6f344f79b449b4034f8f8f2
2015-10-07 17:06:17 +00:00
dan
22c7cca21f Allow the subsitute character (codepoint 26 - 0x1A) to appear in fts5 barewords.
FossilOrigin-Name: baec1b96cb64a6a6317143a8df841e502afe3914
2015-10-07 17:01:22 +00:00
drh
1dcc97cd3a Adjustments to spellfix2.test so that it works reliably on mac.
FossilOrigin-Name: d591e860d3d7c61637b4b07989bf176cb337db2c
2015-10-07 16:14:18 +00:00
dan
d46cc33131 Add tests for fts5 phrase queries with column filters.
FossilOrigin-Name: f20f9f813f00cefcd427e506a09b0b973c782e3f
2015-10-07 13:24:27 +00:00
drh
48cc9a31e1 Convert the tool/tostr.awk script into tool/tostr.tcl. Remove two obsolete
Makefiles.  Purge NAWK from the configure script and from unix makefiles.
There are still two uses of NAWK in Makefile.msc.

FossilOrigin-Name: 5b6775215327a89232f5059653747a18e83b8b4b
2015-10-07 12:36:42 +00:00
drh
60a15a48c5 Change the addopcodes.awk script into tool/addopcodes.tcl.
FossilOrigin-Name: 8bbf37142ef2759274668f6da114b5c8072e42db
2015-10-07 12:21:14 +00:00
drh
7651e0a439 Convert the mkopcodec.awk script into tool/mkopcodec.tcl.
FossilOrigin-Name: 1506cb33fcf61e2ef97b35b99e58fbf21f4f5496
2015-10-07 12:11:36 +00:00
dan
92099b0753 Add further tests for fts5 prefix queries.
FossilOrigin-Name: accdc98b1291f07b802fd23f3ebc7dbc02ba09d3
2015-10-07 09:02:50 +00:00
mistachkin
6418ffab82 Fix a typo in the previous check-in.
FossilOrigin-Name: 80027709c3ba2a8c9bda4d37779f65104be1045c
2015-10-07 04:20:34 +00:00
mistachkin
6bd7456edd 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
2015-10-07 03:07:41 +00:00
drh
b15393b8d5 Change mkopcodeh.awk into tool/mkopcodeh.tcl.
FossilOrigin-Name: ed0ebc460b54939862e3bddee2bb9bcb9f69c747
2015-10-07 02:52:09 +00:00
drh
ee38148785 Remove three obsolete and unused files from tool/
FossilOrigin-Name: 0abd65294e6e8db68e7ce6724f02f17ba1cb3422
2015-10-07 00:35:18 +00:00
mistachkin
91a3ecb0ad Fix typo in comments. No changes to code.
FossilOrigin-Name: a05f903c64edeba8a9748aad68f5981943e68b3c
2015-10-06 21:49:55 +00:00
drh
8b0cf38a12 Simplifications to the VDBE bytecode that handles LIMIT and OFFSET.
FossilOrigin-Name: 041df7c2f14b95868a08090354ebb3308050790e
2015-10-06 21:07:06 +00:00
dan
a2507137f3 Optimizations for fts5 expressions that filter on column. More still to come.
FossilOrigin-Name: bf1607ac155018573ca40fb58aca62c5fea7e60b
2015-10-06 20:53:26 +00:00
drh
9f1ef45f6a 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
2015-10-06 17:27:18 +00:00
mistachkin
8d9837acd5 Adjustments to sqlite3MemoryBarrier() when compiling with MSVC and/or WinCE.
FossilOrigin-Name: 3168326ebfa1c961d8fc6435453b02be23d910cc
2015-10-06 01:44:53 +00:00
dan
6f832d3dff Improve performance of prefix queries without a prefix index on fts5 tables.
FossilOrigin-Name: f2f0184e9e1c9f121ee2ac864cd28c8cd8efecb5
2015-10-05 19:41:16 +00:00
dan
f24bebe37a 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
2015-10-05 15:39:45 +00:00
dan
2c1023df09 Add fts5txt2db.tcl, a tool for creating sample fts4/5 databases from text files.
FossilOrigin-Name: 44f1ce30d1e446c9ee5f8bd8a62119e00356aa0e
2015-10-05 11:57:09 +00:00
dan
a0f197b842 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
2015-10-03 15:38:57 +00:00
dan
06f8c635ef 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
2015-10-03 12:23:18 +00:00
dan
bca189d5d8 Update fts5 to avoid using a statement journal for UPDATE and DELETE operations that affect at most a single row.
FossilOrigin-Name: 5c83b9db46d61cfa76a1abed50467e2f02db0eb0
2015-10-02 20:04:30 +00:00
dan
5171e911f2 Fix an fts3 bug causing NEAR queries on uncommitted data to malfunction.
FossilOrigin-Name: 6f90839e91024e2006042f5eb7f21ca5b47a9b4a
2015-10-01 18:31:29 +00:00
drh
105865acf9 Add a corrupt database to test/fuzzdata3.db to validate the previous
check-in.

FossilOrigin-Name: e796c0efb6cf17444b53af75046daf7d8fa82f78
2015-09-30 14:30:19 +00:00
drh
9b5351d439 Fix an assert() in btree.c that is only true for non-corrupt databases.
FossilOrigin-Name: 29f7227ff127202c53fe7c3b6558b3c101b0a7bc
2015-09-30 14:19:08 +00:00
dan
e755e10a78 Clear the BTCF_ValidNKey flag when putting a cursor into REQUIRESEEK state. Fix for [1b266395].
FossilOrigin-Name: a6d5e4e8693bea3739c35fe9769ac9abfb9ed056
2015-09-30 12:59:12 +00:00
dan
d95bb39c52 Improve error handling in shell command ".tables".
FossilOrigin-Name: 31a91ee7d32af8580a170903eb857ed9222fdb0a
2015-09-30 11:19:05 +00:00
drh
4b92f98ccc 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
2015-09-29 17:20:14 +00:00
dan
e60856980a 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
2015-09-29 16:47:53 +00:00
dan
65c4f591be 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
2015-09-29 16:41:23 +00:00
drh
e2b7d7a0a1 Remove dead code, replacing with assert() statements that make sure the
code really was dead.

FossilOrigin-Name: 0e317dda5dfd35b742afd70dacb5bfb39aa3fc4a
2015-09-29 15:50:04 +00:00
drh
c149f18f4d 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
2015-09-29 13:25:15 +00:00
drh
94f26a1e22 Fix compiler warnings.
FossilOrigin-Name: d1a0783854d2e9272320d9ddfa58362532f58d1a
2015-09-29 12:32:56 +00:00
dan
4ad0971919 Fix an off-by-one error in test function fts5_decode().
FossilOrigin-Name: 3a9f076250d9559d8ea94ba44095ba3ddbc5542d
2015-09-29 12:19:51 +00:00
dan
91742c45a9 Merge latest trunk change into this branch.
FossilOrigin-Name: b519c0d67a8fc39d65c17eccc9300a6187bd5661
2015-09-29 11:59:25 +00:00
dan
b3deb4ea64 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
2015-09-29 11:57:20 +00:00
dan
354474ad6d 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
2015-09-29 10:11:26 +00:00
dan
0f40037eee Also allow UPDATE on virtual tables to use the onepass strategy.
FossilOrigin-Name: 1aa27d706db9b2e21737ce4b94b47ecd12c2570f
2015-09-28 20:03:49 +00:00
drh
a722821eb5 Extra information provided by .wheretrace on input flags to the query planner
and on the result of sqlite3WhereOkOnePass().

FossilOrigin-Name: c5566bb39c8d9b58f77380b81a873429575c7d5c
2015-09-28 17:05:22 +00:00
dan
d943b27596 Update fts3 to use the onepass strategy for delete operations.
FossilOrigin-Name: fffab4f70f85eeb2acbb89534064a6e397c39384
2015-09-28 15:23:29 +00:00
dan
076e0f9674 Changes to allow DELETE operations on virtual tables to use the onepass strategy under some circumstances.
FossilOrigin-Name: e73f919fae1833c6ffb36eddbc76d9a8d9324214
2015-09-28 15:20:58 +00:00
drh
3169713be0 Add test cases to the ONEPASS optimization corruption problem fixed by the
previous check-in.

FossilOrigin-Name: 5c14d447055bb337428eb1fe0a2934abee381829
2015-09-28 15:08:28 +00:00
drh
63c85a7a66 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
2015-09-28 14:40:20 +00:00
drh
2f20e13b83 Enable adding JSON1 by appending the json1.c source file to the amalgamation
and compiling with -DSQLITE_ENABLE_JSON1

FossilOrigin-Name: 33404b2029120d4aabe1e25d484871810777e934
2015-09-26 17:44:59 +00:00
drh
32498f1321 Fix a memory leak that can occur following a syntax error in CREATE VIEW.
FossilOrigin-Name: f4704035a6134f702c00110358e36f1579e2ea78
2015-09-26 11:15:44 +00:00
drh
c4cdb29a0e Fix the title of the documentation on sqlite3_value_subtype(). This is a
comment change only.

FossilOrigin-Name: b79023542458f7e839469c5e313694f1e4cf223a
2015-09-26 03:31:47 +00:00
drh
539482b76a Expand the header comment to clarify the purpose for the
sqlite3MemoryBarrier() function.

FossilOrigin-Name: b89495ae09aa0e9652475b2ba1943dfd87c73e07
2015-09-26 03:23:29 +00:00
drh
17db155fed Remove an assert in the windows worker-thread logic that can fail in a race
condition.

FossilOrigin-Name: d7bfb96092a6b812af194f32b22283a0f6a7da96
2015-09-26 01:28:46 +00:00
drh
2ea31b1286 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
2015-09-25 23:40:01 +00:00
drh
68391acd5f Fix PRAGMA integrity_check so that it works with a UNIQUE index over
expressions.

FossilOrigin-Name: 113181cec4db418b07640d6b1967923992efd71a
2015-09-25 20:49:16 +00:00
drh
2679f14fd9 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
2015-09-25 13:42:55 +00:00
drh
8ffddeb708 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
2015-09-25 01:09:27 +00:00
drh
dae26fe518 Enhance the query planner so that it is able to use indexed expressions
to help fulfill an ORDER BY clause.

FossilOrigin-Name: 668fc1ebaf426f9eed3ed7865e41f1023dafebfb
2015-09-24 18:47:59 +00:00
drh
76226dd28d Fix over-length source code lines in where.c. No logic changes.
FossilOrigin-Name: 1c8c5380a8b45c9e04d9663c3cb8182ef3a61b81
2015-09-24 17:38:01 +00:00
drh
ae1a015c87 Merge trunk changes into the cursor-hints branch.
FossilOrigin-Name: fbe637620fb7f2c9395c9ddac77d26746d6d4178
2015-09-24 15:06:30 +00:00
drh
22c733da64 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
2015-09-24 12:40:43 +00:00
drh
c5de2d0a05 Make sure joins work correctly when both sides of the join are connected
using indexed expressions.

FossilOrigin-Name: c2fcb03299f2872d7f97a540ea145519f8b2e5cc
2015-09-24 12:19:17 +00:00
drh
7269443281 Correctly handle the case of a WHERE-clause term with indexed expressions on
both sides of the == sign.

FossilOrigin-Name: d9b716a6bd6145b2e7733c04d86227df777cd473
2015-09-24 11:26:45 +00:00
drh
b7601461e0 Fix a JSON1 test case so that it works on builds that omit virtual tables.
FossilOrigin-Name: a4444c0f662058bdd5267e616c31cef828bc1fc5
2015-09-24 11:06:26 +00:00
drh
8cb15cc5ae Another (smaller) performance optimization for the JSON parser.
FossilOrigin-Name: c43daa8c78df99f62dd4d3c83708a3a8eff92496
2015-09-24 01:40:45 +00:00
drh
9567794fd9 Performance optimizations on the JSON parser.
FossilOrigin-Name: 7dd4b07a42eb84589d34430b9d7bfa88fbd743eb
2015-09-24 01:06:37 +00:00
drh
58cb6dbe0d Take care that the number of reserved bits per page is consistent between
the source and destination databases when doing the back-copy on a VACUUM.

FossilOrigin-Name: 5b61b72f5424a2d9bb4e68eb95026cd63f003db9
2015-09-23 19:17:23 +00:00
drh
64ff56f91a Capture AFL-generated fuzz tests for json1.c into the test/fuzzdata4.db file.
FossilOrigin-Name: 10a214fdb3c13b25e0bdd15c975c21c8890c47ee
2015-09-23 11:59:50 +00:00
drh
f27cd1f3aa Do not allow a comma at the end of a JSON array or object.
FossilOrigin-Name: 7c7a3f3e9bc2f7a7334d8d6eae183d83f22097be
2015-09-23 01:10:29 +00:00
drh
40e0e0dbe7 Add the --export-sql and --export-db options to the fuzzcheck utility program.
FossilOrigin-Name: 760af4455115669b934c3115d45cffe89c085faf
2015-09-22 18:51:17 +00:00
drh
9cdd1029e5 Fix a typo in the --help screen of the fuzzcheck utility.
FossilOrigin-Name: b6ae61fe3b3de3aa296b3e56cd2ec425a5141c73
2015-09-22 17:46:11 +00:00
drh
3d1d2a97a5 Futher simplifications to json1.c. Also an obscure bug-fix in the initial
output of json_tree() when using a path to an object contained within an array.

FossilOrigin-Name: fcb1e327a64134e5ac539ec3d52733422d3061fd
2015-09-22 01:15:49 +00:00
drh
8cb0c83cce Fix json_set() so that it can overwrite a value that was previously overwritten
during the same call.

FossilOrigin-Name: 0f16041647993975c316203c7e11f06e27640136
2015-09-22 00:21:03 +00:00
mistachkin
357e42d48f For MSVC, have the 'sqlite3.c' target depend on 'sqlite3ext.h' as well as other targets may depend on this behavior (e.g. extensions).
FossilOrigin-Name: 737ac3faf4e5fcb5855f5f9a1c1ddfc5424e6292
2015-09-21 23:53:42 +00:00
mistachkin
c978f2d2c2 Fix compilation under older versions of MSVC.
FossilOrigin-Name: 17150ada1474e70d7c5ffe6ba5667f45671a434b
2015-09-21 23:49:35 +00:00
drh
a8f39a9b5d Simplifications to the json1.c logic.
FossilOrigin-Name: 1646a2bd85f87d03a14fcaec288107f5f6411c6f
2015-09-21 22:53:16 +00:00
drh
78ac109c7f Fix an overly-strict assert() in the btree logic.
FossilOrigin-Name: 825ce3201df21c6b9d5c57dcc6726c306df05220
2015-09-20 22:57:47 +00:00
drh
6230212f4a Do not allow table-valued function syntax to be used on a view.
FossilOrigin-Name: 97cfe346e140e42a604375551f8168276bdbea11
2015-09-19 20:27:08 +00:00
drh
b97ad0297c Add the --disable-lookaside option to the fuzzershell utility program.
FossilOrigin-Name: 0b04374449c8279ad038def7c18cd74f180a0515
2015-09-19 19:36:13 +00:00
drh
dc38495715 Fix a memory leak in json1.c that could occur after misuse of json_object().
FossilOrigin-Name: 394b81b11f261a9b179a034bc2a2d2dff0765e3b
2015-09-19 18:54:39 +00:00
dan
80b7198f2b Add an assert() statement to delete.c.
FossilOrigin-Name: 40fce67ecf0e71db3c8f3da3f72cc80a3d0f8fb2
2015-09-19 18:11:18 +00:00
drh
8faee877cb Fix compiler warnings.
FossilOrigin-Name: 5c31ee62a196b914673384a611534fd778dc64b0
2015-09-19 18:08:13 +00:00
drh
3f81f10804 Add json1.c to the fuzzer test shells.
FossilOrigin-Name: 809d67b61164b83bbb6962f0edee1793a483ccab
2015-09-19 16:51:58 +00:00
drh
8911c0b339 Adjust Makefiles to use SQLITE_CORE when statically linking json1.c into
test shells.

FossilOrigin-Name: 91682ac39e7db6a5dc8b75695a757449f068184a
2015-09-19 16:45:43 +00:00
drh
5f4a44a439 Adjust fuzzershell so that it adds the json1 extension separately for each
no connection.

FossilOrigin-Name: ca2d1e9036387d1514fe596a0b82a3d8409797c3
2015-09-19 14:57:00 +00:00
drh
d7f2beab86 Include json1.c in fuzzcheck and fuzzershell.
FossilOrigin-Name: c4b68eff7f8f5402a9abf378157767b1c96a6101
2015-09-19 14:32:51 +00:00
drh
c02c4d4900 Fix a documentation typo in sqlite3_bind_parameter_index(). No code changes.
FossilOrigin-Name: 650605a820f3860b1d6e955cdda23aaff01dfdb5
2015-09-19 12:04:27 +00:00
drh
4977ccf143 Fix an off-by-one error (really off-by-2 in this case) in the buffer
resize logic of json1.

FossilOrigin-Name: d2a027372a5a6efc0f9b6f605093d865ae1c6788
2015-09-19 11:57:26 +00:00
drh
4cbc54b042 Do not allow rowid in a UNIQUE or PRIMARY KEY constraint. (This restores the
same behavior exhibited by all prior releases.)

FossilOrigin-Name: b1278301e37220a075c1bae88c0fcca2ef7a7d5c
2015-09-19 03:07:30 +00:00
drh
e63e8a6c78 Fix a crash that can occur with a skip-scan on an index with
expressions when SQLITE_ENABLE_EXPLAIN_COMMENTS is defined.

FossilOrigin-Name: 25f34cb9b576a2d4250a06a7dbf88010b1c11675
2015-09-18 18:09:28 +00:00
drh
e5c61f81c3 Adjustments to the spellfix2.test module so that it works reliably on
windows.

FossilOrigin-Name: 09a313fb7f2c16b0253a439edb901a7bb201d7d3
2015-09-18 15:38:07 +00:00
drh
bec9d65da4 Adjust two test cases so that they conform to the current code.
FossilOrigin-Name: 228e3d7c8f37c722aee3b589bdd5cfaa4b1f6f03
2015-09-18 15:35:16 +00:00
drh
59de9c0080 Fix sqlilimits.test module so that it knows that the SELECT in a CREATE VIEW
is not checked until the view is actually used.

FossilOrigin-Name: acf5d87f9456a1d0d69fe0ebc753211e1be07eaf
2015-09-18 15:13:29 +00:00
dan
ad41f5eda3 Ensure that "PRAGMA integrity_check" reports an error if the free-list count header field contains a value smaller than the actual number of pages on the database free-list.
FossilOrigin-Name: 26f64986d1ed59c554a7cb9e00e86a7f148f1fc6
2015-09-18 14:45:01 +00:00
drh
3a84411fc4 Fix the orderby9.test case so that it works with 32-bit versions of TCL
FossilOrigin-Name: 4b6af7743034546a407a3e4722645945a4efc8a1
2015-09-18 14:42:48 +00:00
drh
9df5ad58bb Remove a test made obsolete by the ONEPASS DELETE optimization.
FossilOrigin-Name: c88b62c28cc7ac31b93f7df0c732e0bb6ca24f65
2015-09-18 14:22:34 +00:00
dan
2e8f5517f7 Avoid passing (signed char) values directly to isspace(), isalnum() or isdigit() in json1.c. Cast the value to (unsigned char) first.
FossilOrigin-Name: 6713e35b8a8c997aa2717e86ce6dcd63bb993477
2015-09-17 17:21:09 +00:00
dan
cf346d7a9c Fix a crash in FTS5 caused by specifying NULL as the rhs of a MATCH operator.
FossilOrigin-Name: e8ed62f82e8acc40b818bf86fafe3d480687514e
2015-09-17 09:48:01 +00:00
drh
d9dfeb575e Add a "flush" to force incremental output to releasetest-out.txt while running
the test/releasetest.tcl. script.

FossilOrigin-Name: 0f3de2d337a3113dbd0765aa5545bb586b780121
2015-09-16 17:46:11 +00:00
dan
ec9e8f004e Fix typo in fts5.h.
FossilOrigin-Name: 07721c6c24f651d8e281c29227b113d292f6b0de
2015-09-16 12:31:39 +00:00
drh
81966bea22 Merge enhancements from trunk.
FossilOrigin-Name: 66fe06832614010d3156d7b21a760af9957018cc
2015-09-15 17:31:47 +00:00
dan
6609bab24d Add test cases to cover fts5 integrity-check code.
FossilOrigin-Name: 1d018c35b9e81982df036f5e62a4a42219b54e02
2015-09-15 14:39:17 +00:00
drh
b77ebd828b Reformat some code to make it easier to merge with sessions. No logic changes.
FossilOrigin-Name: eade355fafec558fc13dc4b08ca0b07713a2cd84
2015-09-15 13:42:16 +00:00
dan
128ea696ea Fix a problem with fts5 "ORDER BY rowid DESC" queries and large terms.
FossilOrigin-Name: b26d8f79c62cb71b4c3ea5df9d0e09558bbbd794
2015-09-15 11:58:33 +00:00
dan
dafeda754b Improve test coverage of fts5_index.c.
FossilOrigin-Name: c1f76686cee3918b1be785a4071d68cb3afda0ef
2015-09-14 19:51:05 +00:00
drh
b79d5529af Testability improvements for the ONEPASS_MULTI enhancement.
FossilOrigin-Name: d2df93f26fc0cf6fe01acfeaf2946972e9d8cca2
2015-09-14 19:26:37 +00:00
drh
b1ff90673c Fix a typo in an SQLITE_USER_AUTHENTICATION macro.
FossilOrigin-Name: 379455af9fdfb299a857d46f35f0a76ed6daa08a
2015-09-14 14:49:23 +00:00
drh
b0264eeca1 Use symbolic names ONEPASS_OFF, ONEPASS_SINGLE, and ONEPASS_MULTI for the
various modes of the one-pass optimization.

FossilOrigin-Name: 16e56bdadef903c6439a487f2683388aeeb0c625
2015-09-14 14:45:50 +00:00
drh
66336f3755 Fix a compiler warning and providing missing VdbeCoverage() calls.
FossilOrigin-Name: 2edd2e5edd60210e18db58bce1e096dd211b6ece
2015-09-14 14:08:25 +00:00
dan
e402dc57ae Use a single-pass approach for DELETE statements on non-virtual tables that do not require trigger or foreign key processing.
FossilOrigin-Name: 8b93cc5937000535c35c763c9326507a19892a6e
2015-09-14 11:09:58 +00:00
dan
c6157e1971 Avoid calling sqlite3VdbeCursorMoveto() from more than one point in vdbe.c. Doing so prevents it from being inlined as part of OP_Column.
FossilOrigin-Name: 166d5af8914c6954fb24a06e9686f194c0d0acde
2015-09-14 09:23:47 +00:00
mistachkin
c215322bd7 Add static VFS mutexes to the primary header file comments.
FossilOrigin-Name: 9a867d9fbe74fe2b33d55e32737a66e9a77b7466
2015-09-13 20:15:01 +00:00
dan
7210b3d1e8 Fix compiler warnings in delete.c.
FossilOrigin-Name: 0a4d285e18b78cd529483ba5c8c607ab62a443d4
2015-09-12 19:50:58 +00:00
drh
2e25a00019 Fix API documentation typos. Emphasize that the sqlite3_config() routine is
not threadsafe.

FossilOrigin-Name: 786333e05a75406bbd0b5c9c7beb8f16022eabec
2015-09-12 19:27:41 +00:00
dan
f0ee1d3c12 Experimental change to use a single-pass approach for DELETE statements on non-virtual tables that do not fire triggers or require foriegn-key processing.
FossilOrigin-Name: eaeb2b80f6f8f83679c8323a81bb39570ec946fe
2015-09-12 19:26:11 +00:00
mistachkin
04abf0878f Import common changes from the mutex initialization branch.
FossilOrigin-Name: 334720c01722478af0d3dfd6fe8bafd88ba09f49
2015-09-12 18:57:45 +00:00
drh
b3366b99c8 Update evidence marks due to wording changes in requirements text. No
changes to code.

FossilOrigin-Name: 86781093bdb4c4fdedd228cb1c8961db48a483bb
2015-09-11 20:54:44 +00:00
mistachkin
16a93128f8 Fix harmless compiler warnings.
FossilOrigin-Name: bfc7b84b766860d2e410702ba7c1166d7328309a
2015-09-11 18:05:01 +00:00
drh
e98b6fab47 More test cases in test/json102.test corresponding to new examples in the
json1 documentation.

FossilOrigin-Name: f599a42e190b4b89d74055402143c5487985cd90
2015-09-11 15:32:33 +00:00
dan
bcb04b6128 Fix some compiler warnings in fts5 code.
FossilOrigin-Name: 0dc436116e55e3fd55eb6085ada71e099069b32d
2015-09-11 14:15:46 +00:00
drh
12b3b89542 Updates to the sqlite3_value_subtype() and sqlite3_result_subtype()
documentation and to test cases for json1 dealing with those interfaces.

FossilOrigin-Name: d6cadbe9fefce9a7af6b2d0cb83362f967d7d89a
2015-09-11 01:22:41 +00:00
drh
46f76d6c3c Add new interfaces sqlite3_value_subtype() and sqlite3_result_subtype().
Update the json1.c extension to take advantages of those interfaces to avoid
the goofy '$$' path syntax and to allow nested calls to json_array() and
json_object() that work as expected.

FossilOrigin-Name: db4152aef2253ed2a33e3cad01e0c6758e03f900
2015-09-11 00:26:04 +00:00
drh
f5ddb9c214 Take out the goofy '$$' path syntax. Instead, use subtypes to communicate when
a string is JSON.  Add the json() function that validates and minifies the
JSON and sets the appropriate subtype.

FossilOrigin-Name: 8a80d6459e246ec1b38325e1cbd1e862157138b3
2015-09-11 00:06:41 +00:00
drh
cf94f17964 Make the sqlite3_value_subtype() and sqlite3_result_subtype() interfaces
available to loadable extensions.

FossilOrigin-Name: c6fca0be11f7414292279e2ea1b004260e6f4bb6
2015-09-10 20:40:21 +00:00
drh
bcdf78a61c Experimental implementation of sqlite3_result_subtype() and
sqlite3_value_subtype() interfaces.

FossilOrigin-Name: 7b5be299c617a3d3ed327ed30ef0a66a62c85b1f
2015-09-10 20:34:56 +00:00
drh
0b19c96935 Fix a potential NULL pointer deref in the testing logic of pcache1.
NB: The -DSQLITE_TEST compile-time option is needed to hit the problem.

FossilOrigin-Name: f5580f08538636ffb1367e717a33756288ccddde
2015-09-10 19:22:25 +00:00
dan
33c47f565c Modify the fts5 leaf page format to permit faster seek operations. This is a file-format change. Any existing databases can be upgraded by running the fts5 'rebuild' command.
FossilOrigin-Name: 0c0c4ae971e54efc526eed7bd071c90dfadb95ff
2015-09-10 17:23:37 +00:00
drh
383de6918c Create separate "path" and "root" columns in the json_each() and json_tree()
virtual tables.  "Root" is the 2nd parameter and is fixed.  
"Path" varies as json_tree() walks the hierarchy.

FossilOrigin-Name: 127cce3eb96b819005832997e0a082df9fb96f0b
2015-09-10 17:20:57 +00:00
dan
204debf3a3 Increment the fts5 version value to indicate that the on-disk format has changed.
FossilOrigin-Name: 99de5e3613d557728dd196353516bc7cf64a0e6c
2015-09-10 16:39:38 +00:00
dan
56c8634853 Fix a segfault in fts5 that could occur if the database contents were corrupt.
FossilOrigin-Name: 4931e37da4d2c26d7afc5432f7f0d534b51a85fa
2015-09-10 16:19:01 +00:00
dan
40d45f8960 Merge latest changes from trunk. Including fts5_expr.c fixes.
FossilOrigin-Name: 716e7e747714d6af502f6a87ca8d789bb7ce162a
2015-09-10 15:52:42 +00:00
dan
b97efa0ba3 Update description of on-disk format in fts5_index.c.
FossilOrigin-Name: 85aac7b8b6731e2f6880b80cfd62d431ea059799
2015-09-10 15:49:16 +00:00
drh
0c2750889e Make the sqlite3ext.h header file responsive to -DSQLITE_OMIT_LOAD_EXTENSION.
FossilOrigin-Name: 47a46a9fa4a96cdb96a20b6aec802661b1ee4598
2015-09-10 15:24:27 +00:00
drh
e6f5278c9a Disable tests for json_each() and json_tree() on builds where
virtual tables are not supported

FossilOrigin-Name: bb8ee3b140a0a8b7c89f5debf22369f204ceef0b
2015-09-10 15:22:35 +00:00
drh
b1031f05e0 Fix the --help option on test/releasetest.tcl. Also fix the final error
count so that it includes a count of subtest crashes.

FossilOrigin-Name: 9ecf684dfe0cd7e3b058d208aca7eb600bf1d21b
2015-09-10 15:20:49 +00:00
dan
e712acb641 Revert an accidentally committed makefile change.
FossilOrigin-Name: 402704b13f1f246c0224f90862bed93a825575f1
2015-09-10 10:40:00 +00:00
dan
f679d97d18 Fix an fts5 problem that could occur if a term and the first associated rowid are on different leaf pages.
FossilOrigin-Name: ffe2796ac9244c62325fce4960f26c653321623c
2015-09-10 10:01:30 +00:00
dan
a5aa8e1db2 Change the array of 16-bit offsets at the end of each page to an array of varints.
FossilOrigin-Name: fab245bea4f283714c17bca22428d5eb4db5935a
2015-09-10 05:40:17 +00:00
drh
0e8729dbe4 Attempt to declare sqlite3MemoryBarrier() correctly for all possible
build configurations.

FossilOrigin-Name: da8a288f8ef4be34281519b4b4db9b857b9d168b
2015-09-10 04:17:06 +00:00
drh
852944eb9b Fix the json_tree() scan for the case when a path is supplied. Add new
json1 test cases.

FossilOrigin-Name: 6adc7de76acee6cfb5ff761739e7a8de7b5bf4b2
2015-09-10 03:29:11 +00:00
drh
5fb72e5f3e No-op the sqlite3_memory_alarm() interface in a different way, that does
not break legacy memory behavior.  This is a re-do of
check-in [5d3f5df4da9f40d5].

FossilOrigin-Name: 8250e2a487ee12c9a2dea5603ab60aed51e5dc7b
2015-09-10 01:22:09 +00:00
mistachkin
f5eac36a64 Fix harmless compiler warning in FTS5.
FossilOrigin-Name: 86146a731d75eb25279c0e072c0bdda593de905d
2015-09-09 23:54:46 +00:00
dan
5c472d0860 Fix an assert() enabled by SQLITE_ENABLE_EXPENSIVE_ASSERT in wal.c.
FossilOrigin-Name: 8d2ed150a7a15626965cf994ef48c3ab61eca6ec
2015-09-09 19:44:33 +00:00
drh
8820250e8d Fix a possible NULL pointer deref when using SQLITE_ENABLE_MEMORY_MANAGEMENT.
FossilOrigin-Name: 89bfdbfe943adce8e02c84ede014fcfed504c5d3
2015-09-09 19:27:10 +00:00
mistachkin
3f62cb5aad Fix harmless compiler warning.
FossilOrigin-Name: 280fd3a482978b4a488a8b425721e451c2a30745
2015-09-09 17:23:48 +00:00
mistachkin
4b03efb695 Fix harmless compiler warnings in FTS5.
FossilOrigin-Name: 2cdb18778f20baa902e54f218ba26d2bacf0801e
2015-09-09 17:17:22 +00:00
drh
3c03afd3f5 When running a CREATE TABLE AS, make the initial temporary sqlite_master entry
for the new table a real record rather than a NULL, in case the query after 
the AS actually tries to read the sqlite_master table.
Fix for ticket [acd12990885d9276].

FossilOrigin-Name: 4a18d8bd4cc66eb08c6198cdf6e14f1bce0ec05a
2015-09-09 13:28:06 +00:00
dan
f06bd2c132 Fix a bug in preprocessor macros within fts5_main.c.
FossilOrigin-Name: 0eb2b9521fad6fa36e6fa374c2bc1f70b5180f7c
2015-09-09 08:15:06 +00:00
drh
0c6dfaa34a Remove an unused local variable from Lemon.
FossilOrigin-Name: fe9ffe5eed7d376f3f08c78c1ce5514c886f3479
2015-09-08 21:16:46 +00:00
drh
a46a4a63de Enhance the DBSTAT virtual table with a new hidden table "schema" that if
set will cause the table to report on the specified schema rather than on
"main".  Also:  Fix a faulty assert in sqlite3_context_db_handle().

FossilOrigin-Name: 6beb512c7a3c3649b56f0df1ca77855535a87ba7
2015-09-08 21:12:53 +00:00
drh
b4d472f609 Eponymous virtual tables exist in the "main" schema only. Enforce this rule.
FossilOrigin-Name: 06f90bb274c4bb0c30585024c8d365d43c4162f2
2015-09-08 20:26:09 +00:00
dan
fe8e2eba0a Remove the 0x00 terminators from the end of doclists stored on disk.
FossilOrigin-Name: 00d990061dec3661b0376bd167082942d5563bfe
2015-09-08 19:55:26 +00:00
drh
310a8d6668 Fix the help message that sqlite3_analyzer.exe generates for invalid
arguments.

FossilOrigin-Name: 33a14e7be1004abca7a30f675459138d7f8d72b1
2015-09-08 17:31:30 +00:00
drh
337cd0def4 Minor tweaks to Lemon.
FossilOrigin-Name: 986677224a8da5e79fbbd90673f1b595da89c5d6
2015-09-07 23:40:42 +00:00
drh
3921d8be5d Enhance the Lemon parser generator to add SHIFTREDUCE states that reduce the
sizes of some of the parser tables.

FossilOrigin-Name: 99b992fa840707711d99f8d05b62412f7008cd93
2015-09-07 20:11:30 +00:00
drh
ae2a4084a2 Fix an unreachable branch in the new parse automaton.
FossilOrigin-Name: e9d604b4306a86faae315ac3cba59bf07d1b665c
2015-09-07 20:02:39 +00:00
drh
a248a722cf Change the parser engine so that it (once again) waits for a lookahead token
before reducing, even in a SHIFTREDUCE action.

FossilOrigin-Name: 2c17a1358353a0845b039283be79353f033e2491
2015-09-07 19:52:55 +00:00
drh
3bd48ab213 For the Lemon-generated parser, add a new action type SHIFTREDUCE and use it
to further compress the parser tables and improve parser performance.

FossilOrigin-Name: 531c3974b3d586c1989cde905b2fb4681239a570
2015-09-07 18:23:37 +00:00
drh
7e698e9d71 In the "parse.out" output file from Lemon, show addition the complete text
of rules on reduce actions.

FossilOrigin-Name: b6ffb7e471e51ff69668154ad2c8790e466c9d37
2015-09-07 14:22:24 +00:00
dan
60f8139a96 Use macros to make the code in fts5_index.c easier to read.
FossilOrigin-Name: 67ff5ae81357eb7fa28049bb724a22cb6f52e076
2015-09-07 08:14:30 +00:00
drh
c75e0166f0 Improved "Parser Statistics" output (the -s option) for the Lemon parser
generator.

FossilOrigin-Name: 809503e4efcdb498d176e8c0794a5ba0882adef2
2015-09-07 02:23:02 +00:00
drh
2d64034bc2 Improved memory barrier that should work with MinGW on older versions of
Windows.

FossilOrigin-Name: 47dc24bd1e8f76eb17ba53a883b8984b3e1b2934
2015-09-06 10:31:37 +00:00
drh
6081c1dbdf Add a memory barrier to the mutex initialization logic, try to work around
an issue reported by WebKit.

FossilOrigin-Name: 11a9a786ec06403addb47f5c6fb142b382fae522
2015-09-06 02:51:04 +00:00
drh
0b8d255c37 Omit all use of Expr nodes for TK_AS, as those nodes no longer served a useful
purpose and in fact interferred with the query planner.

FossilOrigin-Name: 7ab0b258eabfcfb7f1b0bd1b12e166d2f267823d
2015-09-05 22:36:07 +00:00