Commit Graph

19112 Commits

Author SHA1 Message Date
drh
928ba14904 Fix a harmless compiler warning in the kvtest.exe program.
FossilOrigin-Name: d48972cf873f8e2499f7c77f8062fde439e7426b616514c147810763469d7c6a
2018-03-28 22:08:44 +00:00
drh
5013c4b9af Fix a harmless compiler warning.
FossilOrigin-Name: f0d12354bba96056f930e5ed3e88c37ec139211be09e6cd6eb7310e979de56c8
2018-03-28 21:45:03 +00:00
dan
3a95c65e37 Add -DSQLITE_ENABLE_DESERIALIZE to the "Device-Two" configuration in
releasetest.tcl.

FossilOrigin-Name: 765a014d8e91be18ac0f12f0fe94f4126bf8ce101f5c9d7f234376e2368f6db3
2018-03-28 20:29:04 +00:00
drh
424981d349 Remove tab characters. No logical changes to code.
FossilOrigin-Name: eb29b3369e76ec1df25a5484d8ec5fb924e23d5c70aaa4d794b2b17ee18784c8
2018-03-28 15:56:55 +00:00
drh
840fda482b Minor comment changes.
FossilOrigin-Name: d282f064698782cf7b584138549a6b27befa0b945ae96b52a3ef6f8a13448077
2018-03-28 15:06:39 +00:00
drh
43a9385def Fix a typo in the README file for ICU. No code changes.
FossilOrigin-Name: 79c4383b66fee9d43a75eef30ed0364573fc99e6d3be12267a99773ab8f57a9f
2018-03-27 22:58:45 +00:00
drh
6a9b9527fa The push-down optimization was being too aggressive such that it sometimes
generated incorrect results.  Reinstate the restriction (4) (with
qualifications) that was removed by check-ins
[b5d3dd8cb0b1e4] and [dd568c27b1d765].

FossilOrigin-Name: f08c1731b0b1dddcba190b094a35306a159713d3db939330f73075ff1d72c81e
2018-03-27 15:13:43 +00:00
drh
f900327ed8 Provide the ability for the VFS to do a blocking wait on locks if compiled
with SQLITE_ENABLE_SETLK_TIMEOUT.

FossilOrigin-Name: e7dff982be753bc93123db6a0e8fefd56f2a14fd1c9a8699af0b6b75bc88fc15
2018-03-27 13:57:31 +00:00
drh
000705bcce Do not inject OOM errors on SQLITE_FCNTL_LOCK_TIMEOUT calls as an OOM is
not possible in that context.

FossilOrigin-Name: 5474e560eeb0269964b70bcd876bb86b4197c4fb164bc13454fb8204f083062c
2018-03-26 21:05:47 +00:00
drh
fd72563d0a Avoid a race condition that might cause a busy_timeout to last longer than
it should.

FossilOrigin-Name: b81960561b47a1b49646f2f8870dd0684dc4ca7c0b9e11076fd713de66b75972
2018-03-26 20:43:05 +00:00
dan
b948948542 Fix a typo preventing test script avtrans.test from running in auto-vacuum
mode.

FossilOrigin-Name: c7473bdb1055df06dc6a93a39ba7f56116f6866292784c4938d843531500c368
2018-03-26 17:56:39 +00:00
drh
f0119b2e1b Add infrastructure to support for using F_SETLKW with a timeout on system
that support that functionality.  Requires SQLITE_ENABLE_SETLK_TIMEOUT.

FossilOrigin-Name: 2e54a7433ece4eb27e71bda6f2d121d5aa46ddd5a481357d8543d1432aaad689
2018-03-26 17:40:53 +00:00
drh
80262896d6 Refactor some internal object element names used by the busy handler, to
simplify analysis.

FossilOrigin-Name: 6c40c5574f4ae9795a142d01a8f84afd1b72678ea5f6bfca14a8646c4e862605
2018-03-26 16:37:53 +00:00
mistachkin
43ff906d3e Fix a couple issues in the 'session' module tests.
FossilOrigin-Name: ccf734f7d2bf8f99f3c55124b05c1835e4371bc269f27700f40afc26e7c1bc55
2018-03-24 23:16:05 +00:00
mistachkin
2c42c34df5 Fix harmless compiler warning seen with MSVC.
FossilOrigin-Name: e9508ab1f86ac70a3ca5622ce44141bc05186b199bf32fb8739aef36b95aa05c
2018-03-24 20:06:52 +00:00
drh
821b610b63 Add testcase() macros and improve comments in the LEFT JOIN strength reduction
optimization.

FossilOrigin-Name: 5613457714dd74d6da8e387132a0d8e64980ba4a921a9f53773540b02c0ccec6
2018-03-24 18:01:51 +00:00
drh
e3eff266bc Yet another fault in the sqlite3ExprImpliesNotNull() routine, causing errors
in the LEFT JOIN strength reduction optimization of check-in
[dd568c27b1d76563].

FossilOrigin-Name: e88cf3d4df64097ebc19aae464b88d0faf9b7d4c30d057042b582d78327e7ad3
2018-03-24 15:47:31 +00:00
dan
07f119e470 Fix a test script problem causing shell1.test to fail with
-DSQLITE_OMIT_VIRTUAL_TABLE builds.

FossilOrigin-Name: 2e06906e0959e1256fc2feb9dc2c3a9d1e9c19c4ba59585fe52df9af174ab443
2018-03-24 15:08:48 +00:00
drh
2c492061ce Bug fix in the LEFT JOIN strength reduction optimization of
check-in [dd568c27b1d76563].  The sqlite3ExprImpliesNotNull() routine was
mistakenly assuming that a CASE expression must always be NULL if contained
any reference to a variable that was NULL.

FossilOrigin-Name: cf171abe954a5f25262161dd69f2e8cecdbf9446c3f6b298201507dbc743567e
2018-03-24 13:24:02 +00:00
drh
b873f4e404 Prepend linkage macros to the sqlite3rebaser interfaces.
FossilOrigin-Name: c64e8f377fe4fa321ebd04806cc27b19287e6fc3523b9988c0a70cad9fce1c18
2018-03-24 00:19:18 +00:00
dan
cbeee957e5 Fix typos in sqlite3session.h preventing documentation webpages from being
generated. Also mark all new sessions functions (those related to rebasing) as
experimental.

FossilOrigin-Name: de974235a8fefab0d08673c1b1da4e425e1d8bbfc8c35dac30943c05337b2950
2018-03-23 17:36:31 +00:00
dan
3f2cebb6b4 Fix minor problems with passing NULL pointers to memcmp() and memcpy() found by -fsanitize=undefined.
FossilOrigin-Name: 0b06ce6d8e7cff5cd5d467a94522dfef5593d7c26663ce03c2c2b663a2641551
2018-03-23 16:31:34 +00:00
drh
4aafe5957d Fix the -readonly option on the CLI so that it actually works.
FossilOrigin-Name: 0477fb3fd68509547f3bfd588247aac59aa4aa885ed8a21269852eda64e257ad
2018-03-23 16:08:30 +00:00
mistachkin
cf847d44ac Add some more tests for the IS TRUE / IS FALSE operators.
FossilOrigin-Name: 9fe5bebefe909288e583226b5dc32e0465f6b2d8eda850d01820e3f1f8091ddd
2018-03-23 14:56:05 +00:00
drh
8ad427f456 Fix typo in a comment used for documentation. No changes to code.
FossilOrigin-Name: 49974d3b30faaad0891a43d5e840f5dd2dc50ad6c4e6c408292de04e9e8a8868
2018-03-23 14:50:51 +00:00
mistachkin
9d107262e4 Enhance .schema in shell to enable matching patterns with literal underscores.
FossilOrigin-Name: 98e3f5247a6012f58642a2fcdc9be062f7afe8f2e154d06007f4935a0fd87aac
2018-03-23 14:24:34 +00:00
drh
f53f88aba6 Fix an error in the CLI in the previous ([0249d9aecf69948]) check-in.
Only the pattern to sqlite3_strlike() need to be escaped.

FossilOrigin-Name: 71d5f6e6322dc037a0e9089049e5d154100b2918830826e30f8043f01a287c00
2018-03-23 13:18:15 +00:00
drh
cedfecf90a Fix the ANALYZE command so that it will process tables whose names begin
with "sqlite" as long as they do not being with "sqlite_".

FossilOrigin-Name: 0249d9aecf69948d9343feef9291273beef5fc98aa9a8f95b1e35cc2ce8e6cbd
2018-03-23 12:59:10 +00:00
mistachkin
ce2052bc39 Fix harmless compiler warnings seen with MSVC.
FossilOrigin-Name: 2f2be1b1811e6b83fc8945da06e57b8b54233ff8a6ebd9d71b22c6bab2e74afb
2018-03-23 00:31:53 +00:00
dan
a968e74fdc Add APIs to the sessions module for "rebasing" changesets.
FossilOrigin-Name: 509506c76b7c104961826721013889d6c6b2ed9b563dcd029e0cb5cb5c34693a
2018-03-22 20:35:20 +00:00
dan
8cb83bee0f Remove some unused code from sqlite3rebaser_rebase().
FossilOrigin-Name: 07cc955eab0e993a75be82d58e17ca53c8abbcaf851983d235049599c19e582f
2018-03-22 20:11:14 +00:00
dan
f231e18c6b Fix another problem with rebasing updates against multiple remote changes.
FossilOrigin-Name: c8e7b5a061a3f2fbd9072530177b80f917b39ab5d7cd6acb0a221ab33e78a5cd
2018-03-22 19:52:22 +00:00
dan
516c35a72a Fix an RBU problem causing errors when updating tables with default collation
sequences that require quoting (e.g. COLLATE "ICU_root-u-kn-on").

FossilOrigin-Name: eb4f452e354065d610ff57a6a9312ad119b6b0cc467f9dff105f0718bc27ef01
2018-03-22 17:13:44 +00:00
dan
fc50a71be1 Fix a test script problem causing rbuvacuum.test to fail when run along with
other tests.

FossilOrigin-Name: 901cb3b6a2c8d0cc33bd34ec1dbeea49c779ae1ac3ed6733dd9826c8e0eb80c8
2018-03-22 17:02:37 +00:00
dan
3fa5463c03 Add tests to ensure that patchsets are handled correctly by the session rebase
APIs.

FossilOrigin-Name: 0e45baaec01947f6cbf47d5d5922a4cabe7d27181c04c0a08259c952fd023947
2018-03-22 14:07:36 +00:00
drh
c6c5ab80ee Add the left join strength reduction optimization. Enhance the push-down
optimization so that it works with many LEFT JOINs.

FossilOrigin-Name: dd568c27b1d7656388ea5b4132cc0265aedd7348d265d8e8c7412b00b28a31aa
2018-03-22 12:00:43 +00:00
drh
66651c2b4b Add the --valid-sql option to the optfuzz test program.
FossilOrigin-Name: a8dfeec73b069f2dd7371c2792b36f152945d32120843db5361ff7e04de177bc
2018-03-22 11:28:31 +00:00
dan
b880a7b1f0 Remove some unused code from the sessions module.
FossilOrigin-Name: a09518ab63a1ef1b7f56b9f9b16269fd83920469d4c4e179b1f68b35df4e0c4b
2018-03-22 11:15:59 +00:00
drh
00f0375df7 Get the optfuzz program working.
FossilOrigin-Name: 21346bbce9fd161e8a2037834a6e8eb443a901109ddb3a52c1b7a29000ffeac8
2018-03-21 20:21:29 +00:00
dan
f3f6a5dec3 Merge latest trunk changes into this branch.
FossilOrigin-Name: d00b71ecf857bc6d903442d91418d5a313c584dcdd8e9c8ff3b5d940dd45bcc5
2018-03-21 20:13:56 +00:00
dan
95ccb6dc8e Fix some documentation and other issues with the code on this branch.
FossilOrigin-Name: a9ec68627a4533ca6aa7cc1b73f864db615a80e86eda9e33660f22d269a1ba1e
2018-03-21 19:46:36 +00:00
drh
30f30133d7 Add the optfuzz.c program for verifying the query planner using a fuzzer.
This is an initial code check-in.

FossilOrigin-Name: 3fb21251b0c9c731513e8fb137867c2710a77d99411c99348d3ac45d3babffd7
2018-03-21 19:25:59 +00:00
dan
24a0c4534a Fix rebasing of UPDATE changes against a set of remote changesets that feature
both OMIT and REPLACE conflict resolution on different fields of the same row.

FossilOrigin-Name: d8bc3fdb6ba165ca8d7cab857ede8e7e6e2fac24ad59580c5e1db1a4942d295c
2018-03-21 17:29:53 +00:00
drh
7fbb101c54 Relax LEFT-JOIN restrictions on the push-down optimization.
FossilOrigin-Name: b5d3dd8cb0b1e42ed0671a12d22af05194ea9522e4f41fd4bb0deff70b8b0757
2018-03-21 01:59:46 +00:00
drh
efce69de37 Do a more thorough job of cleaning erasing traces of the strength-reduced
LEFT JOIN.

FossilOrigin-Name: 08833dda3a25965cc509d0244d7cd68bdb2306351ca52862f347e1efe5db4508
2018-03-20 22:52:27 +00:00
drh
2589787c5a If terms of the WHERE clause require that the right table in a LEFT JOIN
not be a null row, then simplify the LEFT JOIN into an ordinary JOIN.

FossilOrigin-Name: 5b7abecc7ab8ccbbb8cb5e0f672e67625c2555ad03442efbf34cb395f5bb71a8
2018-03-20 21:16:15 +00:00
dan
bd45374cc8 Add further tests and documentation for the sessions rebase feature.
FossilOrigin-Name: 7475a363ebb272ae23c0796fe7587714a156dc6a3a4a57ed948ed6f69d3c1218
2018-03-20 20:27:03 +00:00
drh
f6e6f02308 Fix incorrect testcase labels on two cases in join5.test. No changes to code.
FossilOrigin-Name: 4661ac81c9589b06a07df8b7931fbd0a7f9a4e9ba1448192b70701dc85a29bd2
2018-03-20 19:02:03 +00:00
drh
cd0abc24d1 Improvements to the HAVING-to-WHERE optimization. The code uses less space
and less CPU, and there is now ".selecttrace" output.

FossilOrigin-Name: 5ad668d4339397fe66fe085e0527e37a1930917da88d462a8d89a465faa15e28
2018-03-20 18:08:33 +00:00
mistachkin
de8113c31e For 'zipfile', detect attempts to cause a duplicate entry via UPDATE. Also, fix handling of 'UPDATE OR REPLACE' statements run on zipfile virtual tables. Win32 portability fixes to the 'fileio' extension. Miscellaneous test fixes.
FossilOrigin-Name: b36caeca91647616ac2ccdb281200c1a8bcd15d1f30dda0c1d89440d54607196
2018-03-20 16:56:12 +00:00
drh
6974cdcec7 Avoid unnecessary write to the sqlite_sequence table when an insert
is done into an autoincrement table with an application-specified rowid
that is less than the maximum.

FossilOrigin-Name: ec7addc87f97bcff3c3694b14a680453b52de3f8c106436f0708a1cc04b90faa
2018-03-20 13:44:10 +00:00
drh
f36e4069f3 Add the ability to disable the push-down optimization using the 0x1000 bit
of SQLITE_TESTCTRL_OPTIMIZATIONS.  Also some documentation fixes and an
enhancement to ".eqp full" in the CLI.

FossilOrigin-Name: ae34edb7f4fa7b37a66cdf3a1d851980cb013e9abe72bdeca23e5323051e0646
2018-03-20 13:26:03 +00:00
dan
93c803e960 Fix handling of "UPDATE OR REPLACE" statements run on zipfile virtual tables.
FossilOrigin-Name: 9a5ef341de2bd2fc4657a510f48159f7876f58d340b457b4272a71d389f88da3
2018-03-20 13:26:01 +00:00
drh
9579947c55 Remove a debugging statement accidently left in
check-in [eddc35f3057e59fd]

FossilOrigin-Name: 85a31557ac0d0401c1bf2e23a502dc2ea57d9b1bc23c01de693f5d3fe22d8341
2018-03-20 13:00:33 +00:00
dan
d30830e42d Add a test case for the fix on this branch.
FossilOrigin-Name: 7834cf6c28c63f6ca0e29a508c0f6e3ec9c5c48715344c2db99a9866e92ef205
2018-03-20 12:12:06 +00:00
drh
51efe098f4 In the CLI, avoid extra .selecttrace and .wheretrace output when in ".eqp full"
mode.

FossilOrigin-Name: 427bbf318a28e827bf03d43c2912c8ad937dd52f829feaf7fe374093692ed61b
2018-03-20 12:04:38 +00:00
drh
8b3424d4ee Closer reading of the sqlite3_db_config() documentation show that it is
subtly incorrect.  This check-in fixes the problem.  No code changes.

FossilOrigin-Name: 44d90e7f4bc83680e8fbbf1a0423c6f5cc2cc2aed118b7af1c4c3d9e09b05dd7
2018-03-20 11:58:28 +00:00
drh
d06b5357a4 Fix a minor formatting issue on the sqlite3_db_config() documentation.
No changes to code.

FossilOrigin-Name: 8a439a6dda390d7486feb837f87a83e16abd283c882e81e637bd1235d2684379
2018-03-20 11:51:36 +00:00
drh
2d277bb5cb Add the ability to disable the push-down optimization using the 0x1000 bit of
SQLITE_TESTCTRL_OPTIMIZATIONS.

FossilOrigin-Name: eddc35f3057e59fdc25a6911abfaa53a10cc43d8030925b65737b2f51f907421
2018-03-20 11:24:30 +00:00
drh
cfd74700da Minor improvements to ".selecttrace". No changes to non-debug code.
FossilOrigin-Name: 03e541f606ead1a13e1084db88e168278c82a2ba72b18c89baafeab3141367b4
2018-03-19 22:28:34 +00:00
drh
8c1eba75a3 Enhance the command-line completion extension to return the names of
triggers and views along with the names of tables.

FossilOrigin-Name: 10e32204e1850354ff16fc052145726e903f87185a37f172831dddad1955184e
2018-03-19 19:05:45 +00:00
drh
9d03f63a7c In the compile_options pragma, show the actual value of the
SQLITE_ENABLE_CEROD compile-time option, if it exists.

FossilOrigin-Name: 1ec339fd109b31e1d2b1e73345bd7a00c3d755f2c45c14d050a8203969163d60
2018-03-19 16:09:36 +00:00
drh
926961dc53 Improved ".selecttrace" output formatting. No changes in non-debug code.
FossilOrigin-Name: 30704d2a52d37717d8b34a402c99ea32453e5c1a9840037dba96591f4acc1503
2018-03-19 16:06:11 +00:00
drh
929cce8890 Do not use sqlite3_column_decltype() in the CLI if it is compiled with
SQLITE_OMIT_DECLTYPE.

FossilOrigin-Name: 442e816b5fed80ebeb58c7c0ab9c2ef999bf488519bf5da670e9cec477034540
2018-03-17 16:26:36 +00:00
mistachkin
2cc8f4831e For 'zipfile', detect attempts to cause a duplicate entry via UPDATE.
FossilOrigin-Name: cf78a882799424610209e9ac5e76771db3f5e6704ffa181f9598eb0986d93eb8
2018-03-17 02:13:13 +00:00
mistachkin
d42d8ae337 Another Win32 portability fix for the 'zipfile' tests.
FossilOrigin-Name: 9f604418ca21472d84d754f4c3b7f170e5c2bff05e8cee86640e45b43bc53a49
2018-03-17 00:44:29 +00:00
drh
0d060a071e Detect corruption in the form of the sqlite_sequence table pointing to the
wrong type of btree.

FossilOrigin-Name: 525deb7a67fbd64726c89d5cc36a54b090111e31239431efeeb2bda9836828e0
2018-03-16 23:59:36 +00:00
mistachkin
42a0dbfe92 Win32 portability fixes to the 'fileio' extension.
FossilOrigin-Name: 9d2b0f8b84aac862b0572b183e3ba53ea8c0d8742aaa3c3fbe59f6036054fd1a
2018-03-16 23:54:36 +00:00
mistachkin
b5a4a7053b Enable more 'zipfile' tests on Win32.
FossilOrigin-Name: 49d2566c8e7d0df37494ee001fc6eae5f47f95e16f6a575f2d8d6777b62e6068
2018-03-16 23:54:26 +00:00
mistachkin
3c6de3266e Make a couple tests less sensitive to timing.
FossilOrigin-Name: bc2af8e0aa28d8d10612ab9464c008a970348b4720bb34d0c546d341e2bc09e0
2018-03-16 23:54:12 +00:00
mistachkin
2d44d556b5 Fix a duplicate test number and cleanup a bit of Makefile whitespace.
FossilOrigin-Name: 56d11c250961790579a7aeee65e83fdb29462ae37f9de93da13fbd890fc0a01d
2018-03-16 23:53:47 +00:00
drh
86c369428f Detect databases whose schema is corrupted using a CREATE TABLE AS statement
and issue an appropriate error message.

FossilOrigin-Name: d75e67654aa9620b9617786553a002f54e8c6dcbbcc58948a06bd98a0916d75a
2018-03-16 20:23:01 +00:00
drh
1e9c47be1e Better error message text when the schema is corrupted by a CREATE TABLE AS
entry.

FossilOrigin-Name: e13993cf833423eec5f94082cee7213b2d97bcf40dddb2683cf5a8ebf50a33e3
2018-03-16 20:15:58 +00:00
mistachkin
8bbddd8049 Fix a parsing issue associated with a corrupt sqlite_master table.
FossilOrigin-Name: 5f779ff6b48ec97efacd49b1715b7e5272694fa839be349c90667812bbffe22b
2018-03-16 19:10:05 +00:00
drh
c8abbc11cd Avoid writing the sqlite_sequence table when it has not actually changed.
FossilOrigin-Name: 3e3849a9d1a06673e6c713a42194f5da339fbf6533fa418c38f63d09bc045867
2018-03-16 18:46:30 +00:00
dan
f01d3a7ef7 Fix a problem with handling rebasing UPDATE changes for REPLACE conflict
resolution.

FossilOrigin-Name: f7bf71f1d47044e3cbc74018294b8af5ad52c2bb84954e99bbd4e9b8c36fc077
2018-03-16 18:02:47 +00:00
dan
9f2b04533e Fix a problem in test script thread001.test causing a spurious "-1 files were
left open" error when run separately.

FossilOrigin-Name: 1774f1c3baf0bc3d83a53c52702696ff21814fa1de07cc38fd098832e6757b09
2018-03-16 07:48:43 +00:00
dan
f1b40e8305 Add simple tests for the sessions module rebase API.
FossilOrigin-Name: cf0d1abb44cf170d747e9c11f49ec03a29f00ab4821c613ca1e05b883a568211
2018-03-15 19:25:40 +00:00
drh
b39161647e Fix a typo in a comment used to generate documentation. No code changes.
FossilOrigin-Name: f1784aff4e6ff1c84d3fa0069034290154220fd2fa85c7df342c717ad54f4b91
2018-03-15 17:46:42 +00:00
drh
3571e7bf4c Fix an issue with the fsdir() table-valued function not resetting correctly
after each pass of a join.

FossilOrigin-Name: 7ce4e71c1b7251be9e922b21dfeba1f9aef6a47ce6495ecb7f94fd785ab564f2
2018-03-15 15:09:45 +00:00
mistachkin
093d63bf34 Draft fix for an fsdir() issue reported via the mailing list.
FossilOrigin-Name: 48641010c24bf37f13d68c4d19c5c3e9b41404af12a4947705cc53a31db04178
2018-03-15 05:25:57 +00:00
dan
c0a499eaad Add largely untested APIs for rebasing changesets.
FossilOrigin-Name: 39915b683b3f8d3bf872af1dede96bf2818b488a8638a1d248395023fc4bd0ef
2018-03-14 21:06:58 +00:00
drh
20a1f35928 Add the SQLITE_DBSTATUS_CACHE_SPILL option to sqlite3_db_status().
FossilOrigin-Name: 48a06eb02b42a021b835ff9766535805723259b9701b87fb17fa488b133cb53a
2018-03-14 15:25:43 +00:00
drh
15ca9e3e8c Disable one of the test cases from check-in [21ecbce1378f3cc4] when
API_ARMOR is not enabled.

FossilOrigin-Name: 8fb23d4281915b4507e4d42a300f4b5f958ad88ad408218659c7459775d7b114
2018-03-14 15:06:42 +00:00
drh
ffc78a41ea Add the SQLITE_DBSTATUS_CACHE_SPILL option to sqlite3_db_status()
FossilOrigin-Name: 3faeb851374471a6f94a6fab3a62c73d03330eae6fc72cd1a277b03ad12dcdd0
2018-03-14 14:53:50 +00:00
dan
68cf69ed8d Improve detection of out-of-range parameters in sqlite3_stmt_status() for
SQLITE_ENABLE_API_ARMOR builds.

FossilOrigin-Name: 21ecbce1378f3cc4b1051628b8c1580bb807c8745a1f525bc089036af93a54af
2018-03-14 08:27:39 +00:00
dan
a38e6c57bc Add sqlite3_changeset_apply_v2() and apply_v2_strm() to the sessions module.
FossilOrigin-Name: 445bfe977d9f3a891e08ef33237862ed047fe83e134ef3ed8b47ee0f5abd8cd6
2018-03-13 20:31:23 +00:00
dan
58db4c760f Fix a typo causing SQLITE_LOG_CACHE_SPILL builds to fail.
FossilOrigin-Name: 0171d4a71ca7911a9fd409a42eeed0eda4521b6e48df5cd058364c0a736313b7
2018-03-12 21:09:16 +00:00
mistachkin
840c300f4a Add more tests for the profile output of the Tcl trace_v2 method.
FossilOrigin-Name: 61eeb48f03f8a9a32330a5cae4387bb4e5618078cf669a5831910f99126900ec
2018-03-10 20:45:44 +00:00
drh
ffdab721a3 Fix the second callback argument to the "profile" response of the
"trace_v2" method in the TCL interface so that it shows the actual
number of nanoseconds for the command, not the address of the variable
containing the number of nanoseconds.

FossilOrigin-Name: 8f9a12518642e5be9760956ff345fe54ed5bd3cab55328e88312278d3d78bc76
2018-03-10 20:25:08 +00:00
drh
42f3c5ff25 Add support for INSERT OR REPLACE and INSERT OR IGNORE on the zipfile
extension.

FossilOrigin-Name: 8ad35d483e4293d5571eeacc20fd26cdc4064fbee7b63d974879d507a0ee5792
2018-03-10 14:17:01 +00:00
drh
41a6f2cb6d Improved error messages from the zipfile extension.
FossilOrigin-Name: f634a7e386918b829389f20c330d312315fdd61125cd2c5f66cf17a5d74bce49
2018-03-10 13:21:41 +00:00
drh
70acb0aa6b Avoid harmless left-shifts of negative numbers in the zipfile extension
when building ZIP archives of files with pre-DOS dates.

FossilOrigin-Name: 16bba8650cc24a0fd606944422bb31f2b8bdbe0a5a483678989e400b751eab4d
2018-03-10 12:53:20 +00:00
drh
ef29f73479 Fix the zipfile extension so that it is able to create symbolic link entries
in the ZIP file even on systems like Win32 that do not support symbolic links
on the native filesystem.

FossilOrigin-Name: 2a4493f4ad2d09c1097e98e7086623669f3f252571884d515e51a98b1c6855e1
2018-03-10 12:34:08 +00:00
drh
69d2d35523 Fix the .archive command in the CLI so that it actually compresses content.
FossilOrigin-Name: 3c2e3c2d3dd5d951099ad8d9f74d3c20dae11dd5615d86a6e2283b28ff5b19aa
2018-03-09 22:18:53 +00:00
drh
1bf208c701 Enhance the ".ar" command in the CLI so that it is able to update and
create ZIP Archives.

FossilOrigin-Name: 9404765ef7487013f01ecf24c0a1f70040cd11e7dbb6378646d15de4e5660a40
2018-03-09 21:54:01 +00:00
drh
393344f928 Setting ".stats 2" in the CLI causes column metadata for each
prepared statement to be displayed.

FossilOrigin-Name: 7fea00fd96a8ab7e65734540edb907b6224659ae95d7e0504755f2610c545587
2018-03-09 16:37:05 +00:00
drh
a10b999d14 Simplification to the shell_exec() mechanism in the CLI.
FossilOrigin-Name: 72e8f529ac8a268611f16456b13d55cc6c62df7f1a0aaa78a169338a0d95b960
2018-03-09 15:24:33 +00:00
dan
2d066bbfd8 Fix a problem in test file nockpt.test causing errors with
SQLITE_DEFAULT_AUTOVACUUM builds.

FossilOrigin-Name: e547c83f3eb71175574d4b49a0981b048bf525f57d36a2410d955cf1832bec22
2018-03-09 14:11:36 +00:00
drh
6131adc074 Fix a test case in zipfilefault.test so that it only runs if JSON1 is
available.

FossilOrigin-Name: 072b244790893a699dc49d7a2cead85bed016f8e28d18ae7662fbeb3298cb235
2018-03-09 14:06:11 +00:00
drh
980e2cd39a Attempt to fix a harmless compiler warning from Clang.
FossilOrigin-Name: bba1bfbde62733e14f458bf3b71cb00d4899a4ebae2553d6ed24d48495cdced1
2018-03-09 12:46:34 +00:00
mistachkin
6630f9407c Enable API armor handling for the new deserialize APIs.
FossilOrigin-Name: 0798c91aa9d5d347680a9d80d420224297360e03341365d48aca829cd7c423db
2018-03-08 19:56:52 +00:00
drh
3baed31edc Add the --append and --zip options of the CLI to the --help message.
FossilOrigin-Name: f010c86ecef4a1aaad986fa8ceb8230814d6c909cc28ce19e55d63f592fee9d0
2018-03-08 18:14:41 +00:00
mistachkin
8368692815 Include the 'sessionfuzz' tool in the clean target for MSVC.
FossilOrigin-Name: 0f5a8666b8b479bb6e470590659c1775fb9b0d6a9eee931cb48f98651cd7ffcb
2018-03-08 18:09:22 +00:00
drh
7bdbe301f6 Updates to documentation on sqlite3_serialize() and sqlite3_deserialize().
No changes to code.

FossilOrigin-Name: e71ceb6089695c651aaf1fa8662c5caf771ac9efc2f2e8efa0eddae6a6a389ea
2018-03-08 16:36:23 +00:00
mistachkin
f7c8a35b8d Fix harmless compiler warnings in the 'dbdump' tool.
FossilOrigin-Name: 2b9bb2664c56dd3280b4aad05b7f64dd23e5b992b5621a48dbfdb7c358d0f3ae
2018-03-07 21:39:25 +00:00
mistachkin
069720ea8b Fix harmless compiler warning.
FossilOrigin-Name: 706800ba377e4a1f615ee6ab44530742f23e1d1be5b658608ca2fd352b363cb2
2018-03-07 21:29:15 +00:00
mistachkin
98cb7a4894 Enable compilation of 'sessionfuzz' tool using MSVC.
FossilOrigin-Name: c58de43b8f2723d659fc9820caf667e215fdfa9aa2d7337fc82ba5b6f8db2e4c
2018-03-07 21:13:49 +00:00
drh
f94c1902b9 Add the sessionfuzz test program and data obtained from a week of running
AFL.  Automatically run this test program on any "make test" on unix.

FossilOrigin-Name: ecaedfe596d4c05546bfd798fdca94aff6a81f55be7b17ddb65fc5547c4b5aa6
2018-03-07 20:48:21 +00:00
mistachkin
391ac1b959 Update the autoconf Makefile for MSVC.
FossilOrigin-Name: 36fec7a4a75006d860aaf3ea6707cea25c5e16f2ac05c21c27fde80f3bfeec63
2018-03-07 15:54:39 +00:00
mistachkin
45fb850b35 Fix various compilation issues seen with MSVC.
FossilOrigin-Name: d6fa938919dbb3fe73ccdd3cbf0e9264d524ed79125f93f977a7d91c425db821
2018-03-07 15:19:22 +00:00
mistachkin
b649be3c3b Another tweak to the MSVC clean target.
FossilOrigin-Name: 493abf10bf7b2ea5a4bc430bec786598776f76985ab2d99c7d5117a9a9ff632c
2018-03-07 14:53:36 +00:00
mistachkin
23355215fb Fix harmless compiler warning in FTS5.
FossilOrigin-Name: 2d544711c7e9f4c2c3ca7ee7d588948d048da82e63c82f41c999fce947d6661d
2018-03-07 14:49:32 +00:00
mistachkin
ac8ba26ecb Fix utility compilation issues with MSVC.
FossilOrigin-Name: 5bd5a79898790bef150b2bc7f275333444b1a723385e595931377ff4d32190bf
2018-03-07 14:42:17 +00:00
drh
b0f0dc3073 Add the sqlite3_serialize() and sqlite3_deserialize() interfaces, enabled
when the -DSQLITE_ENABLE_DESERIALIZE compile-time option is used.

FossilOrigin-Name: fc42d31d6fca21abc5377a463ed800e3066b2f3fbd2d85cb486f402d2ae7cb15
2018-03-07 13:01:54 +00:00
drh
4811a710af Mark an unreachable branch using NEVER().
FossilOrigin-Name: fadbc5e23f93bedd705bdc83cd3781b3821a231034bae5b942c94da77227721c
2018-03-07 01:37:05 +00:00
drh
9c6396ecc7 Improved documentation for sqlite3_serialize() and sqlite3_deserialize().
Change the name of the compile-time option to enable these interfaces
from SQLITE_ENABLE_MEMDB to SQLITE_ENABLE_DESERIALIZE.

FossilOrigin-Name: f07e97aed435b02e1473053c0257ec5c89bf0b3e46076b7a9382de432bbc2497
2018-03-06 21:43:19 +00:00
drh
8784efaea9 Handle some boundary cases in memdb associated with OOM faults.
FossilOrigin-Name: b58ca4cb0c921e81efad527c80b220be120263cfdb04528ae26ecf8b8f66f44a
2018-03-06 20:54:27 +00:00
drh
14714167f7 Simplifications to the memdb VFS.
FossilOrigin-Name: 6c3f723a6856fa38ea3f11a36b56f46c5c1fcf17f4daf712e5e0b42562d5f4c6
2018-03-06 19:14:32 +00:00
dan
a48b020ddd Avoid running a couple of tests in crash8.test that depend on the presence of
the journal file if running on an F2FS file-system that does not require a
journal file.

FossilOrigin-Name: 797e02e0ee703ab0fd53e26ba5c96ac7429b8022522bec201423718d508acf24
2018-03-06 11:46:34 +00:00
drh
5f9d192de9 Improvements to the memdb VFS.
FossilOrigin-Name: a14fed69d0d4932fc6c71cf8acc5199cca4efbd10bca563a8e86038d6afd5c64
2018-03-06 04:01:08 +00:00
drh
bcdb28dff3 Merge the walIteratorInit() fix from trunk.
FossilOrigin-Name: 6399e101d5f6b8582640e0d90783e56042eaa1600db3bd02f8df5e7b01ac1cab
2018-03-06 02:00:20 +00:00
drh
49cc2f3b9c Fix walIteratorInit() so that it always leaves the iterator as a NULL pointer
if an OOM occurs.  This fixes an assertion fault introduced by 
check-in [044b0b65e716bff].

FossilOrigin-Name: e5ce256aa1f7a8ae995b79c9da895827bee5d8d0724fc15413ff203dc9e2602d
2018-03-05 23:23:28 +00:00
drh
8d43d8443d Merge the session fix from trunk.
FossilOrigin-Name: 6274cf1f397d36be9e9b65b1935a776c834e4512e0e89f82c132efd4d1e8ef82
2018-03-05 21:19:57 +00:00
dan
6344edda80 Fix another crash in the sessions module triggered by malformed input.
FossilOrigin-Name: 7e70c9b86af557e86152748ddf1da467e62817b35df1da0d7d3b67941b198897
2018-03-05 21:17:20 +00:00
drh
ad7fd5d096 Improved command-line help for the -A option on the CLI.
FossilOrigin-Name: d937ac181c5c78b9e5068db4ff1dab6becdba8c22cd27a3cfa0d4c12da1ec7ad
2018-03-05 20:21:50 +00:00
drh
93b7731485 A new way of doing archive commands on the command-line for the CLI. The -A
option means that everything that follows is a ".archive" command, including
any suffix on the -A option.

FossilOrigin-Name: 9d8081fabc491ba75d26ea81b3548bd10aeeb3334b0ad1462d7ab656c8d7c35e
2018-03-05 20:20:22 +00:00
drh
da57d9676a In the CLI, add a new command-line option "--archive" (also "--ar") that
passes all subsequent arguments to the ".archive" command.

FossilOrigin-Name: a5c4d30af1271dea2d322b0679fe963bbd0d5db6bba8904caf5e30e510d01832
2018-03-05 19:34:05 +00:00
drh
f111203287 Merge session fixes from trunk.
FossilOrigin-Name: 99c02aeecf47bfa5be5ce38a7ec20818ea0f9fb960b136184e1cb6f8fb8b70e5
2018-03-05 18:20:35 +00:00
dan
9c42626e43 In sqlite3_checker, wrap the call to "SELECT checkfreelist()" in a
transaction.

FossilOrigin-Name: 02906e55d73ea3521ad1e6807cffed5c759147f7b2d89efc4add984e53e3ad49
2018-03-02 20:00:42 +00:00
dan
f0cb61d6c2 In a checkpoint, figure out if it is possible to checkpoint any frames at all
before creating the wal-iterator.

FossilOrigin-Name: 044b0b65e716bffeddedbd1b0360c4c332f6d2359167c1d327a5ff96539474cb
2018-03-02 16:52:47 +00:00
dan
302ce47519 Optimize the obscure case of running a checkpoint against a very large wal
file for which a large percentage of the frames have already been checkpointed.

FossilOrigin-Name: 0f5057dffa9be1bccab04894709d25bf1f066c4b1aef50d67ee635d46d300a4d
2018-03-02 15:42:20 +00:00
drh
b2194cea4e Allow the zSchema argument to sqlite3_serialize() to be NULL to mean the
main database.

FossilOrigin-Name: 5b01b9914fb612ceece34f40d45c7eb97c3504fc5a0a5ff0e67120bdee67f6ee
2018-03-01 22:18:26 +00:00
mistachkin
5e9825ecc4 Typo fixes in comments. No changes to code.
FossilOrigin-Name: 1293d4f64f322ee57510bdff497c54e0be2c9205217e1fd96887bba1f36bec40
2018-03-01 18:09:02 +00:00
dan
e341ec699f Fix further crashes in sqlite3changeset_apply() caused by corrupt changeset
blobs.

FossilOrigin-Name: 2c01c72e357296d761493aac47329f15d87afcada2b39606fc018af0e0011bb5
2018-03-01 15:20:33 +00:00
drh
2825e4ebb1 Merge the latest enhancements from trunk.
FossilOrigin-Name: c8083de14b54fba1071385f8530d03d5684efd4963fde0f83ddc53ae3118a75b
2018-03-01 13:44:40 +00:00
dan
dd8a4af8e7 Fix some crashes in the sqlite3changeset_apply() function that could be caused
by corrupt changeset blobs.

FossilOrigin-Name: 745a9a7fef0f28a57ea3f44899058993f6ecdedda52c81a09a4a9ce09c9004d6
2018-03-01 12:05:51 +00:00
drh
bda30ce4d8 Enhance the sessions documentation to show the methods of the various objects.
FossilOrigin-Name: e01177754ad6d9e2d38adddddd2e2e212094dac1154bda5fcee61ca8b678ae0f
2018-02-28 22:21:29 +00:00
drh
6a8a629e6b Use <pre> around code snippets in the documentation for sessions
interfaces.  This is a documentation change only with no changes to code.

FossilOrigin-Name: c949b915e893e917315ce21092d4c4bbd3e1b88d5326928f71dcc2f18f300702
2018-02-28 21:50:00 +00:00
drh
d7fd899eeb Fix a potential NULL pointer deref following OOM in the new IS TRUE
logic.

FossilOrigin-Name: 48775ec693c21927ff26448acc614dd67d56240fa263499da2a9fe405c546c32
2018-02-28 04:30:55 +00:00
drh
5597cd42b8 Add support for TRUE and FALSE keywords and for operators IS TRUE, IS FALSE,
IS NOT TRUE, and IS NOT FALSE.  If there is are columns named TRUE or FALSE,
then the keywords resolve to the column names, for compatibility.  The
behavior of the "DEFAULT true" phrase is changed to mean what it says,
rather than being an alias for "DEFAULT 'true'".

FossilOrigin-Name: 9a7f02c50e6c8a3dc3addf4e51b7e04bd31670d6ce58d26d55273c43b5ecc8b0
2018-02-27 15:40:59 +00:00
drh
96acafbea7 Clean up comments and variable names prior to merge.
FossilOrigin-Name: 6445519e91c4f98b4a9a45d5091d733c31497ebf0eb23a76edce3091f626035d
2018-02-27 14:49:25 +00:00
drh
e39ef31cd6 Remove an unnecessary decision.
FossilOrigin-Name: adcb4665490404e8da2de128dd5df9aeed8e08893649dedb6788ebb5d957b400
2018-02-27 00:58:13 +00:00
drh
43c4ac8bfe Code simplifications. New test cases.
FossilOrigin-Name: 57508518ef9d003d259ba98dcc32e5104aca26731a7161808741fe10bc0830d0
2018-02-26 21:26:27 +00:00
drh
171d16bb21 Get the "DEFAULT true" and "DEFAULT false" phrases working correctly in
CREATE TABLE.

FossilOrigin-Name: 8002f87d96b3f885cd208e7d204907a33ba60c4057ce2338b71e2de41215b0e5
2018-02-26 20:15:54 +00:00
drh
3432821192 Enhance TreeView so that it can display the new IS TRUE expression trees.
FossilOrigin-Name: 7e38305e6f71c3353df3d11d099e255eefbacceafd7ed2ccaba257fe2e7b8c38
2018-02-26 19:03:25 +00:00
drh
8abed7b907 Refactor for correct NULL handling in the IS TRUE, IS FALSE, IS NOT TRUE,
and IS NOT FALSE operators.

FossilOrigin-Name: cf2abd59be9971a55bd3d6c5df374c6aaa23bf81819482b42f01ee2484dcd739
2018-02-26 18:49:05 +00:00
mistachkin
6bd4140d33 More tests pursuant to ticket [36fae083b450e3af857a459e20].
FossilOrigin-Name: c26f236da61aef7c7a8fe38f1c7f33eea894c8fae38de6a085d4cce933a70502
2018-02-26 17:03:03 +00:00
mistachkin
f7e867c347 Fix heap issue in the shell on Win32 caused by allocator mismatch.
FossilOrigin-Name: 7b3a75519aa72a6b49a125ee84946ba2c0722dd6644ee0c80ba567eb85daf5c9
2018-02-26 16:49:20 +00:00
drh
bc8f68a3a0 Merge the fix for determining truth of floating point values from trunk.
FossilOrigin-Name: 003dc140536d0dd4384252ae1b82827b5d8b2b399520f99549b9266a482009fb
2018-02-26 15:31:39 +00:00
drh
1fcfa7240f Always interpret non-zero floating-point values as true even if their
integer part is zero.  Fix for ticket [36fae083b450e3af857a459e20].

FossilOrigin-Name: a983fa857048c748112c2f805f13aadeae43b43b3d27fa55433a3699b51c9a0e
2018-02-26 15:27:31 +00:00
drh
007c843b0f Experimental implementation of IS TRUE and IS FALSE operators. All TRUE and
FALSE to act like constants if the names do not resolve to a column name.

FossilOrigin-Name: 40314bc999af08ab10e654241208842b4bb95b19858d11249444372250ea4160
2018-02-26 03:20:18 +00:00
mistachkin
5facffbc70 Fix harmless compiler warnings in the zipfile extension seen with MSVC.
FossilOrigin-Name: 15c587cf6ffc920dc37f67cacb4f0db6a603fb998a22a639f755387910516414
2018-02-23 13:38:54 +00:00
mistachkin
fda0867873 Enable the JSON1 extension when compiling the test fixture with MSVC.
FossilOrigin-Name: e9e9f27b3d496531905ad7459cf60366ad3798f507266134dd6388cdec50fdc4
2018-02-23 13:38:20 +00:00
drh
4f46b58a2d For the "SQLite archive" link in the README.md file, point to the
CLI .archive command documentation, not the original "sqlar" website.

FossilOrigin-Name: 4290faf5f7223ebe35b8ed5c4f0ba2444c1764501cabc09a79000f9c1d0890c7
2018-02-22 18:30:53 +00:00
drh
d6ec7a6ab3 Updates to the README.md file. Mention the ability to use SQLite-archives for
download.

FossilOrigin-Name: ab9a7ae4eec0aaa5e0b472998f6de7212055d93c163f0b66da60b956bcc45add
2018-02-22 18:28:19 +00:00
drh
c0ec2f7762 Remove an unreachable branch in the walIndexPage() logic.
FossilOrigin-Name: 4e61a9731f5949dcf05c541106b56be16add04a7730613481fc8519d3e4f493b
2018-02-21 01:48:22 +00:00
drh
8d3e15eec4 Small performance improvement in sqltie3WalFindFrame().
FossilOrigin-Name: 52013cad0e6ce2d694f25e2984a76d438cef724f0e07c8bb9d3dce8a3caf4350
2018-02-21 01:05:37 +00:00
drh
4f4e49a98b Remove an unnecessary memset().
FossilOrigin-Name: e7b7f5884a78630c6ba6a217c36247397e62f1928d4b480df929efcfc4a01893
2018-02-21 00:48:02 +00:00
drh
2e178d7321 Make the walIndexPage() routine about 3x faster by factoring out the seldom
used reallocation logic into a separate subroutine.

FossilOrigin-Name: e2b107141cd97bd4ab240748a9ce43fc2ec950ea74610697a4a7a3d7a6441e6b
2018-02-20 22:20:57 +00:00
drh
7436f1e491 In the speed-check.sh script, make WAL mode the default. Add the --legacy
option to do DELETE mode.  Continue to use DELETE mode for long-term performance
graphs since WAL mode was not always available, but use WAL mode for 
day-to-day performance measurements.

FossilOrigin-Name: cd81613850c0458b4b5b2460b9b38ce7ff6e557f7add9615058bb96f5a344ccd
2018-02-20 17:02:31 +00:00
drh
3993678d3d Remove a superfluous "#if 1". No logic changes.
FossilOrigin-Name: caaffd32001ff44c31f2d6dbe921f9d294f869c2c4a81e943fdf3f43f8d9313c
2018-02-20 16:39:11 +00:00
drh
cc398969e0 Optimize calls to sqlite3_mprintf("%z...") so that they attempt to append
text onto the end of the existing memory allocation rather than reallocating
and copying.

FossilOrigin-Name: 4bc8a48e644562f6e6192f4c6fc4a70f6bb59f8126ed6c6dc876bedf65d74cda
2018-02-20 15:23:37 +00:00
drh
b0b6f8783c Remove a lot of the text describing extended format options from the
documentation on sqlite3_mprintf() and friends, since that information is
now covered by the separate printf.html document.  Provide links to that
other document.  No changes to code.

FossilOrigin-Name: 99eec556f065ad19548e48d1f4ae0a3767b4e82e1c83fa2365062e3c5e0071fb
2018-02-20 13:46:20 +00:00
drh
57a93fa38c Enhance the string formatter (used by printf()) so that the width and
precision of string substitution operators refer to characters instead of
bytes when the alternate-form-2 flag ("!") is used.  Also fix the %c
substition to always work within unicode, regardless of the 
alternate-form-2 flag.

FossilOrigin-Name: c883c4d33f4cd722982aca17eeb355d19eeed793991d923b5494d173b1d0c73a
2018-02-19 22:46:19 +00:00
drh
a15a7c352c Printing a value of 0 using %c terminates the string.
FossilOrigin-Name: 255612f0a131f2f522cbca3cc5a1edcf7e38938abca25ba421e7e38a422db9c9
2018-02-19 21:58:16 +00:00
drh
57f29b7bfb More test cases for unicode handling in printf.
FossilOrigin-Name: ac188211119bfd77f43e4aba8acab733a56aac90b4c8a11f7ef8e6388582438f
2018-02-19 20:41:01 +00:00
drh
cf7c8370d1 Test cases and a bug fix on the new unicode handling in %c.
FossilOrigin-Name: e41d64e95b9b6fec5dc329553822925e7d648a41912b420cfa1ba198736e6bab
2018-02-19 20:23:20 +00:00
drh
136102beda Fix the %c substitution in printf() so that it works with unicode characters.
FossilOrigin-Name: c35be1d9e9132fbadc74d207c1088e5a710a151c0835c38a63bf3c8e6fd711a0
2018-02-19 18:56:52 +00:00
drh
57e3ba7623 Make the alternate-form-2 flag ("!") change the meaning of width and precision
from bytes to characters for the %q, %Q, and %w extensions of printf().

FossilOrigin-Name: 391540acbea34eb88c75b1152b458d8936b3fdfff47633b9ec897775b015ba4c
2018-02-19 18:03:10 +00:00
drh
62856465f2 In the printf() library, measure width and precision in characters rather
than bytes if the "!" (alternate-form-2) flag is present on a %s or %z
substitution.

FossilOrigin-Name: ca31c6630422fca70e626dd38aae96296bd8535d491ca52391624a5e7e663636
2018-02-19 17:03:23 +00:00
drh
26f625fbf4 Only try to use the geteuid() interface on unix if HAVE_FCHOWN is defined.
This fixes the build for vxWorks, we are told.

FossilOrigin-Name: 38f654dc117bb11d61407327884b5c913cfaf920547bebc4ce5a4cf983e5c20e
2018-02-19 16:34:31 +00:00
drh
a224ee2a1b Fix an assert so that it compares two CellInfo objects field by field
instead of using memcmp().  Memcmp() does not work on x86
because of uninitialized padding bytes.

FossilOrigin-Name: 88258770adead70fa101c74e266a37bb9aaffac0ba738a4b345617feb8c46477
2018-02-19 13:53:56 +00:00
drh
e28eb64d09 Fix a memory leak in the processing of nested row values. This problem has
existed every since row values support was added (version 3.15.0, 2016-10-14)
but was only just now detected by OSSFuzz.

FossilOrigin-Name: 2df6bbf1b8ca881c8a465d6624de66fde4c5975ccae6b2f2dda392b137f577de
2018-02-18 17:50:03 +00:00
mistachkin
091881bbb0 Port mutex enhancments from check-in [f53b8a573b] to the Win32 implementation.
FossilOrigin-Name: 74bb7225d132c80fd5758bb8c120448e3b3e951d0ca2fa0c57cac0a9c6c27045
2018-02-18 00:54:06 +00:00
dan
c551550808 Fix a data race causing a tsan complaint with SQLITE_ENABLE_API_ARMOR builds
on unix. The race condition is not dangerous in practice, it just upsets tsan.

FossilOrigin-Name: f53b8a573bfbb48780243d56ca8372165adb1b979731c43d46cd1f8eb7e593f3
2018-02-17 07:38:50 +00:00
drh
713f34ace9 Do not allow parameters or schema references inside of WITH clause of
triggers and views.  This fixes a bug discovered by OSSFuzz and present
since common-table-expressions were first added in 2014-02-03.

FossilOrigin-Name: b918d4b4e546d3903ff20efc3c8ca26dd9761cc8ed9ef7d2799b66ff9ae1ae51
2018-02-15 21:00:37 +00:00
drh
f4bc6c43d7 Improve performance of editdist3() by keeping the costs in sorted order.
Also add a new regression test to editdist3().

FossilOrigin-Name: dc734c5b61464dfd6bfa7963f2ecce32e405a0c2ba1ef6f453ec9389da080256
2018-02-15 03:56:33 +00:00
drh
46e835a2c4 Reduce the number of calls to strncmp() required to run editDist3Core().
FossilOrigin-Name: afd6fbc01052ccfc9bd29fb8f934b291b8f56af44fcae870da7e1355fe95c29a
2018-02-15 03:05:56 +00:00
drh
501ea05630 Fix the --heap, --pagecache, --lookaside and other options to the command-line
shell that invoke sqlite3_config() so that they work again.

FossilOrigin-Name: 00707f2f2f746a6421f3e2de995e68cc8adba7225a04db6b28db52944e7e988e
2018-02-15 01:03:37 +00:00
drh
ee269a60c9 Add the --readonly option to the ".open" command in the CLI.
FossilOrigin-Name: 06870bb15656b50b0e14d4364bb21afac76500e313ecf67aaef3688d603fd076
2018-02-14 23:27:43 +00:00
drh
d9274a8ae3 Performance optimizations to the editdist3() function in the spellfix
extension.

FossilOrigin-Name: 70d304dcbac4c3fd5e3b96108bffea2ce6c0db19c847397d5c5e268bb90a981d
2018-02-14 20:58:36 +00:00
drh
0fae06fcb6 Disable assert() in the spellfix extension if not compiled with SQLITE_DEBUG.
FossilOrigin-Name: 3c53ee0fdea4cbf2590e2b289b021b0ef8b7ead2945db1bdfc767432d9447acb
2018-02-14 20:25:33 +00:00
drh
4e6e5cef6c New test cases for the editdist3() function in the spellfix extension.
FossilOrigin-Name: 2d3f1f22d53034576a0ec8d9c360fb19efbb05b2e95ad1b09d120fb1b7da33fd
2018-02-14 15:30:48 +00:00
drh
e2d27e0259 Try to optimize spellfix1 by storing a NULL in the k1 column of %_vocab
if it would otherwise have the same value as the word column.

FossilOrigin-Name: b76ec7cb5841f9ad02b342271e91c5f5a598006f69df7953a6213c706e01f7a2
2018-02-14 14:13:09 +00:00
drh
a9abfb1e6c Improved test cases for the [f484b65f3d6230593c34f] bug.
FossilOrigin-Name: 1f300514e6cdd32c755dc1b05dfa125b10eda2eb55a1024b66f66dbf5cf96289
2018-02-13 19:13:05 +00:00
drh
4d1c6845ff Fix an incorrect table lookup used to find the appropriate search operator
for a WHERE clause on a row-value inequality.  The incorrect table lookup
was causing an incorrect answer for the less-than operator.
Fix for ticket [f484b65f3d6230593c34f11]

FossilOrigin-Name: f3112e67cdb27c1aec8d2cee3cb91ade061d093e13505894698e26336898b336
2018-02-13 18:48:08 +00:00
drh
d446e79545 Remove an unused variable from FTS4.
FossilOrigin-Name: 27ea783b281606196ad1e7e6e6dcbd80c75d4bafcf3e58756a71c213320e4db2
2018-02-13 16:30:19 +00:00
dan
e84c498be1 Ensure that multiple updates of the same FTS4 row (i.e. the row with the same
rowid) within a single transaction are written to separate segments. Fix for
[d6ec09ec].

FossilOrigin-Name: d2a81a3752a8298ee65fddcf32dee2147ba6467f770315a41966b3533977aa64
2018-02-13 16:21:32 +00:00
drh
c083cb4422 Updates to the speed-check.sh script for improvements to the --vdbeprofile
option.

FossilOrigin-Name: f89c8f8ecd67f72ee730a2a334dff69b406a3dd00f50abbb54c4dc86cfab1bd1
2018-02-12 20:50:28 +00:00
drh
35043cc32a When compiling with VDBE_PROFILE, add the sqlite3NProfileCnt global variable
which can be used to measure per-opcode values other than elapse time, if
non-zero.

FossilOrigin-Name: d44d5936428859b6d3e089d9835acb8ca1f3c0a85b59eeaa619170623e7dcc30
2018-02-12 20:27:34 +00:00
dan
1db7db1f03 Update test file func6.test so that it works with SQLITE_ENABLE_NULL_TRIM
builds.

FossilOrigin-Name: e128d72f1a565551d3b6fdb3807fcb1c2a2bf355f0c09d04562b62f49d01fdbc
2018-02-12 15:27:32 +00:00
drh
00c3ef2df9 Fix a possible infinite loop in VACUUM that can come up when the schema
has been carefully corrupted.  Problem discovered by OSSFuzz. Test cases
in TH3.

FossilOrigin-Name: 27754b74ddf6463c6f9c48ea0df3637945b5ea086b92a41ddeb55b9aaefea4c2
2018-02-12 13:30:34 +00:00
drh
c86d82f27d Fix misplaced testcase() macros from the previous check-in.
FossilOrigin-Name: 3aed949a18a251c5795f21f0385c205a127502b7e9cf06bc7f4c763951cd7984
2018-02-10 02:31:30 +00:00
drh
f313952097 Improve the performance of the built-in REPLACE() function in cases where
it does many substitutions that make the string larger.  OSSFuzz is reporting
intermittant timeouts when running a test where it does a REPLACE() on a 
930KB random blob. Perhaps this enhancement will fix that.

FossilOrigin-Name: fab2c2b07b5d3cd851db3e6f5c8a44155e32b0df22905ea33412b153b825a928
2018-02-09 23:25:14 +00:00
drh
510fea885e Add the zorder.c extension implementing zorder() and unzorder() SQL functions.
FossilOrigin-Name: a57a77dc0cc9fbaa9d5b134422f7a8cc8d4c2851ed3c2bdd449800c6a5d2aae0
2018-02-09 20:49:15 +00:00
dan
91347c066b Make the tests in func6.test more robust against implementation changes.
FossilOrigin-Name: b685d3231097fb90e7d61d9ac01cc560e8bf2671d49390ae7af5bfdbd6d04f11
2018-02-09 15:42:40 +00:00
drh
54cfb492b7 Fix a harmless compiler warning.
FossilOrigin-Name: a6c3115483d597fc77ab19fdcfd1d3437cad7e467081ad8c5315fb98c115eed9
2018-02-09 15:04:51 +00:00
mistachkin
2a86110a6c Enhance sqlite3ErrStr() to include several more error codes.
FossilOrigin-Name: ad5d3bdc739a0997786f94fb5789b726b9f53ff883226093924338fe5000922b
2018-02-08 01:00:11 +00:00
mistachkin
b189e4101c Fix typo in comment. Skip tests added by check-in [4761db83b6] when running on Windows.
FossilOrigin-Name: 468a389cdc8b6f92c77b11f682e210ad8cce7e3dbc0df308a898f4115e85fce2
2018-02-07 18:45:00 +00:00