]>
git.ipfire.org Git - thirdparty/sqlite.git/log
drh [Fri, 17 Jan 2020 14:18:48 +0000 (14:18 +0000)]
Import all FTS3/4 enhancements and fixes that exist on the latest trunk
(3.31.0-beta) that do not require extensive change to the SQLite core
into the 3.22 branch. Basically, the 3.31.0 FTS3 sources are copied into
3.22.0, with minor changes to work around core enhancements that are not
available in 3.22.0.
FossilOrigin-Name:
cbcbb1e5a98bde5a40e90faf8467b4f761d2ad7414cf4423571bdb8ba38a81d5
drh [Tue, 3 Sep 2019 18:36:11 +0000 (18:36 +0000)]
Fix a buffer overread that could occur when running fts5 prefix queries inside a transaction.
FossilOrigin-Name:
68b898381ac2942965a3dbd416a45ddf813d6df7ea160f500ae4978e44a3a050
drh [Tue, 3 Sep 2019 18:04:15 +0000 (18:04 +0000)]
Disable the undocumented rtreenode() SQL function that is only used for testing,
except when doing a build that is specifically intended for testing.
FossilOrigin-Name:
8452fd549966de12da35110bf4c87a2f34ade30ef44b6ed8252b43dc19fa830d
dan [Wed, 26 Dec 2018 14:23:14 +0000 (14:23 +0000)]
Fix a problem with corrupt fts3 database detection introduced by [
27199380 ].
FossilOrigin-Name:
ceeb4fba84a651ddd432e87a968ec8d928030bf5b32c8790188d0fb5787c1b4b
dan [Wed, 26 Dec 2018 11:39:39 +0000 (11:39 +0000)]
Avoid a left-shift of a negative value (undefined behaviour) when dealing with
a corrupt database in fts3. Cherrypick of [
b851d12474 ].
FossilOrigin-Name:
2fa63a8be62a06136a34d32351229b54bea58253a63275edf82efe0e83d412ca
dan [Mon, 24 Dec 2018 13:39:13 +0000 (13:39 +0000)]
Change the way a comparison used to detect corrupt databases in fts3 is done
to avoid potential pointer overflow in 32-bit builds. Cherrypick of
[
95a9a39ff7 ].
FossilOrigin-Name:
271993803cc99305642e9809cbe81cbefd944f4c42fc0de370e52eb69103dcdd
drh [Wed, 19 Dec 2018 01:30:22 +0000 (01:30 +0000)]
Add extra defenses against strategically corrupt databases to fts3/4.
FossilOrigin-Name:
c255889bd95bd5430dc7ced3317011ae2abb483d6c9af883af3dc7d6c2c2f234
dan [Thu, 25 Oct 2018 11:55:54 +0000 (11:55 +0000)]
Speed up xAccess() calls made on an RBU VFS when there are lots of open
connections.
FossilOrigin-Name:
fda8fdb0cbc3acf420613f5df4125898354184db52b8606dde55042688815ac7
dan [Thu, 22 Mar 2018 17:17:44 +0000 (17:17 +0000)]
Fix an RBU problem causing errors when updating tables with default collation
sequences that require quoting (e.g. COLLATE "ICU_root-u-kn-on"). Cherrypick
of [
eb4f452e ].
FossilOrigin-Name:
5dd61e1cbd11b375942baf72ed50ae9e55a09801e1a8c1cb679eaa9eaba4145c
drh [Mon, 22 Jan 2018 18:45:57 +0000 (18:45 +0000)]
drh [Mon, 22 Jan 2018 15:45:12 +0000 (15:45 +0000)]
Avoid unnecessary OOM detection warnings in a debugging routine.
FossilOrigin-Name:
395f8ea790e6e295800fa8927f0585b2419b9521ef4fd591d51d2a48db2a90c4
dan [Mon, 22 Jan 2018 15:20:59 +0000 (15:20 +0000)]
Fix a test case in walro2.test so that it works with encryption extensions
(when each page has a little less usable space available than usual).
FossilOrigin-Name:
b79521d255a4aa2a7b4424f3498443f27d329ab5428171ba6b87c987f3ccdfc2
drh [Mon, 22 Jan 2018 14:49:15 +0000 (14:49 +0000)]
On the walro2-X.4.2.2 test case, show the size as part of the test output.
FossilOrigin-Name:
ac5091d7f870f1d0659a576723de454d544e5bfa2bdbba307d7c81eb5ab34e3b
dan [Sat, 20 Jan 2018 15:48:45 +0000 (15:48 +0000)]
Allow the shell to be built from the configure script with
SQLITE_OMIT_VIRTUALTABLE defined.
FossilOrigin-Name:
136bf323e42dc90e1780199a381bcbb084b069eca5c7343ee6fc6e2550831536
dan [Thu, 18 Jan 2018 19:00:54 +0000 (19:00 +0000)]
Use a loop to avoid recursion in the heightOfSelect() function.
FossilOrigin-Name:
86de43595cb2ecebd680fe654affcfb9fbcfff6575c893293ae298124a357bfe
dan [Thu, 18 Jan 2018 17:46:08 +0000 (17:46 +0000)]
Check for both zlib.h and -lz before enabling zlib support in the amalgamation
configure script.
FossilOrigin-Name:
8ecd13a1b38e58d4464585c388c1aa27d1f056dba0db239316623e81d3eb5284
drh [Thu, 18 Jan 2018 17:09:26 +0000 (17:09 +0000)]
Update the autoconf configure.ac script and Makefile.am templates so that
ZLIB is automatically detected and used.
FossilOrigin-Name:
41bfb6b8d61699d09a7e67d2289149abfbb9ce8e75e6ff8560546cad0d2e3f2b
dan [Thu, 18 Jan 2018 16:59:52 +0000 (16:59 +0000)]
Fix sessions module handling of sqlite_stat1 rows with (idx IS NULL).
FossilOrigin-Name:
0e916416331d7948b312a5dd58ac0c145030bb3b47a37dab2636564397249a86
dan [Thu, 18 Jan 2018 16:56:19 +0000 (16:56 +0000)]
Clarify the handling of the sqlite_stat1 table by legacy versions of the
sessions module.
FossilOrigin-Name:
dc7c48cb4126db9e25c73512cc743155293fe1c4c2516f8c84102228695b6e70
dan [Thu, 18 Jan 2018 16:53:41 +0000 (16:53 +0000)]
Add comments describing the special sqlite_stat1 handling to sqlite3session.h.
FossilOrigin-Name:
4431a3256f7436e34b3c33edc1f3e53df7eb3c87daec9bac8d038895d93ca7f2
drh [Thu, 18 Jan 2018 16:52:35 +0000 (16:52 +0000)]
Fix to the documentation for sqlite3_trace_v2(). No changes to code.
FossilOrigin-Name:
6fbd0a11a66f8eb4d7820cb49c23bdcb917db98a22c29d76edea1eea6dab0a4e
dan [Thu, 18 Jan 2018 16:42:11 +0000 (16:42 +0000)]
Fix sessions module conflict handling for the sqlite_stat1 table.
FossilOrigin-Name:
f05ee74e05c401eb075a1ba65179662a08a5c3d5b55fc81f2acc841e841dd055
dan [Thu, 18 Jan 2018 15:06:23 +0000 (15:06 +0000)]
Simplify the sessions preupdate-hook logic for transforming NULL to X'' for
column sqlite_stat1.idx.
FossilOrigin-Name:
089d7cecaaa47db58320b216a111a5e56123d022008be6c81bc0746148bbdb58
drh [Wed, 17 Jan 2018 21:14:17 +0000 (21:14 +0000)]
Alternative implementation for the internal sqlite3Pow10() utility for MSVC,
which is more accurate on that platform.
FossilOrigin-Name:
469b96be5350ba2291518280ffe179b87aa7fbe701e2813ef63843922771517a
dan [Wed, 17 Jan 2018 20:57:20 +0000 (20:57 +0000)]
Fix a problem in the sessions module with logging sqlite_stat1 rows for which
(idx IS NULL) is true.
FossilOrigin-Name:
25bf734be1b3883fccf12ac4d93d50289aa307fb60a52e0e32df12f7ee4edc7a
dan [Wed, 17 Jan 2018 17:38:18 +0000 (17:38 +0000)]
Fix a problem causing the sessions module to occasionally lose track of rows
with composite primary keys when there are two rows with the same text value
in the leftmost column of the PK.
FossilOrigin-Name:
09aed13678374bf22087cd808808b711dc703b7c18bc8aaf704850611e17f5cd
dan [Wed, 17 Jan 2018 16:11:26 +0000 (16:11 +0000)]
Fix main.mk so that testfixture can be built either from the amalgamation or
from individual source files. No changes to code.
FossilOrigin-Name:
a8aea925f8fde8f2dc5ff4b744d54aa2bf8916f3ee57f22d77fd1ddb5a35a9cc
drh [Wed, 17 Jan 2018 13:15:23 +0000 (13:15 +0000)]
Fix harmless compiler warnings, mostly unused parameters for UDFs in the CLI.
FossilOrigin-Name:
bfbeffab7735461acb3773242ba31dae15af9f8b0291c54a6734747bb1b36e66
dan [Wed, 17 Jan 2018 12:58:11 +0000 (12:58 +0000)]
Omit the single test from zipfile.test that uses json functionality in
non-SQLITE_ENABLE_JSON1 builds.
FossilOrigin-Name:
6bb2a10fad71bf8cec6bca538db7b00be0d26418ab62b83092d3a6a68d1c0d9f
dan [Wed, 17 Jan 2018 12:57:07 +0000 (12:57 +0000)]
Update test file fts5fault6.test to account for test tokenizers implemented in
Tcl returning SQLITE_ERROR instead of SQLITE_NOMEM following an OOM error.
FossilOrigin-Name:
c232f6424a858ede44940a927fe4e26ee99c6ab614aa6f63e13ba46e88dbb280
mistachkin [Wed, 17 Jan 2018 01:40:57 +0000 (01:40 +0000)]
Simplifications to winOpenSharedMemory in the Win32 VFS.
FossilOrigin-Name:
3e04999dabb87715de46255b1a9b08d5dfa70d140e0a09a37ea2842d71c77caf
mistachkin [Wed, 17 Jan 2018 01:26:05 +0000 (01:26 +0000)]
Corrections to error code handling in os_win.c, pursuant to walfault.test.
FossilOrigin-Name:
568192228c9578b8ea34c363e10ff28450045cda76248b2f0f89f84b3a57e680
mistachkin [Wed, 17 Jan 2018 01:15:08 +0000 (01:15 +0000)]
Fix duplicate test names in 'walfault.test'.
FossilOrigin-Name:
7274d05ff43fc9872f0e4857ae583689e4a6c429b7fa991dcc29744da3048879
dan [Tue, 16 Jan 2018 21:09:00 +0000 (21:09 +0000)]
Fix a problem causing zipfile to store 0 in place of the CRC32 value for
uncompressed files.
FossilOrigin-Name:
ba44724bcca2e87788b7c6d8c5de7fa388360127bd894ee6a171fd66e794fcae
drh [Tue, 16 Jan 2018 21:05:10 +0000 (21:05 +0000)]
Remove an unused field from the internal definition of the sqlite3_context
object.
FossilOrigin-Name:
948a26b5a64d8a89c4ec7546ec4a4bee36e29e82edda677ca75424e7091325d0
drh [Tue, 16 Jan 2018 21:00:58 +0000 (21:00 +0000)]
Fix compiler warning in the FTS5 test interface.
FossilOrigin-Name:
2ab4e8d5d82ab410c00f048c12555f2f40f9fd8bffda64ccbdd3dfe036727315
drh [Tue, 16 Jan 2018 20:50:37 +0000 (20:50 +0000)]
Make the new sqlite3_vtab_collation() interface accessible to loadable
extensions.
FossilOrigin-Name:
f301db3c2343fd2086bc5b69a17b2d226175584ccd09549ebb2cb603590da487
dan [Tue, 16 Jan 2018 20:44:00 +0000 (20:44 +0000)]
Fix a test problem causing an error in fts5fault9.test.
FossilOrigin-Name:
8e2048113fc6ed87fc7d5ba470261926aa0bd35474744bb2b99ea596bc468f02
drh [Tue, 16 Jan 2018 20:37:56 +0000 (20:37 +0000)]
Remove the unused SQLITE_CANTOPEN_DIRTYWAL result code.
FossilOrigin-Name:
3c786305fc6eaa6856ec6c71fc7969f61de266ba1bea0abf0ae133eb94e54b2d
dan [Tue, 16 Jan 2018 20:20:00 +0000 (20:20 +0000)]
Fix a makefile problem causing -DSQLITE_ENABLE_STMTVTAB builds to fail.
FossilOrigin-Name:
7f6e5bdf9021c31e8bde82c224bf53be3c93b79f7bb5c2802c54be8031cf89fb
drh [Tue, 16 Jan 2018 20:05:27 +0000 (20:05 +0000)]
Move the ZLIB version announcement in the CLI out of the default banner
and put it in the ".version" command.
FossilOrigin-Name:
231679d6f8c0c3d957c8daa88b0743449b60b47159e114f4bc073a8612a73b2a
mistachkin [Tue, 16 Jan 2018 19:03:51 +0000 (19:03 +0000)]
Show version of zlib in use when running the shell tool in interactive mode.
FossilOrigin-Name:
a8906b527a8f7a2cec88cc3b05c063a2785f0d1d141e148d954fc7440972a484
dan [Tue, 16 Jan 2018 17:33:09 +0000 (17:33 +0000)]
Change a cat in zipfile.c from (z_const Bytef*) to just (Bytef*). This allows the module to build with older versions of zlib.
FossilOrigin-Name:
ac9af91d5a2927e71903461e7bbdd2c0168fde9a042853c8bcd4c7ebd0d51e0d
dan [Tue, 16 Jan 2018 13:37:43 +0000 (13:37 +0000)]
Fix a problem causing an infinite loop or other malfunction in some UPDATE
statements with an OR term in the WHERE clause.
FossilOrigin-Name:
feb2c2b6f66b0f45490beb1642d99cdb89fa220e299a8c118929df557c814189
drh [Tue, 16 Jan 2018 02:38:35 +0000 (02:38 +0000)]
Disable the ".archive" command tests in shell8.test if the CLI is compiled without
ZLIB support.
FossilOrigin-Name:
ce8bfe6c2b87090a2de1e04bc88fcb878597fe1f4ecd5df6d9d588a65601c901
dan [Mon, 15 Jan 2018 19:00:35 +0000 (19:00 +0000)]
Fix a problem in the zipfile module causing it to generate incorrect
checksums. Remove the ability to insert compressed data into a zip archive.
FossilOrigin-Name:
b0b7d0363acf38c2178e2d3041d8ce2a0de061a51caa64670dbf539ee6d4356b
dan [Mon, 15 Jan 2018 15:49:46 +0000 (15:49 +0000)]
Fix a zipfile problem with extracting zero length files compressed using
deflate.
FossilOrigin-Name:
cf64087224aff1a2fe169d23996d9e5ed8d86459c655eb5d0bace0466a557ec6
drh [Mon, 15 Jan 2018 14:32:37 +0000 (14:32 +0000)]
Fix an error in the setDeviceCharacteristics() procedure for the
(unsupported) QNX code in os_unix.c.
FossilOrigin-Name:
8151913a3987f4dd2d6efee046727f5fa9b6f11d5d3867ea8f512c03a212ac2b
drh [Sun, 14 Jan 2018 20:12:23 +0000 (20:12 +0000)]
Avoid excess stack usage when a VALUES clause with lots of rows occurs
within a scalar expression. This fixes a problem discovered by OSSFuzz.
FossilOrigin-Name:
a4fa0581ba7cfd45fabe0198f55b3c2c8ee3ecfd2825aeed91116f44e77d760b
drh [Sat, 13 Jan 2018 23:28:33 +0000 (23:28 +0000)]
Fix harmless compiler warnings in zipfile.c.
FossilOrigin-Name:
8f7a592f8c044d75b4615a95e27454100b10c2b26f4cafee97dec23343821130
dan [Sat, 13 Jan 2018 19:08:24 +0000 (19:08 +0000)]
Support UPDATE statements against zipfile virtual tables.
FossilOrigin-Name:
f2d2a5df4f29b47212fd2411eae6545087b901a270655640c87ceb472e02a24c
drh [Sat, 13 Jan 2018 14:28:00 +0000 (14:28 +0000)]
Fully initialize the Mem object for serial-type 10, in case such a
serial-type is found in a corrupt database file.
FossilOrigin-Name:
bd70a07d819a54346cb6c40fab681424c5af0dfb6bf29321a3de9fc99d285376
dan [Sat, 13 Jan 2018 14:02:16 +0000 (14:02 +0000)]
Fix various problems in test scripts preventing "make test" from passing on
F2FS file-systems with the "atomic-write" feature.
FossilOrigin-Name:
6bedc7435d26c1f21c0d1b3a52daa0169fa5416b690a99347328dcafdcd78740
dan [Sat, 13 Jan 2018 14:01:26 +0000 (14:01 +0000)]
dan [Sat, 13 Jan 2018 13:07:49 +0000 (13:07 +0000)]
Fix various problems in test scripts preventing "make test" from passing on
F2FS file-systems with the "atomic-write" feature.
FossilOrigin-Name:
56d93d070d6b92d8a5a3fec1b09aae8911116c73d072fc5022f0b51668ed996b
mistachkin [Sat, 13 Jan 2018 02:07:16 +0000 (02:07 +0000)]
drh [Sat, 13 Jan 2018 01:53:09 +0000 (01:53 +0000)]
Add the new "nochange" APIs to the extension loading mechanism.
FossilOrigin-Name:
cd7c42699e73b688dbed29ed5d243d06439d7dbe0ba8c42d8299e04cc0dd4464
drh [Fri, 12 Jan 2018 23:38:10 +0000 (23:38 +0000)]
Add the sqlite3_value_nochange() API, usable from within the xUpdate method
of a virtual table to discover whether or not a column was unchanged at the
SQL level.
FossilOrigin-Name:
dec3ea4e4e6c4b1761ddc883a29eaa50dcd663ce6199667cc0ff82f7849d4f2a
drh [Fri, 12 Jan 2018 23:18:38 +0000 (23:18 +0000)]
Improved comments. Slightly tighter implementation, but no big changes.
FossilOrigin-Name:
a1b3f28569f2a8d82b2931527fdfe191b421f3e1ea18ee30e04211e1ad645993
drh [Fri, 12 Jan 2018 21:00:14 +0000 (21:00 +0000)]
Add the experimental sqlite3_value_nochange() interface usable by xUpdate
methods of virtual tables to see if a column has actually changed values.
FossilOrigin-Name:
8b7be15ece9e2e83959bb0e21e240106fe1077431242c3cc6b81f1baa2382f40
drh [Fri, 12 Jan 2018 19:33:18 +0000 (19:33 +0000)]
Simplification to the implementation of OP_Insert.
FossilOrigin-Name:
6acbdba59e9df4313a6232d925a70390acdc43dfa380b4fba7bb8bd442d6e728
dan [Fri, 12 Jan 2018 19:20:15 +0000 (19:20 +0000)]
Fix error handling in sqlite3session_diff() when it is invoked for table
"sqlite_stat1".
FossilOrigin-Name:
874285e477dd9bd164e25ddb08b6b80daaa8cfd111b4180ecce59b1ce26f77a5
drh [Fri, 12 Jan 2018 18:46:52 +0000 (18:46 +0000)]
Avoid an unnecessary branch when not using pre-update hooks.
FossilOrigin-Name:
ec96707eb359c7e0597ee22e5ae017774366463dffa6bdb06e4438b09549f5c0
drh [Fri, 12 Jan 2018 18:03:38 +0000 (18:03 +0000)]
dan [Fri, 12 Jan 2018 17:25:25 +0000 (17:25 +0000)]
Include changes made to the sqlite_stat1 table in changesets
generated by the sessions module. sqlite_stat1 entries in such changesets are
ignored by legacy clients.
FossilOrigin-Name:
2064233533edec0308d0212fb08e72fd14c760a1c88452424cae298e9eaf4af8
dan [Fri, 12 Jan 2018 16:44:29 +0000 (16:44 +0000)]
Experimental change to include changes made to the sqlite_stat1 table in
changesets generated by the sessions module. sqlite_stat1 entries in such
changesets are ignored by legacy clients.
FossilOrigin-Name:
bd46c4429693545eb16db85692fc591ac529796aa746f5f21df1ce4380619320
drh [Fri, 12 Jan 2018 14:34:45 +0000 (14:34 +0000)]
Always use utimes() instead of utimensat() since the latter is not available
even on some recent unix systems.
FossilOrigin-Name:
30ed7a4b6408f0ca921abc4d8b7bb5404fc7708cedcd104b017b361054e7148c
dan [Fri, 12 Jan 2018 12:02:02 +0000 (12:02 +0000)]
Add a test to ensure that the sqlite3changeset_apply() function ignores tables
that do not have the expected primary keys.
FossilOrigin-Name:
bf2daf06279e46bc37cc92ad1becec1b12d2aa804a14b101fca8b3a7fdb280c3
drh [Thu, 11 Jan 2018 18:15:40 +0000 (18:15 +0000)]
Add the sqlite3_vtab_nochange() interface. Test cases are in TH3.
FossilOrigin-Name:
a5d09dfaa337fa51d6e702c6aefe58824ab1e7d221c6e79166e2c6f9c7ab1501
dan [Thu, 11 Jan 2018 17:33:48 +0000 (17:33 +0000)]
Change zipfile to be a WITHOUT ROWID virtual table and table-valued function.
FossilOrigin-Name:
931201f64e04247ed613a0301fcc86c3a337c2ed162c6370a80c67a1dd919e7c
drh [Thu, 11 Jan 2018 17:04:26 +0000 (17:04 +0000)]
Add the sqlite3_vtab_nochange() method which virtual table implementations
can use to optimize UPDATEs.
FossilOrigin-Name:
d444b1ff39f0a1673a977b8047e1e14a49d461c9934be080d27c2392a830c1c0
dan [Thu, 11 Jan 2018 16:16:03 +0000 (16:16 +0000)]
Add test cases for running multiple RBU operations within the same process
concurrently.
FossilOrigin-Name:
407b5ed35c178bb0dbc69c8b902652038a0653d55a58a7543f9d4857c6baf3ea
drh [Thu, 11 Jan 2018 14:50:40 +0000 (14:50 +0000)]
Minor formatting changes in zipfile.c. No logical code differences.
FossilOrigin-Name:
4f68bed3b9a63a349a2a2d7f26609491577e9717034ad86af404cf9eed9d6aaf
drh [Thu, 11 Jan 2018 13:43:04 +0000 (13:43 +0000)]
drh [Thu, 11 Jan 2018 00:38:39 +0000 (00:38 +0000)]
Update the .help screen in the CLI. Make sure the temporary files for
".open" are not deleted too soon.
FossilOrigin-Name:
b8d92d8dc239597c6f01a6e572b047f98ce374a8f48257683fa839dde3ec993f
drh [Thu, 11 Jan 2018 00:04:00 +0000 (00:04 +0000)]
Add the built-in edit(VALUE) and edit(VALUE,EDITOR) function to the CLI.
FossilOrigin-Name:
ef823c47a0ac4f3b001e6c89c38354b45b5229d872cfc69a29c82e99414b89c8
drh [Wed, 10 Jan 2018 23:29:42 +0000 (23:29 +0000)]
Add the ".once -e" and ".once -x" commands to the CLI, and the ".excel" command
that is an alias for ".once -x".
FossilOrigin-Name:
a6ed5ab9bc9741267fd1207e63b4c49d074291085c7e3f25e9f62a82f916a656
drh [Wed, 10 Jan 2018 23:27:30 +0000 (23:27 +0000)]
Update test cases for the new "usage" for .output.
FossilOrigin-Name:
fbf5e43c07e7c012cb39b33a74b3fab9e46ba946c48497fbd990110692125f57
drh [Wed, 10 Jan 2018 22:27:21 +0000 (22:27 +0000)]
Save and restore the output mode when doing ".once -x" or ".excel".
FossilOrigin-Name:
f697c164518d36f2a63c87d9f2708d0f9481fad3ded2de61f3f48c393cf7a500
drh [Wed, 10 Jan 2018 22:15:37 +0000 (22:15 +0000)]
An attempt to get ".once -e" working reliably on Windows.
FossilOrigin-Name:
9b97f9d2c876162139dbd9485fcf68412d1572d9ddc179b08938b8a602e895d6
drh [Wed, 10 Jan 2018 21:50:08 +0000 (21:50 +0000)]
Fix a potential SQLITE_MISUSE in the .excel command when no database is open.
FossilOrigin-Name:
9b95ff1abfb8d49bbe5a727f5c917a455e4289b4d69196377dc9294409341d70
drh [Wed, 10 Jan 2018 21:41:55 +0000 (21:41 +0000)]
Add support for the ".excel" command (and ".once -e" and ".once -x") in
the CLI.
FossilOrigin-Name:
23fa7c57c2b204d1ddcc2a939b5271628cf26689ad4ede6976038113095a9801
drh [Wed, 10 Jan 2018 19:50:40 +0000 (19:50 +0000)]
Fix a harmless compiler warning in zipfile.c
FossilOrigin-Name:
60c694c1ab26a7a096f17ccea5a93ecda0f9f2113ab5fdc8b17dbffc787724fc
drh [Wed, 10 Jan 2018 19:15:21 +0000 (19:15 +0000)]
drh [Wed, 10 Jan 2018 18:09:20 +0000 (18:09 +0000)]
Modify the new "--append" option to the .archive so that it takes a filename
argument, the same as "--file".
FossilOrigin-Name:
58e3b07cc8cb5cc915f7d430483bd455b03f14120e0db23286d2e20dbb5391c5
drh [Wed, 10 Jan 2018 17:44:03 +0000 (17:44 +0000)]
Add the lsmode(MODE) function in the fileio.c extension and use that function
in the .archive implementation. Add the --append and --dryrun options to
the .archive command and remove the --zip option, making it automatic.
FossilOrigin-Name:
38f28029d16df8489772c27867de8888dd1c26b170861acdc977fd4023939dde
drh [Wed, 10 Jan 2018 17:39:54 +0000 (17:39 +0000)]
Fix minor problems with the new ".archive" command changes.
FossilOrigin-Name:
612b30c95f948438016bd11470e9dd114d7bb064418a57e5954a094d2ca77f69
dan [Wed, 10 Jan 2018 17:37:58 +0000 (17:37 +0000)]
Return an SQLITE_CONSTRAINT error if an attempt is made to insert duplicate
entries into a zip archive.
FossilOrigin-Name:
1f099b2b45074c89eeff8ff241aa49489c95c2221b25c305fcda670ebf63fb4e
drh [Wed, 10 Jan 2018 17:19:16 +0000 (17:19 +0000)]
In the fileio.c extension, change the filetype(MODE) function into lsmode(MODE).
Use the new lsmode(MODE) function in shell.c.
FossilOrigin-Name:
52d12ba9f33c1f2620776e189c81f3bf991759344ecdd167ea2a6107f0972b9d
drh [Wed, 10 Jan 2018 16:50:18 +0000 (16:50 +0000)]
Implement the ".ar --create" command using a single
"REPLACE INTO sqlar SELECT ... FROM fsdir();" statement. Add the
shell_putsnl() SQL function for providing --verbose output.
FossilOrigin-Name:
28ab930436fea33c79073e84f39d9e381fa60b4702a5dcbfaaed72baeeae8431
dan [Wed, 10 Jan 2018 16:30:40 +0000 (16:30 +0000)]
Have the zipfile module automatically append "/" to directory names that do
not already end with such a character. This is required for info-zip
compatibility.
FossilOrigin-Name:
94bc3c60e7d2ec849b90444b06e3057ed645edf3af334f2737252960602868e5
drh [Wed, 10 Jan 2018 15:53:06 +0000 (15:53 +0000)]
Add the "filetype()" SQL function for interpreting file modes to the
fileio.c extension.
FossilOrigin-Name:
58c0c74c407d93f48930a4964b6cc48f008b522d193a62a559de0e6a319a8bd0
drh [Wed, 10 Jan 2018 15:17:34 +0000 (15:17 +0000)]
The ".ar" command deduces whether or not the target file is
a ZIP or SQLAR and does the appropropriate thing. The "-z" option is omitted.
The "--append" option is added to open auxiliary databases using apndvfs.
FossilOrigin-Name:
430d1a7daa823ae53606b7a158af4e7c16f62ff9b072b90606524e7c3f6131df
drh [Wed, 10 Jan 2018 14:00:00 +0000 (14:00 +0000)]
Allow the use of ".ar -t" without specifying an archive file or the "-z"
option when the command-line shell is opened on a ZIP archive.
FossilOrigin-Name:
9340a2c145bcb4b38d19276a16264a37341c617f0554d66e1da653f1d9f85163
drh [Wed, 10 Jan 2018 13:58:23 +0000 (13:58 +0000)]
drh [Wed, 10 Jan 2018 13:11:51 +0000 (13:11 +0000)]
Work on the ".archive" command.
(1) Add the --dryrun option.
(2) Do not require --file when open on a ZIP archive.
(3) Miscellaneous code simplifications.
This is an incremental check-in of work in progress.
FossilOrigin-Name:
a2baada429e84dc4b7243173a056e3c8bc042682f7efb01fdf8d2cc452c97e04
dan [Wed, 10 Jan 2018 11:56:03 +0000 (11:56 +0000)]
Fix a problem in os_unix.c causing it to return SQLITE_CANTOPEN instead of
SQLITE_READONLY_RECOVERY.
FossilOrigin-Name:
6a16f554f027ba268276b728588b5eaea837cbed85358a06a2f6da3b70e834ad
drh [Wed, 10 Jan 2018 00:53:55 +0000 (00:53 +0000)]
Rearrange some routines in shell.c to avoid the need to forward reference a
static function.
FossilOrigin-Name:
fd7f51a107806666d5c3a3a7a62528ec3e1fb71c4256f49d57b4dcdac4bf8680
drh [Wed, 10 Jan 2018 00:40:06 +0000 (00:40 +0000)]
Compute the correct column name even if the column identifier is the
very last token in the SQL statement. This fixes a problem introduced
by check-in [
0fdf97efe5df745510c6b ] and reported by the community during
beta-testing.
FossilOrigin-Name:
36b89d728ff13d395fe0e1db8e7c01263f73dccb278b3ece27f6ef78e909b492
mistachkin [Tue, 9 Jan 2018 22:23:42 +0000 (22:23 +0000)]
When disconnecting from the 'swarmvtab' extension, close each database prior to invoking the 'openclose' function on it.
FossilOrigin-Name:
3e5647cb6c4553683e24b9cb62548f16c79c4e2ac9e39cf135ea52a623f7cc33