Commit Graph

8845 Commits

Author SHA1 Message Date
drh
cbb9585805 Test cases added derived from the enhancment ticket.
FossilOrigin-Name: c022c0152ad61a4f56e36f4062609073e2273fbf6f826c20652159be229c2d46
2022-11-28 18:17:42 +00:00
larrybr
d8d68a5b8e Sync w/trunk, zap surplus space.
FossilOrigin-Name: b8345630a2a322234bda49ee4b996f6ba20e2b080621e229a2ec5e820892a663
2022-11-28 14:11:48 +00:00
dan
abbfa7aa17 Ensure the RETURNING clause is honoured when a row of a temp table is updated by an ON CONFLICT clause.
FossilOrigin-Name: a2449bcc2c71d0f4c3289621fbf1cb97f0f407c9f7b5bf18245b7854a07c6cfa
2022-11-28 13:47:27 +00:00
larrybr
c1ca183abf Conform CLI .trace arg handling to its help.
FossilOrigin-Name: 31546ea320e8daa020f8a9f491718ffc3dde0e32954018afed88e8494a6aff6c
2022-11-28 02:28:44 +00:00
drh
ae5cfda656 Immprove the query planner such that it is able to make use of indexed
expressions within an aggregate query with GROUP BY.  This implements
enhancement request [99378177930f87bd].

FossilOrigin-Name: b9190d3da70c41717eb188474fd225ee43d0b46646e1b03de5967bd332553870
2022-11-25 16:10:48 +00:00
drh
23f61a4ba8 Add restriction (9) to the push-down optimization: If the subquery is
a compound then all arms of the compound must have the same affinity.
dbsqlfuzz 3a548de406a50e896c1bf7142692d35d339d697f.

FossilOrigin-Name: 1ad41840c5e0fa702ba2c0df77a3ea126bd695b910b5d1271fa3129c38c58f5f
2022-11-25 15:52:00 +00:00
larrybr
472de149ae Speed up base85() conversions and sync w/trunk.
FossilOrigin-Name: 17b823500a2ed135c1f40aa7f4d87ba5b2eab35c0abd9e0856041cf0f510cbee
2022-11-24 20:11:34 +00:00
dan
eb84c81c53 Fix a test case in fts3expr4.test to account for different locales.
FossilOrigin-Name: a2b6883ac2ef878f525ee847b170beb9f9ab9d1fa67557101be2cdae1e7f7a57
2022-11-24 17:58:55 +00:00
dan
647b0dd12d Update multiplex3.test to account for the fact that the multiplexor xDelete method may return an error even if it manages to delete the first chunk of a file.
FossilOrigin-Name: 1a7f3254735054ed8ca32d5ec7c8cde9195a64702638bdc50392007e396fead2
2022-11-24 15:32:00 +00:00
drh
b669bb5e2b New test cases. Fix the logic so that it works for GROUP BY aggregates
that do not require sorting.

FossilOrigin-Name: ef6ebe7922f56c1584a005deedc85ca1070b4fe5082ada8bbf8d06df54f1c9ef
2022-11-24 13:19:25 +00:00
larrybr
9b9017def4 Speed up base64 conversions, and add test with more data for the baseNN conversion to grind.
FossilOrigin-Name: 6c84ae4ba83713c751fddff8be41686bbcb525ac8135e1520436c62d0bc23d2c
2022-11-24 02:59:33 +00:00
drh
9b80cb5f39 Add explanatory comment to the new optimization. And add a test case.
FossilOrigin-Name: e6c20f61de7d048eee65c8e74a3eb36760ab9747ebd1ab50e49642b777c10306
2022-11-24 01:40:20 +00:00
larrybr
809be56218 Add more baseNN tests, get oversize error trapping working, and sync w/trunk
FossilOrigin-Name: 03819e9368fd9f78f351147a1dc865743f9634893e43a9d1e3d7cbaf4c966069
2022-11-22 22:46:41 +00:00
larrybr
bf82c95e08 Add test/basexx1.test to test is_base85(t), base85(x) and base64(x). Sync w/trunk.
FossilOrigin-Name: 4e4334547795f659b4a5dc5fdaf842535643750a5f1ce1af799c526931a473e4
2022-11-22 19:04:09 +00:00
drh
d8e48fffdf Fix corner cases in UTF8 handling in the REGEXP extension.
[forum:/forumpost/3ffe058b04|Forum post 3ffe058b04].

FossilOrigin-Name: abb18f61c5cec0f524acc41453b4c06b61c5af51ff46417588837fc0c3967288
2022-11-17 19:24:39 +00:00
drh
1da477d3ab Change the fake_big_file test command so that it fails for files larger than
2MB on Windows, as we have observed that Window10 will sometimes bluescreen
when operating on very large sparse files.

FossilOrigin-Name: d39ffd2abadcc85c46ba17612f9f575005b4818e18bf39362b8ee574837cfad9
2022-11-14 18:57:21 +00:00
dan
cfce889cda Avoid running bigsort.test with SQLITE_DEBUG builds. The assert() statements added in [7c96a56] make it too slow.
FossilOrigin-Name: fa68dd8928c76888d535e649794743eeefd3abe0f909792a128955710bfc948a
2022-11-14 17:48:26 +00:00
drh
7e475e571f Disable the ability to change the schema_version cookie when
SQLITE_DBCONFIG_DEFENSIVE mode is enabled.  This is a security
enhancement inspired by the question in
[forum:/forumpost/2b9cc3dae1f1e5f6|forum post 2b9cc3dae1f1e5f6].

FossilOrigin-Name: 1d81381e8f5db5d7064cc313b8544ca3cb1ca9e8cd61e71368a2d2e598befc9c
2022-11-12 17:17:01 +00:00
dan
50ba1a0213 Fix a problem with URI formatting in calls to sqlite3rbu_vacuum(zDb, NULL) causing problems on win32. First reported here <https://sqlite.org/forum/forumpost/a7ae915a9d>.
FossilOrigin-Name: 77ccc8ea8a901df64feabe08e1210087d060f0bc133242e87a94a71b68b5b5fa
2022-11-08 20:04:05 +00:00
dan
afe768193f Do not attempt to run test script dbpagefault.test with SQLITE_OMIT_VIRTUALTABLE builds.
FossilOrigin-Name: 901918c4867557e51160ef9c495e4e007de26cfe07c237addc00a388662957e8
2022-11-08 19:36:26 +00:00
drh
da01757870 Fix requirements marks so that they match documentation corrections.
FossilOrigin-Name: 10d6189d23133006b39ea230045a918483721dd48f5558f77e57e23693097d16
2022-11-07 12:21:06 +00:00
dan
f53c0a0d4e Update test file dbpagefault.test to account for the restriction on using SQLITE_VTAB_DIRECTONLY virtual tables from within triggers.
FossilOrigin-Name: 2b68fc8aa35cc69e4d2c26aaebbf3f2b1f1c08d15ca9efcbe5be21d45735d3f1
2022-11-05 19:26:45 +00:00
dan
a16edfa29b Tweaks to recover module test scripts to work with various permutations.
FossilOrigin-Name: 454c61e818f6941c9a23f6600e37828a3f2b2ad3c6dbc8d6223570aed5d9cd8b
2022-11-04 18:32:45 +00:00
dan
5f7e173abf Another test case fix for auto-vacuum builds.
FossilOrigin-Name: c1c47eff48e0831b5aed987e90d797aee99caf1861fa8318c6c3ecfb108de7e6
2022-11-04 17:07:33 +00:00
dan
80dbd818f2 Fixes to recover module test scripts so that they may be used with SQLITE_DEFAULT_AUTOVACUUM and SQLITE_SECURE_DELETE builds.
FossilOrigin-Name: 0e5597ce5353dea2cdb092b166b57ba1d60f8115eb468349f2b2869803691a2c
2022-11-04 16:39:39 +00:00
dan
4868a86513 Add another test case for the OP_Found fix.
FossilOrigin-Name: 6cdd64a445fe16d547d7bf5ea26dad3ab6d9d5f7d1c2b49fdc9d7a2edaa031c6
2022-11-04 11:59:40 +00:00
drh
093677add4 Enhance the ability of the OP_Found and similar opcodes to detect truncated
index records and report SQLITE_CORRUPT.
dbsqlfuzz 2b12f90aeff8e081706c7e9b58834f04869f446c.  Test cases in TH3.

FossilOrigin-Name: 059a09da2c5fd9c7e723c713565fbaf71602079feef0704129cc5cbbd0033936
2022-11-04 11:54:42 +00:00
drh
2cdcc7f01a Clarify documentation regarding the --recovery-db option to ".recover" and
the magic 789 configuration option it is associated with.

FossilOrigin-Name: f6fa0cffa921ccde8910e7fa4a63c2e4ef8ddb376c8ce99e436b27ac332c4498
2022-11-02 14:08:26 +00:00
drh
b6d9167945 Do not flatten a UNION ALL subquery where the column affinities do not match
on all arms.  Force that subquery to be materialized.

FossilOrigin-Name: 1b8a128832c1633cbb86999d347fef64ac45fe134dac61132112fc97f24676a0
2022-11-01 01:07:29 +00:00
drh
5fdb9a352c Enforce column affinity on the materialization of a subquery or view.
FossilOrigin-Name: b6692de374d7f489d8cf8877bdfef19501bc5ecb0781d42750807eeb58f2e7cd
2022-11-01 00:52:22 +00:00
drh
053bb22f35 Fix harmless compiler warnings in testing code.
FossilOrigin-Name: 2f53612388507f9b1ecbec3c15281825beab54b8062d97d0ab6f009c5fed347b
2022-10-28 18:52:05 +00:00
drh
71b65e88e8 Add sqlite3recover() support to fuzzcheck.
FossilOrigin-Name: e65c5bdc5bd6e1989c3de59798ff0a761125fc490fdec8c7671ca70ed688c4f8
2022-10-28 18:35:06 +00:00
dan
f7fea5b4b8 Change the name of the ".recover" command option "--freelist-corrupt" to "--ignore-freelist".
FossilOrigin-Name: afce8443ace57c3c99c6810be98f05ed716ae504b68098726c869843c643bbf0
2022-10-27 18:19:45 +00:00
dan
195687f1bf Disable the push-down optimization for sub-queries that are INTERSECT, UNION or EXCEPT compounds. dbsqlfuzz a34f455c91ad75a0cf8cd9476841903f42930a7a.
FossilOrigin-Name: 346a3b12b861ce7ba369e98cd336f79a1d4f7a7bb9acd7a4f63f37b391755bf5
2022-10-26 21:14:21 +00:00
dan
5ad03a486e Merge further changes from trunk, including fix to dbdata.c.
FossilOrigin-Name: bcf6b48d52c1ce656899f50bd508c0920cae8cf2ef3c0758a7633981f0f0f484
2022-10-26 18:22:22 +00:00
stephan
16603ecfcb speedtest1: use the current (or default) vfs->xDelete method to unlink the db. This is specifically necessary when running the opfs vfs in a wasm build of speedtest1. This worked without this fix until recently because the affected test code was performing similar acrobatics in its stead.
FossilOrigin-Name: d3c830bd37a402161b486d3631feceae5d00f89c2522aed65fcd2e666bd64238
2022-10-25 15:38:38 +00:00
dan
5f726694eb Merge latest trunk changes with this branch.
FossilOrigin-Name: 757e3f585959f4f113fee48fe3d504f037604c53a95c8d47ce5c2bccfb2af8ff
2022-10-25 11:05:31 +00:00
dan
80b30f995e Use the same "PRAGMA synchronous" setting for the output of a "VACUUM INTO" as are configured for the database being vacuumed.
FossilOrigin-Name: 86cb21ca12581cae9a29f42ba707bd9d789e667e5ddc0f64b24940d5d5c9a118
2022-10-24 15:51:24 +00:00
drh
4073706a47 Improve the ability of the query planner to recognize covering indexes even
on tables with more than 63 columns and where the index is over columns
beyond the 63rd column.

FossilOrigin-Name: f058773e41495ddbae698f9e9a4f62b7003112ea8614dfad69471340058735e4
2022-10-24 13:20:48 +00:00
drh
2d75c1aa3d Update the fuzzinvariant logic in fuzzcheck to the latest code from
dbsqlfuzz.

FossilOrigin-Name: 739ad584765f1fc0eb196db870785da1726805cc2d9dd0a831a37a9e55a4afe9
2022-10-24 12:38:32 +00:00
drh
89b373ab28 Test cases for covering indexes on wide tables.
FossilOrigin-Name: 64c3777eb356b15094a9e9fcc135499ba22f4d847fb117afa6ccf19986e33585
2022-10-24 11:02:02 +00:00
dan
7e089d0c40 Add test case for previous commit.
FossilOrigin-Name: 535867a9c8719358380f89fd80473c484def9bb72744dd2fd28ada65999ee901
2022-10-20 16:22:39 +00:00
dan
ac79fa1c78 Add new test file windowE.test, to test the window functions modules response to an inconsistent collation sequence.
FossilOrigin-Name: 740a2eb0928d54fdf735a8e573c6a61a34dbd295b46e5b6ef39e957fd2623293
2022-10-18 15:02:08 +00:00
dan
8e62d370cf Exclude slow test recovercorrupt.test from veryquick.test.
FossilOrigin-Name: ff9a733532fe11bb253246b45a94681a174c976aafee5c780af571893e8ce694
2022-10-15 19:18:10 +00:00
dan
9dffd36c5d Merge latest trunk changes.
FossilOrigin-Name: 42255ead8e44b24a8abc04aca49f170c55f3b52f42366a0d8ef248ee65fcc7ce
2022-10-15 15:39:46 +00:00
dan
879164ed74 Fix a problem with using the push-down optimization on compound SELECTs where component SELECTs use different collation sequences. dbsqlfuzz 11516f050100243e5a845f5a2b48a90ed2efaf2e.
FossilOrigin-Name: ed14863dd72e35fa3a23320c3d5a8166515faea39a555c28a27b2d35e701eac4
2022-10-14 19:30:34 +00:00
dan
2bc4a6cad0 Fix a problem in the LIKE and GLOB operators that may occur when the character immediately following a "%" or "*" wildcard is U+80. Reported by [forum:61bf7ccbdf].
FossilOrigin-Name: 2da677c45b643482eec39e4db7079c772760bc966dc71bf6c01658cc468f5823
2022-10-14 15:10:36 +00:00
drh
1ffb6be119 Updates to the fuzzer query invariant checker - tracking changes made
over in dbsqlfuzz.

FossilOrigin-Name: 4ca16a304ad10fbb48f78b4384b347fe883e1a4f222f113ac981e89845c3e113
2022-10-12 18:40:25 +00:00
drh
49d77ee642 An attempt to enhance PRAGMA integrity check so that it does data type
checking on non-STRICT tables.  Specifically:  (1) Columns with TEXT affinity
should not contain numeric values, and (2) columns with numeric affinity should
not contain text values that can be converted to numeric.

FossilOrigin-Name: 8b1e7f0524637728cebe81c7d3ff8ad8a5a55782eac6409b425dad538024f596
2022-10-10 18:25:05 +00:00
dan
73c586bcbf Fix a problem causing the seek-scan optimization to skip over valid rows that could occur when it is used with expressions of the form (a IN (?,?..) AND b >= ?). dbsqlfuzz ab1db6dc0efb04cba1cd3431ee6da4894fdc4520.
FossilOrigin-Name: 63d9efe277759d4daa29794846b60c6f55491496618f423f61468df72d0a4633
2022-10-07 18:57:15 +00:00