Commit Graph

26127 Commits

Author SHA1 Message Date
drh 25e87ed1ba Fix compiler warning in src-verify.c.
FossilOrigin-Name: 2d58c77448cfaaf12887b60bcfea039d3410a750ac8955a817c45be85c00eb9e
2023-06-05 17:12:33 +00:00
drh 4246a4bf14 Update the README.md file to talk about the verify-source makefile target.
FossilOrigin-Name: aa8e79e16abf028d50370ae13b6c952a7b7f42985125bc8e7f51b20a10bfc336
2023-06-05 13:57:37 +00:00
stephan dc608d8a5f Remove extraneous console trace output from previous check-in.
FossilOrigin-Name: c9f6e36d59fc8bf2bcef6fc14ff2e9ad3dfd972de94d4a71ff3f56134810a8ef
2023-06-05 11:30:50 +00:00
stephan c81dcaabe8 Add a JS test confirming that binding of statement parameters in a subquery works.
FossilOrigin-Name: 5dfaf0bce83c3e15ad605e3f07291ce219f1a2726ce77be27779897088ee13d5
2023-06-05 11:26:59 +00:00
drh 706047470e Generalize the src-verify.c utility program and provide additional documentation
in the header comment.

FossilOrigin-Name: 7ed84046ef0c2c64031cac3a3a6b43aac3ac40aeb36838d8d046493f2d5ed122
2023-06-05 01:05:46 +00:00
mistachkin 59714faa68 Minor cosmetic normalizations for the MSVC makefile.
FossilOrigin-Name: c9fda8d6dba36841415d0f445b4081b051bfaa70428b605ac0b9ca4ae98f7d49
2023-06-05 00:57:38 +00:00
drh 979715bb45 Fix harmless compiler warnings in tool/src-verify.c
FossilOrigin-Name: 0e79ee97b18792dba9213bd9961f53e2bae765ac92df7963703d08857da74fd1
2023-06-04 22:59:20 +00:00
drh 10ca116b3e Enhancement to tool/src-verify.c to also check the manifest.uuid file.
FossilOrigin-Name: a39a569482a35610fdaa2fdfc88491d8b456dfedb4786c817e0502eb3e3a5563
2023-06-04 22:56:31 +00:00
drh 63329ce6c7 Add a prototype implementation for the "verify-source" Makefile target.
FossilOrigin-Name: ed876ff6a1a6a2d555f32b96eb78d95eaf8428ee189f968c43f0829a3065bfa7
2023-06-04 22:41:52 +00:00
larrybr f1967a7018 Clarify sqlite3_is_interrupted() return. No code change.
FossilOrigin-Name: b6c2d3d203100a34335aeba23a8fb82a13297b65eed494d5044ade3bed683bc3
2023-06-02 21:31:15 +00:00
drh 038158e94a Restore the LEFT JOIN strength reduction that was partially lost in
[d747afda5683ca5f] when strength reduction was generalized to all OUTER JOINs.

FossilOrigin-Name: 2d962b84dd8ac2d0968f0283f8f082c1c2a7a1f99b59053b2ad8f58745396447
2023-06-02 18:05:54 +00:00
larrybr a3f943942c Do that last CLI fix more simply, using established means.
FossilOrigin-Name: a1823b297616bc2bd64eda9df4850fb460d8da8959ae3728195db896d1f89e7b
2023-06-02 13:31:12 +00:00
larrybr 4e8a0eb4e7 Fix CLI fault on missing -nonce reported by [forum:/info/f8c14a1134|forum post f8c14a1134].
FossilOrigin-Name: cd24178bbaad4a1dafc3848e7d74240f90030160b5c43c93e1e0e11b073c2df5
2023-06-02 12:56:32 +00:00
drh 4ffcce88ad Fix the OUTER JOIN strength reduction theorem prover's handling of the CASE
operator.

FossilOrigin-Name: 73d7b14b1713d93c4ae07995e9aa6485cbad90bd6125584dbaeccb0cc9410ea3
2023-06-02 00:03:28 +00:00
drh 179c32cb57 Generalize the LEFT JOIN strength reduction optimization so that it works for
RIGHT and FULL JOIN as well.  Rename it to the "OUTER JOIN strength reduction"
optimization.

FossilOrigin-Name: d747afda5683ca5feb92866a14ccc4c5127d3378ece5cad2c3da819f2477b457
2023-06-01 20:38:22 +00:00
drh 39a7a1a9be If the filename argument to sqlite3_load_extension() is an empty string, then
raise an error.  It turns out that if dlopen() is called with an empty
filename, it tries to load the current executable.  And then if the caller
requests some other function from the current executable, mischief can result.

FossilOrigin-Name: d01688554715eb4aaa1b1fd1a6b660b84e930edb0e062156ecf5228ee81ca754
2023-06-01 16:40:28 +00:00
drh f96148c4c6 Add an ALWAYS() on an unreachable branch.
FossilOrigin-Name: a00928d48061c1169d5564996e19e7d7c2b962842100bb119846d0f696123c23
2023-06-01 00:28:11 +00:00
drh e411b69537 Fix the LEFT JOIN strength reduction for IN operators in the WHERE clause.
Further simplifications and refinement of the algorithm.

FossilOrigin-Name: 96c72dde79d4069f6c2f81467a35b617633f86f7a7dcafbda991affdaa1f8537
2023-06-01 00:01:20 +00:00
drh d8cf688469 Add a comment to explain why both sides of an AND must be non-null-row in order
for the overall expression to be non-null-row.  No code changes.

FossilOrigin-Name: 8396032ce14a75f408f0a75bcb36a6504d5188f20886e275746a2c336a74296f
2023-05-31 18:52:46 +00:00
drh 29e70da4a4 Improved detection of when the LEFT JOIN strength reduction optimization
can be applied.

FossilOrigin-Name: f544a8e47cdd5ad7233887a558489983f4f305a39391ff463c43e2e4157da087
2023-05-31 18:35:12 +00:00
drh d3b54d624f Minor enhancement to the sqlite3_trace_v2() documentation. No code
changes.

FossilOrigin-Name: fba97230e38276f2a02fc24353c3d911dfa24f3a4f75f691de9461d4daf3ae54
2023-05-31 12:42:09 +00:00
dan d8091fe979 Fix a problem causing an infinite loop in the recovery extension when processing a corrupt free-block list.
FossilOrigin-Name: 5a516c6c7a25cec4d0a0cca530017a3299f7a332319f3e1f7cf12f53c32b88ca
2023-05-31 11:03:17 +00:00
drh 8eb9c06e65 Enhancements to date/time functions:
(1) Add support for time-shift modifiers of the form (+|-)YYYY-MM-DD HH:MM:SS.SSS
(2) Add the timediff(A,B) SQL function that returns the time-shift modifier
sufficient to move B to A.

FossilOrigin-Name: 574bf370b0b9a72eb0468e0e121d4d6171fc533883b66d335f6794ef5ee1f051
2023-05-30 16:40:42 +00:00
drh 7d65f1bec0 Simplifications to the new timediff() logic.
FossilOrigin-Name: d6954259bd3f8475f3804fd02a1591d037efa9df54da45776863c024ff90e596
2023-05-30 14:46:30 +00:00
stephan 73d806dc1f Minor tweak to the OPFS async proxy to attempt to account for a spurious high-load console error message which was reported via the sqlite-wasm npm project.
FossilOrigin-Name: a61467d1fbb7a2804bfdc685a38e0b738747b9afd42c25a78a938b114a822f61
2023-05-30 14:10:28 +00:00
stephan e32fef1400 Minor internal JS doc fix. No code changes.
FossilOrigin-Name: 68abee3c1bf4e9ff632fccaa6ac7c5c4cdf55c4ff1749830ae3bd5ff6d55ebb2
2023-05-30 13:27:57 +00:00
drh cc4bfd9623 New test cases for the timediff enhancements.
FossilOrigin-Name: f14633ce6ddf28a14b03e2da623d96e439966aa3fc30c26cb0be59c0e15b3e9c
2023-05-30 11:51:45 +00:00
drh 30bb082d3a All date/time modifiers of the form (+/-)YYYY-MM-DD without the following
HH:MM:SS.SSS.

FossilOrigin-Name: fa9237a8ab803ca3f67fe753516b7bdb98be3d625e8e241ddf9b02509210e225
2023-05-30 11:13:56 +00:00
drh 36a5f1e90c Problems fixed. All tests are passing now.
FossilOrigin-Name: cff293b0a79107def7bfe54fd60ac4a721c5098c85229d9b46a4e2c4cbf34a6a
2023-05-30 02:50:32 +00:00
drh 6abbef89e6 Improvements to the timediff() function. Test cases added. Not all test
cases are passing.

FossilOrigin-Name: 2cf6518140d61e2123dc20f39d7e97e7bce17e7641405df7fd63e1cdda444ae0
2023-05-30 02:16:33 +00:00
drh 1936a1933c New date/time modifier: (+|-)YYYY-MM-DD HH:MM(:SS.SSS)?
FossilOrigin-Name: 3832b8a9ef84d9b53b48dfce9c1e724897cd7b3e05711e01675419655f894eac
2023-05-29 20:33:33 +00:00
drh 0cbc2143b9 Prototype implementation of a proposed "timediff(X,Y)" SQL function.
FossilOrigin-Name: 054a195125a273bab026ada5f07cc7c32818007027a1fd028ca59d2f179276d4
2023-05-29 18:01:42 +00:00
drh 4308b88dcd Fix an issue with sqldiff reported by
[forum:/info/9bd2155bdfae25a7|forum post 9bd2155bdfae25a7].

FossilOrigin-Name: 736a79c1491065f4ee77ce644af0e529e555ca733c78dbd55487d55d4ddbe5bd
2023-05-27 20:08:23 +00:00
dan 870fe69c72 Add extra tests for fts5, large rowids and "ORDER BY rowid DESC". No changes to code.
FossilOrigin-Name: b5b5eaeed3ef55415e27aa04561ab446f3be881b56b7cbf9b8ba3307f0b2bf69
2023-05-27 19:34:46 +00:00
stephan 39bd6a0d46 Add ability for the JS Worker1.exec() API to report the number of changes made to the caller, per request in [forum:d0b19483642e20dd | forum post d0b19483642e20dd].
FossilOrigin-Name: 6e79505df915612b60696e4eec5c9973175fe6ecf273eb3152b996e63ae54a07
2023-05-25 16:49:06 +00:00
stephan 4e8e33ba84 Minor cleanups in demo JS code, per forum feedback.
FossilOrigin-Name: 80c7c0360c08bea0733deccb8071920c60558b75df76b6afad093c82adf30ea6
2023-05-23 19:11:42 +00:00
dan 583a5cf5d2 Avoid performing aggregate processing more than once for a single expression. [forum:/info/36ff78b2a3|Forum post 36ff78b2a3].
FossilOrigin-Name: 367b4cc549a14222d54530538e692e9d1a365002c1b8c4ef80ddc0523bfdb3a2
2023-05-23 17:35:18 +00:00
drh ddf6b27579 When converting an aggregate expression to AGG_COLUMN, be sure to remove
the EP_Unlikely flag if it is present.
[forum:/info/fbfe330a2009d036|Forum post fbfe330a2009d036].

FossilOrigin-Name: 48e65f18b2ebbe786e84e208f2c6c68de6067ba86912fea5a120fd41d0af2184
2023-05-23 15:16:20 +00:00
dan 3195b88b79 Fix a buffer overread in the recovery extension that might occur on 32-bit platforms.
FossilOrigin-Name: ff4a9a2b59657116da99c748ada19dbc64b7d0fd4c920e1c517d8bda3466f06b
2023-05-23 14:05:02 +00:00
dan 9d31508a54 Add test cases for the recovery extension. No changes to code.
FossilOrigin-Name: cec49c7d93362f527f0b4744cd1ae95d44a79671d49d69baa77fda70be29f7e8
2023-05-23 11:47:56 +00:00
larrybr d294792d1a Avoid duplicate WIN32_LEAN_AND_MEAN #define. Fix a trivial nit likely never observed.
FossilOrigin-Name: 81ffcf41d69ae73ee8c037f675e18e2b46a15bee34062914640456381262d6fc
2023-05-22 20:36:55 +00:00
drh 0503cd6d11 When a floating-point RTREE is presented with large integer constraints -
integers that are too big to be represented exactly by a float - then take
extra steps to ensure that all possibly relevant entries in the RTREE are
returned, even in boundary cases.  Fix for the problem identified by
[forum:/forumpost/da70ee0d0d|forum post da70ee0d0d].

FossilOrigin-Name: bfd8d9100015f3e3fb011698963d670bd89b64ec8a8ab931e0c6c3076b029377
2023-05-22 16:35:21 +00:00
dan b838a229be Fix a buffer overrun that could occur in fts5 when processing corrupt records.
FossilOrigin-Name: 4891dbd938f4bfd345eaef01f2addea9512eaa98f860844c73abb907b6a8e0e8
2023-05-22 11:02:15 +00:00
stephan a6ab50bc42 Extend detection of the INSERT...RETURNING locking case to the DB.selectValue(s)/selectArray/selectObject() family of functions. Add tests for INSERT/UPDATE...RETURNING with those functions.
FossilOrigin-Name: 3181c50540df0eff6cb5db79bb477c469bb7b73b0692260ba600db200fcef4ac
2023-05-19 18:23:53 +00:00
stephan 02be13cea6 Minor doc typo fix.
FossilOrigin-Name: 4533be08786306a4fcb4b21458444dffd0fa2764ebb2538313f3a16d9324cacc
2023-05-19 17:59:21 +00:00
stephan a382d236da oo1.Stmt.finalize() no longer throws, but instead returns the same as the C API. oo1.DB.exec() now triggers the INSERT...RETURNING locking failure as an exception via reset() instead of finalize(). Some code-adjacent internal API renaming for clarity's sake.
FossilOrigin-Name: 4ee6b3aa531b980acea4c4b58ee256e765c5105100468928def3d4c9825fa9bc
2023-05-19 17:50:16 +00:00
drh fe19414331 Improved documentation for sqlite3_reset(), in response to
[forum:/forumpost/a72bab3dea|forum post a72bab3dea].

FossilOrigin-Name: 1dfeb3dceee8f30daf5462683f264b9de23e7068e036e70b11ee1b608ac2f7fa
2023-05-19 16:42:49 +00:00
stephan 7fe416fae1 sqlite3.oo1.Stmt.reset() now throws if sqlite3_reset() returns non-zero, analog to [f23eb5c6d365].
FossilOrigin-Name: 487ae12c9a21e5862bd590bbb1030c39734657d52136cf67b98c7545e6ecbe1c
2023-05-19 16:34:56 +00:00
stephan 416aeb16ee Add a basic INSERT RETURNING test for the oo1.DB.exec() API.
FossilOrigin-Name: d29d62cf7658aeb49f3c8a5d0b0809d945ebc9b79379a255eb88f771d2a2c430
2023-05-19 16:12:06 +00:00
stephan 2492b6c0fb sqlite3.oo1.Stmt.finalize() now throws if sqlite3_finalize() returns non-zero. This is intended to address the INSERT RETURNING case covered in [forum:36f7a2e7494897df|forum post 36f7a2e7494897df].
FossilOrigin-Name: f23eb5c6d36546ee1e181a03660e0b2dc8005bba24bee8bae594b0c78bd152cd
2023-05-19 15:54:41 +00:00