Commit Graph

26250 Commits

Author SHA1 Message Date
drh
6bbc5b3730 Enhance fuzzcheck so that it understand the sqlite3_db_config() and
optimization settings from unused bits in the database header, which
dbsqlfuzz is now using.

FossilOrigin-Name: 918708c6dea5bffab4bb1c15d655ac7356bae97b84def905479dfcf491db6c5f
2023-06-10 10:37:49 +00:00
drh
7520116441 Simplify a memcpy() in defragmentPage(). It now might copy more content than
is strictly necessary, but runs faster and uses less code space.  Possible
reasons for the improved performance:
(1) the copy is now always 8-byte aligned,
(2) fewer intermediate results are required which means less register
pressure which helps the compiler to optimize the subroutine.

FossilOrigin-Name: 6e5607ae4d872954483a8d7a5c866aa41e4af70fae9652fb7eb211b316ab724d
2023-06-09 15:54:18 +00:00
dan
6e4ff8707e Remove SQLITE_EXTENSION_INIT macros from dbdata.c.
FossilOrigin-Name: 106ec745766ac59131f975d5ab5487c8a24b9c3be1766411c018b42c6ae4672a
2023-06-08 20:49:25 +00:00
drh
2f764eb4f4 Improvements to the src-verify.c utility program so that it continues to
muddle through a corrupt manifest file, making the most sense of it that it
can and reporting "manifest" has having changed at the end.

FossilOrigin-Name: 157b5d25e0c99eabfa3c32cb867fe7e3c05031c12354f734d2cd8a4062b9439c
2023-06-08 16:19:21 +00:00
drh
8efe749ab3 Fix the amagamation generator so that it works one a clean source tree.
FossilOrigin-Name: f502610d03a1362eea936129abd03390835b7e47ba25e6799b2e7880de540640
2023-06-08 15:30:10 +00:00
drh
fd5d18045a Include source provenance in the header comment of the amalgamation.
FossilOrigin-Name: e3eb5af9050aae1db6887d17a560a24e4ca58f232ad7ac7c283c861ea4944f0b
2023-06-08 15:27:35 +00:00
drh
4fa5952090 Enhance Lemon so that it remembers which -D command-line options are actually
used in the grammar and includes a list of all such options in the header
of the generated output file.

FossilOrigin-Name: c47a4dbd24b8277c57b7a83a8c0aeac2bc8f6ab75d1b65ba5e1fa83d1868d95f
2023-06-08 12:52:28 +00:00
larrybr
4eda84a456 Add spell-checking for all comments in main sources. (./src/ .c .h .in) make target "misspell" tells of misspelled words for which no exceptions have been put into tool/custom.txt .
FossilOrigin-Name: 5332abf0ad8ef42c44e9dd7045d017bb8fc9a0262a89ababa3e2c41788a6cdb8
2023-06-07 23:10:40 +00:00
larrybr
55be21647e Fix straggler misspellings and tidy the custom dictionary. Also include pickups from [forum:/info/c61fb09afd|forum post c61fb09afd].
FossilOrigin-Name: 8c291d99946eb32b20b743921202f9c7cfb716268ff526817b27adbb7942e40b
2023-06-07 17:03:22 +00:00
drh
c5a5a54c51 Remove additional traces of FTS1 and FTS2 that were missed by [2bb50d5aedef0fd2]
FossilOrigin-Name: 9a12bac5d24c7a8364d2127fd12c3409a53ef83e408d10f344ddd311cdba98af
2023-06-07 15:00:54 +00:00
drh
1d7c88bf98 Remove unused, legacy shell script "mkso.sh" from the root of the repo.
FossilOrigin-Name: 57f75e48690bdeb9b6bb3f46eee39021e3eb8cc0c488d2584177baa11ac984e5
2023-06-07 14:47:29 +00:00
larrybr
bc91738e66 Add a C-source spell-checking facility. make misspell (on Nix)
FossilOrigin-Name: 26c1bb4bd9e9f56613c3aa87407a7f562fd4ebde5bfd6dece02078001d9a45f8
2023-06-07 08:40:31 +00:00
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
drh
b3d7f1c2db Prototype implementation of the octet_length() SQL function.
FossilOrigin-Name: 2db989c8635f7e89b3ea58d1fde94787fced039ac1a118d9b6362811eda73f87
2023-06-03 11:22:30 +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