drh
d2c737f2e4
Remove a branch that cannot affect the outcome from FkNoAction processing in
...
fkey.c. Replace it with an assert().
FossilOrigin-Name: 023a9dbe83c0042e9d500e3ae6c0592a468982e4ac278d08c9201967506c7555
2023-10-21 20:34:57 +00:00
drh
76bd238a66
Replace the patch at [5cb61c6788d7c017] with a better way to avoid failing
...
PRAGMA integrity_check if a module implementation is not loaded, as the use
of suppressErr can lead to problems.
FossilOrigin-Name: be5737ee4f4f1d5f8b3126f6eb70210bf3d8b1cdaef51aae818eaaba43ccf722
2023-10-21 20:03:44 +00:00
dan
ef6bf1bbe5
Fix a problem allowing a COMMIT following an OOM to cause fts3/4 corruption.
...
FossilOrigin-Name: 7f41d7006db4225cf9b3d197d3a76842778669ac079e76361214a8023c9976e6
2023-10-21 18:12:07 +00:00
drh
da4cfde031
Add the SQLITE_TESTCTRL_FK_NO_ACTION test control. Make it available in the
...
CLI. Fix a minor problems with SQLITE_CHANGESETAPPLY_FKNOACTION in sessions.
FossilOrigin-Name: 91b64c6a70744704fc3285be7d8d46ba679ea5f0f69bd77b0e093eeb7447947d
2023-10-21 16:33:20 +00:00
drh
5c8cfe9617
Extra comment on the implementation of SQLITE_TESTCTRL_FK_NO_ACTION,
...
warning about the need to reset the schema in order for the setting change
to take full effect.
FossilOrigin-Name: a50a333ae11ba5d92f432108308ac0bec9afb00f466b78c8d3f3aa7e2851ef21
2023-10-21 16:25:44 +00:00
dan
fcef73a787
Add missing "finish_test" to sessionnoact.test.
...
FossilOrigin-Name: 9a1d37f5479adedb93f40e8189ad0efa891a438805d80774ee992d4dfd71150f
2023-10-21 15:21:06 +00:00
dan
ca9dc173a2
Fix a problem with SQLITE_CHANGESETAPPLY_FKNOACTION and the foreign-key-trigger-cache.
...
FossilOrigin-Name: 95304ec6c9654b4366dc58ae263270cb42861cb5017174936f816922b5eb61e6
2023-10-21 15:04:24 +00:00
drh
51b358e5e5
Add SQLITE_TESTCTRL_FK_NO_ACTION.
...
FossilOrigin-Name: 563cf5f782cdddbbd7f727c65118edfd109aeb731c8aaf0d6ee5ee7030e61ea9
2023-10-21 12:54:37 +00:00
drh
a35a54b824
Adjust an EXPLAIN QUERY PLAN output in scanstatus2.test to account for a
...
different loop order taken due to the removal of the view-scan optimization.
FossilOrigin-Name: 9deb8b6915e794bf9c5de88f2727ef9857351eaf905f8ab56754bc4d399c88b4
2023-10-21 11:43:54 +00:00
drh
813159e2ea
Compress the content of the status line in testrunning.tcl so that all the
...
same status information appears but with less punctuation and with "zero"
values omitted, so that the status line will fit comfortably on an 80-column
terminal window.
FossilOrigin-Name: 966351311682a319ec796c07d407ce90cd1aa0cea9e904ba1085a4ebadbdf925
2023-10-21 11:34:59 +00:00
drh
531ca6058e
Create the new string_agg(X,Y) aggregate function which is an alias for
...
the two-argument group_concat(X,Y) function, for compatibility with
SQL-Server and PostgreSQL.
FossilOrigin-Name: a3b3df8a9e43f1880a904b76027db56ed504a84622831c96ba1962a19bbed762
2023-10-21 11:13:47 +00:00
drh
266e5d034b
Avoid an unnecessary malloc() for the page usage bitmap when running
...
a partial integrity_check.
FossilOrigin-Name: 2904fcbeebba9189cebc48e58d12fc46f78ee23d8c4d46644606691f8cabb80c
2023-10-21 11:06:03 +00:00
drh
51bb5dec6c
Fix a test case broken by the previous check-in.
...
FossilOrigin-Name: 1e61864c3bffec133632f4575d59d11936e8bafc089c4d84a129dcaf7e9b6d7d
2023-10-21 11:00:57 +00:00
drh
d5e040b6f0
Add string_agg(X,Y) as an alias for group_concat(X,Y), for compatibility
...
with SQLServer and PG.
FossilOrigin-Name: b91c19bf2680f60d7826ab5d9e7902e2dc2a55d847bbea565a6489d47f2cc8f1
2023-10-20 20:19:30 +00:00
dan
71bae9f19f
Fix a problem allowing a COMMIT following an OOM to cause fts5 corruption.
...
FossilOrigin-Name: fba3129d1362dd3ee04d61cb3d3c48518cd98dde3febc85298f411776d60073e
2023-10-20 19:59:12 +00:00
drh
81656b15c9
Fix PRAGMA integrity_check so that it does not raise an error if the
...
schema contains a CREATE VIRTUAL TABLE that does not have its module
loaded.
FossilOrigin-Name: 5cb61c6788d7c0170b587e4667ee57d588c991a9901951762e33b97c6a135a82
2023-10-20 19:06:04 +00:00
drh
e98f62fb3f
Omit some redundant calls to strlen() used to find the size of
...
Expr.u.zToken in sqliteExprDup(). This inefficiency was seen while working
on the previous check-in, and I thought it best to fix it while it was
fresh in mind.
FossilOrigin-Name: b7a84eff5dcdf5b2ff81331097cdc64d0c5d16a4ae224320f39b64541ec72dc7
2023-10-20 18:09:08 +00:00
drh
ab3eb5b770
Improvements to the sqlite3ExprDup() logic for faster performance and better
...
run-time error detection. This check-in fixes the 5x oversize memory allocation
bug from [f371e4c0f8ea73ae] as well as all other known issues that result from
handing the ORDER BY clause of an aggregate function off of the pLeft pointer
of the Expr object.
FossilOrigin-Name: f5c01676fd281e938181b846dd2024d050f597dc6a7a91928beab9d8553dfdb5
2023-10-20 17:15:15 +00:00
dan
17c3408e0e
Add the SQLITE_CHANGESETAPPLY_FKNOACTION flag to sqlite3session.h, for passing to sqlite3changeset_apply_v2() to cause all foreign key constraints to behave as if they were declared NO ACTION.
...
FossilOrigin-Name: fc9f82ea084159eaf3dd1757b96d17d1201b00c4e06455a7dcd8067172b25f28
2023-10-20 17:06:39 +00:00
drh
90e4a3b7fc
Simplifications and optimizations to the Expr object duplication logic.
...
The 5x multiplier crutch from [f371e4c0f8ea73ae] is still present. More
fixes are still needed.
FossilOrigin-Name: 56142a78163b755f16afc05201f623a7a19d9a4b0620a67f7fa20d2a965a288d
2023-10-20 15:47:30 +00:00
drh
0a261eb4bb
Omit an unused constant from sessionfuzz.c to prevent a compiler warning.
...
FossilOrigin-Name: a0cf7e24f928183866ac54f0d6cd83c859d487a19dc87572ab0188d90d2ff87d
2023-10-20 14:05:26 +00:00
stephan
11223e0cff
Correct the opfs-sahpool VFS's xGetLastError() method to return the previous error code, not 0, on success.
...
FossilOrigin-Name: 95a1dde63117d696323c775580b9c04f044a5b8d609e9174b739ac03ecc1336c
2023-10-20 12:23:49 +00:00
drh
d707e012f0
Use sqlite3ParserAddCleanup() instead of calling sqlite3ExprListDelete()
...
directly when disposing of an unused ORDER BY in an aggregate function,
to avoid disrupting ALTER TABLE data structures.
FossilOrigin-Name: d083e42086733ecd79aba8c268e020b01782bfe1cfa9684ce1c277af9c8bf92a
2023-10-20 10:18:03 +00:00
drh
dcf76a8bbd
Remove a faulty assert() that was added just a few check-ins ago by
...
[8b6fffb552c30f9c].
FossilOrigin-Name: 18e7c826f08bce51719ef045daa60200b33790f2fe312c6853f9ef6c7e9d5030
2023-10-19 20:06:20 +00:00
drh
5f53f85e22
For TK_ORDER expression nodes to always be full-size.
...
FossilOrigin-Name: a5c73b46f4772f214ffbfa31cb87dce82ebd690addabef539bd09def26b7744d
2023-10-19 19:57:57 +00:00
drh
5080397e67
Fix an adverse interaction between the new aggregate ORDER BY logic and the
...
expression compressor.
FossilOrigin-Name: f371e4c0f8ea73aee9ea0645f396e3da20f1eb97be34c83de9d94c9cbb959934
2023-10-19 19:19:59 +00:00
drh
d8b840a4f4
In the TreeView logic (used for debugging only) do not show unnecessary fields
...
of the Window object when a function has a FILTER.
FossilOrigin-Name: d2c6b82c346dbf39e07f09d187e4a8216a56caa7df3dcfafc82e32f676a1db8a
2023-10-19 19:08:33 +00:00
dan
ee3c55471c
Fix an fts3 problem caused by reducing the page size using the undocumented "nodesize" option, then running an incremental-merge.
...
FossilOrigin-Name: 2875dcb1ac86db2704ad377d719f308c8837e196b49c98b20ceda1324f2d27ea
2023-10-19 18:23:17 +00:00
drh
4e254641ff
Simplify the Expr compression logic slightly by adding the new EP_FullSize
...
property to expressions that are exceptions to the rule and should not be
compressed.
FossilOrigin-Name: d5ae82ec52eafed5e3dc8c9d99685f6523fce7d973ef7e8d9d75ed9b8912426a
2023-10-19 18:07:58 +00:00
drh
0588385799
Simplification to sqlite3GetVarint32() to avoid confusing gcov.
...
FossilOrigin-Name: 89862c51ad9715bedf5b029db484602e740f0db7404970d482ce503c1b9a0ed2
2023-10-19 13:35:22 +00:00
drh
11877c6ba4
Fix an error in a debugging routine used inside of testcase(). Does not
...
appear in production. Problem discovered by scan-build.
FossilOrigin-Name: c6c9d7ed6dbc71b998aeaaa1bdeb36b1bb9b902f9d6088ad36db29f8ea8b7ef6
2023-10-19 13:00:41 +00:00
drh
266178f369
New assert() statements to help verify correctness of the ORDER BY aggregate
...
code.
FossilOrigin-Name: 8b6fffb552c30f9cbf7102c2e26a7b486c4c9edd9f494d803de7004db3018277
2023-10-19 12:36:59 +00:00
drh
519017f25a
Fix the sqlite3ReferencesSrcList() routine so that it recognizes columns
...
in the ORDER BY clause of an aggregate. Fixes a problem with
[634286828dad873d] discoverd by dbsqlfuzz.
FossilOrigin-Name: 3d26f1aaa4876f21f2c3abf13bbc37933c8f32471153e29019880cc9530cb011
2023-10-19 12:12:49 +00:00
drh
d9451051f1
Add support for ORDER BY on the argument list of aggregate functions.
...
FossilOrigin-Name: 634286828dad873dba244751441aa729cd37b6ed5899fa5875643d4af03c006c
2023-10-19 01:26:34 +00:00
drh
0b633640fa
Merge the latest changes from trunk.
...
FossilOrigin-Name: d18bc400146812c8c5048af7eaf4a5371ddd80fc9ce895d253b6114b9eae7fc3
2023-10-19 01:09:49 +00:00
drh
69ff726d4d
Fix a false-positive in run-time error checking.
...
FossilOrigin-Name: cd63eec0758960d9ee63d7b964ec62e2bd622f8c94a58bd9556046381ffa18d0
2023-10-19 00:25:35 +00:00
drh
d05e54efff
Changes for test coverage.
...
FossilOrigin-Name: ddfa09c6031afd4391a9888381bf09214cd542a826b431eeb1537a070f65c5f9
2023-10-18 23:48:24 +00:00
drh
42f5ea354e
Test case for alter column that is used in the ORDER BY of an aggregate.
...
FossilOrigin-Name: 648ddb3a8eb358fc6c95aaa561ae68476c77996abda23890054ac07166278cef
2023-10-18 22:53:22 +00:00
drh
ce51b31367
Deal with an OOM condition while processing aggregate ORDER BYs.
...
FossilOrigin-Name: b6d44427ec0184880ad14919667e2f526777c5085ffa636f6734cb5951a31225
2023-10-18 22:27:59 +00:00
drh
20b95f8d3f
Make sure all terms of the ORDER BY within an aggregate go through aggregate
...
analysis. Do not attach an aggregate ORDER BY to a window function.
FossilOrigin-Name: 16f3805514a741405f70e0ee3b5a6b67720bc75719372e82daa4136fe411ea2b
2023-10-18 22:03:48 +00:00
drh
49dc1be96f
Basic test cases.
...
FossilOrigin-Name: 6cccf86c362631ada0c6cbaf661520648f8bbf7ae2b137b3d7d959647387e5c2
2023-10-18 19:44:59 +00:00
drh
0021079ceb
Fix one minor error in order to get all legacy tests to pass.
...
FossilOrigin-Name: 5a885139c433a143302ab43dc5aaac1fed9db61548b4ff7d4b19b3a6a46c8fcc
2023-10-18 19:07:45 +00:00
drh
59a0d0bbf9
ORDER BY on aggregates seem to work, at least for simple smoke tests. Lots
...
more testing is needed though. Surely there are many bugs.
FossilOrigin-Name: 64c12a835b6f1df8f2f5f4a41de083f6b3fc7f8030042c6aac0082382cd9cc4d
2023-10-18 18:11:11 +00:00
drh
db19f48b69
Basic error checking. Resolve symbols in the aggregate ORDER BY expressions.
...
FossilOrigin-Name: c83a53a574d312130d1238c05ffa449d8bed2535d5ef5b5d9cf02f894494cca4
2023-10-18 13:58:31 +00:00
drh
f8202f1ff3
Enhance the parser so that it can accept an ORDER BY clause on a function
...
invocation. For this incremental check-in, the ORDER BY clause is currently
ignored.
FossilOrigin-Name: 3a98ff24bf468ed42d410a9a12d9f9b2ca154c7babe99fd6bc6f7b0565e0d132
2023-10-18 13:18:52 +00:00
stephan
0b4de1acac
JS: replace one errant reference to 'self' with 'globalThis' and remove a separate dead-code 'self' reference.
...
FossilOrigin-Name: da1a47932ea96755b1e11fc2547ce11780b87846af6885857318ff18f1e62c31
2023-10-17 23:35:47 +00:00
drh
43dc31cf1f
Fix a harmless compiler warning about variant types for a pointer function.
...
FossilOrigin-Name: 37ff0d8e7f91c32e8c53bb015280be47c66bf599281b640a8d3fd41335b55289
2023-10-17 19:33:52 +00:00
drh
6db4e5ed4c
Make a new branch in the SqlExec opcode reachable by tests.
...
FossilOrigin-Name: 023ad470b68b7c09e159244493a6d0285d706efdecd8719a71e6885509d4750c
2023-10-17 18:59:13 +00:00
drh
42b49a3138
Omit an unreachable branch when SQLITE_ENABLE_API_ARMOR is not defined.
...
FossilOrigin-Name: 5f8b807b568f4f9ec65f1c924e0e1ac2f996f405e045204145ad7116be7580ee
2023-10-17 18:28:27 +00:00
drh
4c827feba1
Changes to sqlite3IntFloatCompare() in an attempt to better measure
...
branch coverage in the face of aggressive compiler optimization.
FossilOrigin-Name: 5781d043ffeccda03357ee530564987443dc1deb6111a4028701b4a98fdfe16d
2023-10-17 17:53:46 +00:00