]>
git.ipfire.org Git - thirdparty/sqlite.git/log
drh [Wed, 15 Nov 2017 19:14:08 +0000 (19:14 +0000)]
Futher improvements to the .testctrl interface in the shell.
FossilOrigin-Name:
1ca3b8cce93e83fabe35c22cb726b8ce0883e0448afa3301ad0b53073055fa8d
drh [Wed, 15 Nov 2017 17:07:22 +0000 (17:07 +0000)]
UI improvements on the .testctrl dot-command in the shell.
FossilOrigin-Name:
5d66219c4706e11a9c2a1290224e7c17b19f74657e8239accfb4c6f6be6af9b5
drh [Tue, 14 Nov 2017 23:48:23 +0000 (23:48 +0000)]
In the parse tree, combine LIMIT and OFFSET into a single expression rooted
on a TK_LIMIT node, for a small code size reduction and performance increase,
and a reduction in code complexity.
FossilOrigin-Name:
3925facd942c9df663f9b29b1e6f94f6be14af8c2b99eb691bfc836b4c220826
drh [Tue, 14 Nov 2017 19:34:22 +0000 (19:34 +0000)]
Add the ability to read from read-only WAL-mode database files as long as
the -wal and -shm files are present on disk.
FossilOrigin-Name:
00ec95fcd02bb415dabd7f25fee24856d45d6916c18b2728e97e9bb9b8322ba3
dan [Tue, 14 Nov 2017 17:06:37 +0000 (17:06 +0000)]
Fix the SQLITE_ENABLE_UPDATE_DELETE_LIMIT functionality so that it works with views and WITHOUT ROWID tables.
FossilOrigin-Name:
dae4a97a483bee1e6ac0271ddd28a0dffcebf7522edaf12eb5e0eba5fc62516a
drh [Tue, 14 Nov 2017 03:42:52 +0000 (03:42 +0000)]
Improvement to a comment. No changes to code.
FossilOrigin-Name:
486949fc03706e0056439b52ce60931ea4ce0a65e391da7f6287fe13862de251
drh [Mon, 13 Nov 2017 05:51:37 +0000 (05:51 +0000)]
Remove some branches in walTryBeginRead() that were
added by check-in [
ce5d13c2de ] but became unreachable with the addition
of logic in check-in [
18b26843 ] that enabled read-only clients to parse
the WAL file into a heap-memory WAL-index, thus guaranteeing that the
WAL-index header is always available.
FossilOrigin-Name:
9c6b38b9a96c11bdf9db4ea025720a4f49dcb723fa2e2776edc8453bce85c7e3
drh [Sat, 11 Nov 2017 20:11:01 +0000 (20:11 +0000)]
In wal.c: improved comments, new assert() and testcase() macros, and
replace some magic numbers with appropriate symbolic constants.
FossilOrigin-Name:
13ec8a77a47aa471af587459f4094da0d06674c5960f0d34777bcb3d38bc413b
drh [Sat, 11 Nov 2017 13:30:44 +0000 (13:30 +0000)]
Further comment improvements in wal.c. No code changes.
FossilOrigin-Name:
346388007de585083dc67ad865b91db7c7d7b78c10a06f8bb7c48767c326c47e
dan [Fri, 10 Nov 2017 20:13:14 +0000 (20:13 +0000)]
Omit some extra code from non-SQLITE_ENABLE_UPDATE_DELETE_LIMIT builds.
FossilOrigin-Name:
72be33f9c84de3ec4afc40549482417456ca82c1d16b473dc034b144055271e5
drh [Fri, 10 Nov 2017 20:00:50 +0000 (20:00 +0000)]
Improved comments and variable names in the read-only WAL logic.
FossilOrigin-Name:
d3c25740eec9a2a41c29e6e488fcf6587c1fb821147a442c29439b25a92154a5
dan [Fri, 10 Nov 2017 17:47:54 +0000 (17:47 +0000)]
Add further tests for the code on this branch.
FossilOrigin-Name:
f8c4e33f4813e0c909064406b5cc17e2d465d8a48a50ede1d356b39479d3d669
dan [Fri, 10 Nov 2017 16:14:26 +0000 (16:14 +0000)]
Fix a problem involving "DELETE/UPDATE...LIMIT" statements that use an INDEXED
BY clause.
FossilOrigin-Name:
09f94c2c8199b0d23a45cc062ca9561f9e5ddfcba117100e41889ce199d21bdb
dan [Fri, 10 Nov 2017 15:42:21 +0000 (15:42 +0000)]
Fix a problem with (DELETE...LIMIT) statements against WITHOUT ROWID tables
with a single column PK.
FossilOrigin-Name:
35477a3dcceadf5dade8e036d5a2ce91b9ca83c4b85d309db233bdbcf538b1cc
mistachkin [Fri, 10 Nov 2017 12:41:21 +0000 (12:41 +0000)]
Fix harmless compiler warning seen with MSVC.
FossilOrigin-Name:
3711ef2366af8fefccaaa0a6ee520ce6bc9c74a4fe0666f0a85ef96be46e02d3
mistachkin [Thu, 9 Nov 2017 23:24:29 +0000 (23:24 +0000)]
Avoid superfluous SHM unlock call in the Win32 VFS.
FossilOrigin-Name:
5a384be6979b783d1f3af2ac6307e7e731c415d052f9405f04c0216f59414633
mistachkin [Thu, 9 Nov 2017 22:25:58 +0000 (22:25 +0000)]
mistachkin [Thu, 9 Nov 2017 22:23:50 +0000 (22:23 +0000)]
Revise and vastly simplify the Win32 SHM file locking semantics, allowing all new tests to pass.
FossilOrigin-Name:
d0997b0f5bc9a9869684e39a17a01c430d6383c8b31d6c00ea17a5eac15bc6f0
mistachkin [Thu, 9 Nov 2017 20:37:37 +0000 (20:37 +0000)]
dan [Thu, 9 Nov 2017 20:34:35 +0000 (20:34 +0000)]
Enhance walro2.test to better ensure that readonly_shm clients are not using
invalid *-shm files.
FossilOrigin-Name:
ff630b66714b20c09888ead0a45f344d63e0d9a5208867d6266e74f79187076c
mistachkin [Thu, 9 Nov 2017 20:02:44 +0000 (20:02 +0000)]
Get read-only SHM file tests passing on Win32.
FossilOrigin-Name:
abef05353554e72f4d08aff562b87ff8530e8537a79e58d831205ea8c46eed07
dan [Thu, 9 Nov 2017 19:53:06 +0000 (19:53 +0000)]
Add SQLITE_ENABLE_UPDATE_DELETE_LIMIT for views and WITHOUT ROWID tables.
FossilOrigin-Name:
584b88aaf89ab30cb51185396b7b50c6ecba286add023a26ab41d865b9c605ce
mistachkin [Thu, 9 Nov 2017 18:53:51 +0000 (18:53 +0000)]
Further corrections to read-only SHM file handling on Win32.
FossilOrigin-Name:
43c311701bdf1202918cd46fa6133a11458e0ef8ddb09e46290a231083f395ce
mistachkin [Thu, 9 Nov 2017 18:21:51 +0000 (18:21 +0000)]
Corrections to Win32 lock detection for SHM files.
FossilOrigin-Name:
3a91be975daee65c3e1199855613066015d5df8ad44ababdef31d1c698b5e746
mistachkin [Thu, 9 Nov 2017 17:29:18 +0000 (17:29 +0000)]
Corrections to the Win32 porting changes on this branch.
FossilOrigin-Name:
0b26a5a26d700e20eea5ebbd620af0af6f2d61c652cfca5b8563267588cb2be6
mistachkin [Thu, 9 Nov 2017 17:29:04 +0000 (17:29 +0000)]
Make it possible to use OSTRACE for multi-process testing.
FossilOrigin-Name:
0a7d416c4c43632725dc89cda8667cd9726b5152ee4692e4d0c9e2031e60cfb4
mistachkin [Thu, 9 Nov 2017 16:30:55 +0000 (16:30 +0000)]
Initial work on porting the changes on this branch to Win32.
FossilOrigin-Name:
3738bfd0c0eadb10eea58954af5052cb6ce164059f3aacfe65d7da6a400c63c7
drh [Thu, 9 Nov 2017 03:55:09 +0000 (03:55 +0000)]
Disallow ORDER BY and LIMIT on UPDATE and DELETE of views and WITHOUT ROWID
tables. This is a temporary fix for ticket [
d4beea1633f1b88f ] until a better
solution can be found.
FossilOrigin-Name:
62fe56b59270d9d7372b1bb8a53788a40d20d0f111fe38c61dd6269848592c70
drh [Wed, 8 Nov 2017 19:26:27 +0000 (19:26 +0000)]
Extra comments on the sqlite3OsShmMap() call in walBeginUnlocked(). No
changes to code.
FossilOrigin-Name:
033ee92bf4d5dc57f5cb8fd02d1154ae06f2d3261d214e7191a82c70c8ffebf7
drh [Wed, 8 Nov 2017 17:51:10 +0000 (17:51 +0000)]
Turns out that SQLITE_READONLY_CANTLOCK is an historical name that must
be preserved. So make a new SQLITE_READLOCK_CANTINIT name instead.
FossilOrigin-Name:
04974a8b5c0e6748216226006ca9125529c8bb2a7a9df4641217eb1413426a14
drh [Wed, 8 Nov 2017 17:32:12 +0000 (17:32 +0000)]
Change the name of SQLITE_READONLY_CANTLOCK to SQLITE_READONLY_CANTINIT.
FossilOrigin-Name:
6d7f94faa7e6de62f82bc6cac019508a9c1ffd6fa1d14f52fa93e9c06afdd32f
dan [Wed, 8 Nov 2017 11:14:53 +0000 (11:14 +0000)]
Fix a problem causing LSM to add unnecessary padding to empty segments in
compressed databases.
FossilOrigin-Name:
1bc2d04645c5239ba9a30a13f6fb3c8cc46461c864e7927012bc0ad305eb705e
drh [Wed, 8 Nov 2017 02:50:09 +0000 (02:50 +0000)]
Improved comments used for documentation of sqlite3_vfs. No changes
to code.
FossilOrigin-Name:
db8f22d069b1725f16b208c96c0c47b6ab0e30236feeac43cca4217ef80316b8
dan [Tue, 7 Nov 2017 21:25:15 +0000 (21:25 +0000)]
dan [Tue, 7 Nov 2017 21:15:07 +0000 (21:15 +0000)]
Handle the race condition that may occur if another process connects and then
checkpoints and truncates the wal file while a readonly-shm client is building
its heap-memory wal-index.
FossilOrigin-Name:
5a6703fc3f2174b3e9a624c7272ae013b73c42d6c97ffa62b58553efdb54e3bc
dan [Tue, 7 Nov 2017 19:02:00 +0000 (19:02 +0000)]
Fix handling of partial indexes in checkindex.c (sqlite3_checker).
FossilOrigin-Name:
31932a9eb8dbb33d5535715ae8bbfdc55ce66b1a1a0abd57cefe720eeb31e231
dan [Tue, 7 Nov 2017 18:20:15 +0000 (18:20 +0000)]
Fix a problem causing an INDEXED BY specifying an unusable partial index to be
mishandled.
FossilOrigin-Name:
292a04086a902634fc514b379a2b245eb2681c1b84d9bb950b6ecb9aab28b468
drh [Tue, 7 Nov 2017 16:54:20 +0000 (16:54 +0000)]
Add the --trace option to the sqlite3_checker utility program.
FossilOrigin-Name:
dc217b7cfe680044d8742e317701abd0269162da8f5cb097361ae7f47fd9ba2d
drh [Tue, 7 Nov 2017 16:23:24 +0000 (16:23 +0000)]
Enhance the checkindex.c virtual table so that it will output the
index_name and after_key parameters. Also add a new diagnostic output
column named scanner_sql which shows the SQL statement used to implement
the current index scan.
FossilOrigin-Name:
32e2520ce91351acceda845d81c9567f7a634257dc2b5b90fe6fb6583d8c0f87
dan [Tue, 7 Nov 2017 15:43:52 +0000 (15:43 +0000)]
On unix, if the *-shm file cannot be opened for read/write access, open it
read-only and proceed as if the readonly_shm=1 URI option were specified.
FossilOrigin-Name:
ba718754fa5ab8596cb84b751051de98afa2706fe6c5df39ad6d925d790719ee
dan [Tue, 7 Nov 2017 09:08:43 +0000 (09:08 +0000)]
Add fault-injection tests for the code on this branch.
FossilOrigin-Name:
a7d949fb735f60c19e7257a1a7a12568a9c15be9cd980c018f3a0d6bf112c339
dan [Mon, 6 Nov 2017 19:49:34 +0000 (19:49 +0000)]
Add further test cases for the new code on this branch. And a couple of fixes.
FossilOrigin-Name:
71af9acb227a91d9ad8798c9d0b12d6967e863d050f5cb1fddb45f25ee1f47db
drh [Mon, 6 Nov 2017 09:34:45 +0000 (09:34 +0000)]
Fix a harmless compiler warning from Xcode 9.1.
FossilOrigin-Name:
66d98310b91c69fd01c6a9a958ef1eabda14ec6cd0e4b6612f877f2dfe486c54
dan [Sat, 4 Nov 2017 21:06:35 +0000 (21:06 +0000)]
Add further tests for the code added on this branch.
FossilOrigin-Name:
a6716fcde38b28b8a03b40f9d16f78a57ec20f60cf391ff553692641cb7f0d3f
dan [Sat, 4 Nov 2017 18:10:03 +0000 (18:10 +0000)]
In cases where a readonly_shm client cannot take the DMS lock on the *-shm
file, have it parse the wal file and create a wal-index to access it in heap
memory.
FossilOrigin-Name:
18b268433d739486eac1b04947bd418655e4bc56e8dc63ffa558aa4552a32e30
dan [Sat, 4 Nov 2017 08:53:37 +0000 (08:53 +0000)]
Fix an LSM problem with read-only connections and compression (not
compression-factory) callbacks.
FossilOrigin-Name:
51ee5188b03c4b9508e94afaee4bf1f224aef28875efabda8ce09a5ab641d99e
drh [Fri, 3 Nov 2017 08:46:48 +0000 (08:46 +0000)]
The extensions functions in spellfix are all deterministic.
FossilOrigin-Name:
29ec855e13e0dcd675dcf12948b42f9e669d0a31c5d9efb95857888aba0beeee
mistachkin [Fri, 3 Nov 2017 06:45:37 +0000 (06:45 +0000)]
dan [Thu, 2 Nov 2017 18:57:46 +0000 (18:57 +0000)]
Fix test cases in wal2.test broken by the locking change in the previous
commit.
FossilOrigin-Name:
f569c3517234881f9425075aab65a32ffd0deb8e793f421a241d8cca881da33f
dan [Thu, 2 Nov 2017 11:12:03 +0000 (11:12 +0000)]
Avoid locking shm-lock WAL_READ_LOCK(0) during recovery. Doing this allows
recovery to proceed while a readonly_shm connection in unlocked mode has an
ongoing read transaction.
FossilOrigin-Name:
5190d84a296b7cf716ef43bf7b6d4d351ef1a4d650de37dc01a5ab333da7c05d
dan [Wed, 1 Nov 2017 20:59:28 +0000 (20:59 +0000)]
If a readonly_shm connection cannot map the *-shm file because no other
process is holding the DMS lock, have it read from the database file only,
ignoring any content in the wal file.
FossilOrigin-Name:
ce5d13c2de69b73378637d4f7e109714f7cd17bf1d1ad995e0be442d517ed1b3
drh [Wed, 1 Nov 2017 19:58:25 +0000 (19:58 +0000)]
Fix harmless compiler warnings in sqlite3_checker.exe
FossilOrigin-Name:
491f867b377b3b9e00bd713fb07df00207673f9eca0e7d5b7af7974082c8e3f0
drh [Wed, 1 Nov 2017 19:50:11 +0000 (19:50 +0000)]
Make sure the JSON1 extension is available to sqlite3_checker.exe
FossilOrigin-Name:
a946a8ed46ba76b9a09bcbac58000d3d92db1f08a98f6cc12365be696d8921de
drh [Wed, 1 Nov 2017 19:44:19 +0000 (19:44 +0000)]
Add the checkindex.c extension and the sqlite3_checker utility program used
for doing live validation of large databases.
FossilOrigin-Name:
0c5d18a01ec77f784d5434c5465ab8da9a0c365a58d4bd8551872ca90aaf42d6
drh [Wed, 1 Nov 2017 19:22:08 +0000 (19:22 +0000)]
Adjust page numbers in the ext/repair/test/checkfreelist01.test module due to
the fact that the pending-byte page is no longer shifted down to a low-numbered
page but is in its rightful place.
FossilOrigin-Name:
c1641affae31a4350727ce940c92499263880e672dc2c3f47e78e1c23ae99b78
drh [Wed, 1 Nov 2017 18:31:34 +0000 (18:31 +0000)]
Add the "sqlite3_imposter DB SCHEMA ROOT SQL" command to sqlite3_checker.
Use it to fix the checkindex01.test module. There are still errors reported
by the checkfreelist01.test module.
FossilOrigin-Name:
0593a2ba74c886afe8a65cea1310025bb9777c320d093278044719210c9f6ba2
drh [Wed, 1 Nov 2017 18:05:32 +0000 (18:05 +0000)]
Move the test scripts for checkfreelist and checkindex over into the
ext/repair/test directory. Run them now using the sqlite3_checker utility
with the --test option. Some tests are currently failing due to an
incomplete port. This is an incremental check-in.
FossilOrigin-Name:
17f8d5e111a9fe5b074f946e23936ae5a2a7a8d8018bad4212660d8eb81c04b7
drh [Wed, 1 Nov 2017 13:09:02 +0000 (13:09 +0000)]
Minor cleanup in checkindex.c. Add progress displays when checking a
single index in the top-level TCL script for sqlite3_checker.
FossilOrigin-Name:
3ca31cc3ffe1cce4a9961d29801eebd47f0093d1b53d0ea63386338a1d434fd3
dan [Wed, 1 Nov 2017 07:06:41 +0000 (07:06 +0000)]
Merge latest trunk changes into this branch.
FossilOrigin-Name:
985bfc992950625a45a7521bf4c8438cd0170de974dff976968be158ac5922a9
dan [Wed, 1 Nov 2017 06:59:19 +0000 (06:59 +0000)]
Fix a race condition in os_unix.c that might allow a client to use a *-shm
file corrupted by a power failure if another client fails between locking the
*-shm file and truncating it to zero bytes.
FossilOrigin-Name:
d655bfabd110999b6808073c334869c5b6a8334df56811df883e47e56d3f1cbb
drh [Wed, 1 Nov 2017 01:05:41 +0000 (01:05 +0000)]
When sqlite3_checker finds a problem, show the row key as part of the error
message, not the row index number.
FossilOrigin-Name:
6ffe917d10e298cd80cd3a8c8c5116a2819145a176fb8cfccd5dbd88b10f39df
drh [Wed, 1 Nov 2017 01:01:20 +0000 (01:01 +0000)]
Actually perform index checks when running sqlite3_checker
FossilOrigin-Name:
54530020260ea9e4cfd021f5ffccb74d78c469b717dce377d3df6eaf84b63719
drh [Wed, 1 Nov 2017 00:10:34 +0000 (00:10 +0000)]
Begin putting functionality into the sqlite3_checker binary.
FossilOrigin-Name:
e82e883b93128e4d1105a82abe8d1860c0a15505b6ca421e187b9bbbc2fdc659
drh [Tue, 31 Oct 2017 18:15:36 +0000 (18:15 +0000)]
drh [Tue, 31 Oct 2017 18:09:40 +0000 (18:09 +0000)]
Add the checkfreelist extension to the sqlite3_checker binary.
FossilOrigin-Name:
0c22f0d6d19e595c0577b0bad416522e71647f54d2eb5cda587e2ccc5f63dd6a
drh [Tue, 31 Oct 2017 15:55:48 +0000 (15:55 +0000)]
Fix an error in the Makefile.msc for the sqlite3_checker.exe target.
FossilOrigin-Name:
49d0c6f1f62dccc3c4609760950f7b28bf94a9520996a80d10ff45096b0dd9a0
drh [Tue, 31 Oct 2017 15:49:19 +0000 (15:49 +0000)]
Add build infrastructure for the sqlite3_checker command-line utility.
FossilOrigin-Name:
429e3c3c85d6b677038be93567f93e69eb756442bb421bb02ee5d5d69290fa09
drh [Tue, 31 Oct 2017 14:56:44 +0000 (14:56 +0000)]
Update the built procedures for the sqlite3_analyzer utility to allow it
to be linked with an external sqlite3.o library. Automatically detect a
missing dbstat extension and report the compile-time error.
FossilOrigin-Name:
bb39744f4b2b25c10d293e85db7579e2a99c639fdab45e93d1de75952b68b2de
drh [Tue, 31 Oct 2017 12:20:43 +0000 (12:20 +0000)]
Fix redundancies in the makefiles that resulted from moving shell.c over
to shell.c.in.
FossilOrigin-Name:
bf09fa683ea42b7552bd2f29ab5371bd175f0055cf9a453e6f8c6f4408cd168f
drh [Tue, 31 Oct 2017 12:06:29 +0000 (12:06 +0000)]
Fix a minor comment typo. No changes to code.
FossilOrigin-Name:
5f79e6d9c3d44b0cc7cf805429006f7b29a69e8d863b58472172a56b29a7bb4e
dan [Tue, 31 Oct 2017 12:01:01 +0000 (12:01 +0000)]
Fix a couple of issues in incremental_index_check to do with CREATE INDEX
statements that contain embedded SQL comments.
FossilOrigin-Name:
2aef41815a9f1786ebdf09d8f6cfa59a8e7d733253eafeae24fa6e2a093bb1d8
drh [Tue, 31 Oct 2017 03:40:15 +0000 (03:40 +0000)]
Remove unnecessary NEVER() and ALWAYS() conditionals.
FossilOrigin-Name:
1c80c75d4be2f3d44fb18bb4c07eccac2aba79b688215a741317dfc47dc7c2ce
drh [Mon, 30 Oct 2017 23:25:06 +0000 (23:25 +0000)]
Add the showshm utility program for printing out the shm header in a
human-readable format.
FossilOrigin-Name:
f6304fd142c998aba44f02c6018223af2630671b4791d750b70a59ab1adb8d6d
drh [Mon, 30 Oct 2017 20:44:36 +0000 (20:44 +0000)]
Clarify some comments describing the WAL index file. No changes to code.
FossilOrigin-Name:
3be3aad9ecbe33060cfa9c6059b9206ed221d1fd72a69c355a9387f9f4e075e7
dan [Mon, 30 Oct 2017 19:38:41 +0000 (19:38 +0000)]
Add support for indexes on expressions to incremental_index_check.
FossilOrigin-Name:
8c1c701fdbe0d56ee7f6f7d7b583aafde9fa14acc93ee8ecaddc8bb311e2bf52
drh [Mon, 30 Oct 2017 18:49:11 +0000 (18:49 +0000)]
Improve the performance of the LIKE operator by using strcspn() to aid
wildcard matching.
FossilOrigin-Name:
37284d4e8f501a37c582aa899419a3dfe0932e2a8e2ef2fdf59addd1d3cdacb4
dan [Mon, 30 Oct 2017 17:05:18 +0000 (17:05 +0000)]
In checkindex.c, use C code instead of SQL/group_concat() to compose various
SQL clauses. This is to make it easier to support indexes on expressions.
FossilOrigin-Name:
940606b3af059eb3f79d71fec871ea88df8bce0349f5b33b79c147a85610e269
dan [Mon, 30 Oct 2017 08:04:38 +0000 (08:04 +0000)]
Fix an issue in incremental_index_check with indexes that use non-default
collation sequences.
FossilOrigin-Name:
3ebb2351e2650d263029d2c0042683cba3529c9d3f76b5f994f2e737b84d3f67
drh [Sat, 28 Oct 2017 20:54:51 +0000 (20:54 +0000)]
Increase the version number for the next release - which is still months
away but there have been significant query planner enhancements since the
previous release.
FossilOrigin-Name:
457eedfac0ff652912c4cfb89682acb3d2e372ef00745139adf8492a0b61fa09
drh [Sat, 28 Oct 2017 20:51:54 +0000 (20:51 +0000)]
Reactivate query flattening when the result set of the outer query has
no function calls or subqueries. This is a partial reversal of
check-in [
c9104b59 ]. Co-routines are still preferred if the outer
query has a complex result set, but for simple results sets, query flattening
is used. Check-in [
4464f40ccd7 ] is completely backed
out due to this change.
FossilOrigin-Name:
d17ef7d153058f7332b3fec421ade42c67e26b06f36fc1629e6799537a5afc5f
dan [Sat, 28 Oct 2017 20:31:25 +0000 (20:31 +0000)]
Fix "after" parameter handling in the incremental_index_check code.
FossilOrigin-Name:
c40c3c62e996044f31ca49ffc2edb2cc0320e69956f7ee6fe3e9012200e0d9a0
drh [Sat, 28 Oct 2017 12:20:09 +0000 (12:20 +0000)]
Add test cases from OSSFuzz to prevent a regression in co-routine
processing.
FossilOrigin-Name:
689743d8e3fa81e65dcb067bbf61bab09210b3b39586c865c00d9f1d6692daf2
dan [Fri, 27 Oct 2017 20:53:16 +0000 (20:53 +0000)]
Add the start of the "incremental_index_check" virtual table in
ext/repair/checkindex.c. For incremental verification of index contents.
FossilOrigin-Name:
d5b9dada471358a2864727759648b763bf6890fc2521fac53c0d8216017d39b7
drh [Fri, 27 Oct 2017 18:24:11 +0000 (18:24 +0000)]
Fix a Pager ref-count leak in the sqlite_dbpage virtual table.
FossilOrigin-Name:
c063bb04da77d6847e4e254b6bb939c860e781382e34ddff8e0454d9db7552e2
mistachkin [Fri, 27 Oct 2017 17:09:44 +0000 (17:09 +0000)]
Handle the Ctrl-C event for the shell on Win32.
FossilOrigin-Name:
c8aaf37117ed4a23bbd15dc481788735efcb77bff98be423eca3521c0a9270de
drh [Fri, 27 Oct 2017 12:27:25 +0000 (12:27 +0000)]
Additional test case demonstrating the ability to access structure elements
using quoted names in the JSON1 extension.
FossilOrigin-Name:
8d3cc928a8f0c7b2616c5c75af9d3a50bd4f0fe8e4ccab545ab8648cbfbb4b7f
drh [Thu, 26 Oct 2017 20:04:28 +0000 (20:04 +0000)]
Enhance the min/max optimization so that it works with indexes on
expressions.
FossilOrigin-Name:
6caec9082b3ad6d3f89f6291084a8f5c80f296630e2e94bc764389ac1a47a833
drh [Thu, 26 Oct 2017 18:43:19 +0000 (18:43 +0000)]
Extra ".selecttrace" output following aggregate analysis. No changes to
production builds.
FossilOrigin-Name:
6fbf74ab3189b9cb20cf7cc8db0226eb935a8eab477cc83b8390492fcf2f1f76
dan [Thu, 26 Oct 2017 17:34:50 +0000 (17:34 +0000)]
Fix an error in the previous commit on this branch.
FossilOrigin-Name:
f71dfee06ce1e0eee760cfca19482bdec7729d6c7d28f10f4cfd21e1f92a04b0
dan [Thu, 26 Oct 2017 17:05:22 +0000 (17:05 +0000)]
Instead of extra locks, use F_GETLK to ensure that readonly_shm clients cannot
connect to a wal-mode database if there are no writers.
FossilOrigin-Name:
5492f457dc7cc5c416de4b4e61e84bd2f10b4e6ce54011b7a60feb47f629c923
dan [Thu, 26 Oct 2017 15:21:56 +0000 (15:21 +0000)]
Fix a bug causing "make amalgmation-autoconf" to create an invalid package if
either the current or parent directory contains a file named install.sh or
install-sh.
FossilOrigin-Name:
e1faa7859451ee969f0ce02d2d4e4c54d0e2e018b37b8faf690e6b87593cce7d
drh [Wed, 25 Oct 2017 23:28:13 +0000 (23:28 +0000)]
Use extra locks to prevent a readonly_shm=1 process from connecting to a
WAL-mode database if there are no writers.
FossilOrigin-Name:
35d979082b4ab36d6a8975f8f15a50e69f46b72a173164d2b353377b9f758bd8
drh [Wed, 25 Oct 2017 19:18:33 +0000 (19:18 +0000)]
Fix the sqlite3_dbpage virtual table so that it can read and write from
any attached database.
FossilOrigin-Name:
d4f893e1ae53a0445939ea2920af87d21dd36270494381028b2eaebe5c188f18
dan [Wed, 25 Oct 2017 18:17:24 +0000 (18:17 +0000)]
Add tests cases and fix minor issues in the rtreecheck() function.
FossilOrigin-Name:
d6130cd226c0ca95e02f0cbabfdc27071acdcf83e0d0cb0eaa47d992479ed9a1
mistachkin [Wed, 25 Oct 2017 18:01:58 +0000 (18:01 +0000)]
Add SQL scalar function rtreecheck() to the rtree module. For running checks to ensure the shadow tables used by an rtree virtual table are internally consistent.
FossilOrigin-Name:
7d26498063bbc4525976ace698fafcf161d939908f4ffb36d7a4df8fb1bce1fb
mistachkin [Wed, 25 Oct 2017 18:00:58 +0000 (18:00 +0000)]
Fix compilation issue (C99-ism) seen with MSVC.
FossilOrigin-Name:
61870b42b033189509b244c76d28932f7a447b887ffe04a3c81461148e54cfb5
dan [Wed, 25 Oct 2017 16:38:34 +0000 (16:38 +0000)]
Add SQL scalar function rtreecheck() to the rtree module. For running checks
to ensure the shadow tables used by an rtree virtual table are internally
consistent.
FossilOrigin-Name:
dde0bb3eab1316c3247b1755594527ca70955aab4ad4907190731f7ec092b327
drh [Wed, 25 Oct 2017 16:14:12 +0000 (16:14 +0000)]
Do not reference the ioctl() system call in the unix backend unless it
is actually needed by the Batch Atomic Write extension. This should allow
the build to work on VxWorks.
FossilOrigin-Name:
adfa7ed2de3e833fff65935455e71236a59602aaf7b97ece667ab300dca9f673
drh [Wed, 25 Oct 2017 01:34:24 +0000 (01:34 +0000)]
Add the sqlite_btreeinfo eponymous-only table for introspecting the schema
and estimating the sizes of various btrees.
FossilOrigin-Name:
1e30f4772db1e1086096f72d32e87c552923be8b264aa13cf822fae754eb083d
mistachkin [Tue, 24 Oct 2017 21:17:12 +0000 (21:17 +0000)]
Force the autoconf makefile for MSVC to always use the 'find.exe' included with Windows.
FossilOrigin-Name:
b76bffd332585e8412a0a994ae6dee79a83213d8b709d7f858c5c05678ab0887