Commit Graph

6828 Commits

Author SHA1 Message Date
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
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
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
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
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 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
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
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 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 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
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 2825e4ebb1 Merge the latest enhancements from trunk.
FossilOrigin-Name: c8083de14b54fba1071385f8530d03d5684efd4963fde0f83ddc53ae3118a75b
2018-03-01 13:44:40 +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 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 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
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 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 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
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 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
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
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 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
dan 91347c066b Make the tests in func6.test more robust against implementation changes.
FossilOrigin-Name: b685d3231097fb90e7d61d9ac01cc560e8bf2671d49390ae7af5bfdbd6d04f11
2018-02-09 15:42:40 +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
dan eab0e10304 In extensions rtree, fts3 and fts5, ensure that when dynamic buffers are bound
to persistent SQL statements using SQLITE_STATIC, the binding is replaced with
an SQL NULL before the buffer is freed. Otherwise, a user may obtain a pointer
to the persistent statement using sqlite3_next_stmt() and attempt to access
the freed buffer using sqlite3_expanded_sql() or similar.

FossilOrigin-Name: 2a5f813bc61f9e780f2ccbda425611f65ad523b6d486a1e5e2b9d5e9f1d260a2
2018-02-07 18:02:50 +00:00
dan fa68815fa3 When the final connection disconnects from a wal mode database, check that the
database file has not been moved or unlinked before deleting the wal and shm
files.

FossilOrigin-Name: 4761db83b6d3d57f281370899403c102e39ad0021d315dd6a6912d250436782a
2018-02-07 16:14:41 +00:00
dan d1317095b5 Fix another minor problem in walro2.test.
FossilOrigin-Name: ba0631de60ca38bf7efa6dbd86ec8774bf6f438c804155968e97f17eabe3b20a
2018-02-05 13:42:45 +00:00
dan 60d72b9bab Update test file walro2.test to account for systems with a page-size
(getpagesize()) larger than 32KB.

FossilOrigin-Name: d9e59cfb8476e1ec1ca458b8382172526c0557ab785f41e31971d03045c9344c
2018-02-05 13:28:51 +00:00
dan 668845bb0b Add a few more zipfile tests. No changes to code.
FossilOrigin-Name: 3f621545879ea39502cfaf2b61883f92c077070274b4fdf45524ded81cac3e63
2018-02-01 20:42:23 +00:00
dan 15daa6b53e Fix a problem triggered when a zipfile virtual table is created and written to
within the same transaction. And add other zipfile test.

FossilOrigin-Name: 48f1c556994d7f8f359c649a1da81eec02306106b68946a9a20b276742c4610d
2018-02-01 19:41:23 +00:00
dan c3ef23a1c9 Fix a memory leak that could follow an IO error in the zipfile extension. And
add other tests.

FossilOrigin-Name: e6bb750697c3c7ceb5ce41d216e8ef6a1d556822a3b55e0a007b4a03e194a7d9
2018-02-01 15:19:54 +00:00
drh 06b3bd5b7a When an index is based on a text representation of a numeric column in the
original table, make sure the indexed value uses the canonical text 
representation of the numeric value in the table.
Proposed fix for ticket [343634942dd54ab57b70].

FossilOrigin-Name: 88e2ce916791d488076584f3795a89eb4277fcb812af9e4c2f383815d55ff6f1
2018-02-01 01:13:33 +00:00
dan cfaffad65c Fix a test case in zipfile.test.
FossilOrigin-Name: 4eb5b24c64ee5907c18371f563b79fa0caf58285a62b8f09e639a690e6727eaa
2018-01-31 19:45:58 +00:00
dan 44091ed368 When creating a new archive entry, have zipfile store UTC instead of local
time in the legacy MS-DOS format timestamp field.

FossilOrigin-Name: e2114df18383d111dd5fbac902e08b42a7f4b2b2d6f7bf29574a3722e4a4dad5
2018-01-31 19:13:31 +00:00
drh 5cd253423b Improve the omit-left-join optimization so that it works in some cases
when the RHS is subject to a UNIQUE but not NOT NULL constraint.

FossilOrigin-Name: 02ba8a7ba7ba71cd7abd5dd3093ea486f53a025f6972bb444f2da37e0e2fc3b2
2018-01-31 16:50:27 +00:00
dan 4ea48144f9 Fix a failing assert() in the new code on this branch.
FossilOrigin-Name: 74d857d178dfadea7e07ba47439fe11aa9d282b54caf78cd6961e593b37406d0
2018-01-31 14:07:01 +00:00
dan 099fa84727 If a virtual table xColumn method sets an error message using
sqlite3_result_error(), use that message in preference to any error message
left in the sqlite3_vtab object.

FossilOrigin-Name: 71e3b715ad36c2132a587b84221be6359c31d7a17c3fba201b7ed3baf17922f1
2018-01-30 18:33:23 +00:00
dan 2f7260deba Add tests cases for the zipfile extension.
FossilOrigin-Name: 13b786dafd308b7aef42328f26fe64981c83d524e4bf82ceb7d58afc7146c7d3
2018-01-30 17:43:22 +00:00
dan fdcd9d4e6c Prevent users from creating zipfile() virtual tables without an argument.
FossilOrigin-Name: 81fdbe0cc5a360f818078d47a5888d0a29d555927da279a9a0213702d74ef09a
2018-01-30 14:07:55 +00:00
dan ea4125bbef Add unix-only tests to check that the "unzip" program can unpack archives
generated by the zipfile extension.

FossilOrigin-Name: 438c5c5237a801ae78809bf324bb9251fb50250addfc1f8e36659442b0e26ab6
2018-01-29 19:47:32 +00:00
dan f8c4b99a02 Add aggregate function zipfile() to the zipfile extension. For composing new
zip archives in memory.

FossilOrigin-Name: e364eeac76a8225146b37d801bc6cabe03e9abede5a1412ebe9d94a32d8838cc
2018-01-29 18:41:07 +00:00
dan 8433e7166b Update the omit-left-join optimization so that it works in some cases when the
RHS is subject to a UNIQUE but not NOT NULL constraint.

FossilOrigin-Name: 88411a402b29f19d69e0d06d9099eabb98c238ddb7c07ce110236316f008753e
2018-01-29 17:08:52 +00:00
dan 26e731cc88 Ensure the "unique-not-null" flag is set for automatic indexes on columns
declared with "col UNIQUE NOT NULL" (where the NOT NULL comes after the
UNIQUE).

FossilOrigin-Name: 8767f7b880f2e4112f75f0b6ef7be3f50ab1ae20e103e7d03d8bfe77e6c79438
2018-01-29 16:22:39 +00:00
dan 26333ee3ca If a zipfile virtual table is created with no argument - "CREATE VIRTUAL TABLE
zzz USING zipfile()" - accumulate data in memory. Support "SELECT
zipfile_blob(z) FROM zzz LIMIT 1" to retrieve a zip archive image.

FossilOrigin-Name: e63185edfe0c316aa60c1fa085d032425ecc7db54536dfa5a977772eaf3c240e
2018-01-27 16:29:59 +00:00
drh c9f3db33d5 New test case for ticket [ec32177c99ccac2b1] that works without the STAT4.
FossilOrigin-Name: 5259d4847f2b73f26b2385f9d8cff8fe0cabc54b4deab8477c87c8d1bb5535b1
2018-01-27 13:55:56 +00:00
drh 33f10207aa Proposed fix for the query planner problem of ticket
[ec32177c99ccac2b1].

FossilOrigin-Name: eef8cbef3c49e6331301a8f3f8a5fd12090b1e99e68487c2d405e53ef771f688
2018-01-27 05:40:10 +00:00
drh 33f763d154 Fix the query planner so that it takes into account dependencies in the
arguments to table-valued functions in subexpressions in the WHERE clause.
Fix for ticket [80177f0c226ff54f6dd].

FossilOrigin-Name: 7daa687340e475972d6849f84fe1419a1f5700934f53fd80656849adc73d6d04
2018-01-26 22:41:59 +00:00
dan 8005d60587 If the argument to table function zipfile() is a blob (not text), assume that
it contains a zip file image to interpret, not the name of a file on disk.

FossilOrigin-Name: 029ebcd30cb261d949f7587ac54c23d7479796b6716fd4ca7512361b8f32de3e
2018-01-26 18:59:25 +00:00
drh 4eb57ceffc Improve text-to-integer conversion in boundary cases. The
sqlite3Atoi64() function always returns the minimum or maximum integer
if the magnitude of the text value is too large.  Trailing whitespace is
now ignored.

FossilOrigin-Name: ace0644a1a2a42a3ea42d44f00a31915b8a7e56c9ba90f90a6c02001f89f9c86
2018-01-26 18:37:34 +00:00
drh fe875027d7 Add the normalize.c extension.
FossilOrigin-Name: 16ebe558d2f0982f630c39b6c1b00d14d27011d454cced213f17c26491a2c06e
2018-01-24 15:07:37 +00:00
drh 31a13548f8 Merge changes from trunk.
FossilOrigin-Name: 6ef3de810d54563c227045b16197b8011ce285ea867261946f93b2de55344f29
2018-01-24 15:02:53 +00:00
drh 4d6d872c49 Adjust the fts3rank.test module so that it works on big-endian systems
(hopefully - I don't have a big-endian machine to test the change on.)

FossilOrigin-Name: e4766cabdf64d8e998048ae43154466fc9c3fad0b86102a42b65122abfcbbe55
2018-01-24 14:39:18 +00:00
dan 0aac5613d9 Update a couple of test scripts so that they work on F2FS file-systems that
support atomic transactions.

FossilOrigin-Name: 49e58e645e0c114c71935a3b7fa4771e8a23e28127efd2efe0f2f18813c8f391
2018-01-24 06:30:10 +00:00
drh 56f1774603 Make the shell functional even if compiled with SQLITE_OMIT_COMPLETE.
Omit the sqlite3_complete() call from the fuzzing interface if it is
compiled with SQLITE_OMIT_COMPLETE.

FossilOrigin-Name: c3e816cca4ddf0967c4c790cdde2345101dde3f2d854e62589f1ac1d7f3c60b8
2018-01-24 01:58:49 +00:00
drh 5347f3c111 Invoke the sqlite3_complete() interface from the fuzzer.
FossilOrigin-Name: 332bf84625d2034c9e1c029aa8243aa34088217e52e34e1f5472217743a31af3
2018-01-24 01:02:23 +00:00
dan a916b57013 Fix a bug causing spurious "sub-select returns N columns expected 1" errors
in join queries with a term like "(a, b) IN (SELECT ...)" in the WHERE clause.

FossilOrigin-Name: 14dfd96f9bca2df5033b2d894bf63cc8bf450a45ca11df5e3bbb814fdf96b656
2018-01-23 16:38:57 +00:00
dan b8fff29c68 In SQLITE_ENABLE_BATCH_ATOMIC_WRITE builds on F2FS file-systems, invoke
SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE if an SQLITE_FCNTL_COMMIT_ATOMIC_WRITE call
fails. Also, do not use an atomic transaction to create the initial database.
This is because if an error occurs while writing to the db file, any changes
to the file-size do not seem to be rolled back automatically. The only time
this matters is when the file was 0 bytes in size to start with.

FossilOrigin-Name: b3122db1545aeb48b7c28d480534b4b0fe04e83d5336225714c3cad926e5960e
2018-01-23 14:01:51 +00:00
dan 3a9b9b7749 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
2018-01-22 15:20:59 +00:00
drh 88284b0dc3 On the walro2-X.4.2.2 test case, show the size as part of the test output.
FossilOrigin-Name: ac5091d7f870f1d0659a576723de454d544e5bfa2bdbba307d7c81eb5ab34e3b
2018-01-22 14:49:15 +00:00
dan f193937620 Omit the single test from zipfile.test that uses json functionality in
non-SQLITE_ENABLE_JSON1 builds.

FossilOrigin-Name: 6bb2a10fad71bf8cec6bca538db7b00be0d26418ab62b83092d3a6a68d1c0d9f
2018-01-17 12:58:11 +00:00
mistachkin 824f28426a Fix duplicate test names in 'walfault.test'.
FossilOrigin-Name: 7274d05ff43fc9872f0e4857ae583689e4a6c429b7fa991dcc29744da3048879
2018-01-17 01:15:08 +00:00
dan 2879952faa Fix a problem causing zipfile to store 0 in place of the CRC32 value for
uncompressed files.

FossilOrigin-Name: ba44724bcca2e87788b7c6d8c5de7fa388360127bd894ee6a171fd66e794fcae
2018-01-16 21:09:00 +00:00
dan 0c2ba13e02 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
2018-01-16 13:37:43 +00:00
drh ded2d99d73 Disable the ".archive" command tests in shell8.test if the CLI is compiled without
ZLIB support.

FossilOrigin-Name: ce8bfe6c2b87090a2de1e04bc88fcb878597fe1f4ecd5df6d9d588a65601c901
2018-01-16 02:38:35 +00:00
dan 2d620070b9 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
2018-01-15 19:00:35 +00:00
drh b058d05452 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
2018-01-14 20:12:23 +00:00
dan f42884c307 Support UPDATE statements against zipfile virtual tables.
FossilOrigin-Name: f2d2a5df4f29b47212fd2411eae6545087b901a270655640c87ceb472e02a24c
2018-01-13 19:08:24 +00:00
dan 2483a111db Fix a typo in crash8.test.
FossilOrigin-Name: c3dc7b8d9de94e46fae75fcc96ec68743205e0a2591e14391c394fff203004d1
2018-01-13 14:01:26 +00:00
dan 69aedc8db4 Fix various problems in test scripts preventing "make test" from passing on
F2FS file-systems with the "atomic-write" feature.

FossilOrigin-Name: 56d93d070d6b92d8a5a3fec1b09aae8911116c73d072fc5022f0b51668ed996b
2018-01-13 13:07:49 +00:00
dan 614efe2b4b 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
2018-01-12 16:44:29 +00:00
dan 66a3a91aa6 Change zipfile to be a WITHOUT ROWID virtual table and table-valued function.
FossilOrigin-Name: 931201f64e04247ed613a0301fcc86c3a337c2ed162c6370a80c67a1dd919e7c
2018-01-11 17:33:48 +00:00
drh 6c9dcc427d Update test cases for the new "usage" for .output.
FossilOrigin-Name: fbf5e43c07e7c012cb39b33a74b3fab9e46ba946c48497fbd990110692125f57
2018-01-10 23:27:30 +00:00
drh e15c5e532a 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
2018-01-10 17:44:03 +00:00
dan 4bfd182939 Return an SQLITE_CONSTRAINT error if an attempt is made to insert duplicate
entries into a zip archive.

FossilOrigin-Name: 1f099b2b45074c89eeff8ff241aa49489c95c2221b25c305fcda670ebf63fb4e
2018-01-10 17:37:58 +00:00
dan f2ed70e4de 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
2018-01-10 16:30:40 +00:00
drh a5676c4d2d 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
2018-01-10 15:17:34 +00:00
dan a688ca5ea9 Fix a problem in os_unix.c causing it to return SQLITE_CANTOPEN instead of
SQLITE_READONLY_RECOVERY.

FossilOrigin-Name: 6a16f554f027ba268276b728588b5eaea837cbed85358a06a2f6da3b70e834ad
2018-01-10 11:56:03 +00:00
drh 6116ee4eee 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
2018-01-10 00:40:06 +00:00
mistachkin dc006e05aa When disconnecting from the 'swarmvtab' extension, close each database prior to invoking the 'openclose' function on it.
FossilOrigin-Name: 3e5647cb6c4553683e24b9cb62548f16c79c4e2ac9e39cf135ea52a623f7cc33
2018-01-09 22:23:42 +00:00
dan 2c4df97591 Return SQLITE_CONSTRAINT if a user attempts to update a zipfile table.
FossilOrigin-Name: 64c9ccf6c5598a68135e78dad128ec070afa49416e1d1f35745a24276e7aeeea
2018-01-09 20:44:04 +00:00
dan c48e0271f6 Fix a potential crash in sqlite3expert.c caused by a missing sqlite3_reset()
call.

FossilOrigin-Name: f6355970f04a3c4d85801c806366788139d8d5ad29383ec7faa81e2176ffe987
2018-01-09 18:31:11 +00:00
dan 128011a258 Fix a zipfile problem with adding new directories to an archive.
FossilOrigin-Name: 5fed67033c9dd4492bf8cfcf98874284581f448d8cc84fa5470dde239f218375
2018-01-09 10:29:34 +00:00