Commit Graph

14695 Commits

Author SHA1 Message Date
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
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