Commit Graph

30637 Commits

Author SHA1 Message Date
stephan 74cd3c53f9 Typo fixes in LICENSE.md from BrickViking.
FossilOrigin-Name: 26ddec291696dd99c7f84a21b2dd272ce9bf32598ca38413ac89432d45527f8d
2025-10-28 19:57:15 +00:00
drh ffbfc27fab Fix an signed integer overflow problem that can occur when using an oversize
value for the SQLITE_MAX_LENGTH compile-time option together with
multi-gigabyte operands to the OP_Concat operator.

FossilOrigin-Name: 724f2299f206cc9e7f830f984c50a8fc4ac1c17210d71d9affe657b45252b060
2025-10-28 13:24:50 +00:00
drh 5a9ada593f Add enhanced resistance to corruption after posix advisory locks on the
database file been unintentionally broken on unix by running
close(open(DBFILE)) from a separate thread.

FossilOrigin-Name: 6385a1962c69c69ca4775888f034a4eb892aa013689c000f3de6422da7c3c695
2025-10-28 10:50:55 +00:00
drh 9c0770537f Enhance the CLI so that it can handle inputs larger than 2 billion lines.
FossilOrigin-Name: 5daebf2d6013e73d89c9feb796e15b67c39577e5a9e9c86fa260995f4118f04b
2025-10-28 10:44:26 +00:00
drh 6cc222c3be Additional comments explaining what unixIsSharingShmNode() does. No
changes to code.

FossilOrigin-Name: 819fc87385fd5be8a847492478f4c4f247f64edf7c7161b641bfbac6b658bec5
2025-10-28 01:28:20 +00:00
drh db0d47b749 Omit unnecessary branches from the unixIsSharingShmNode() implementation.
FossilOrigin-Name: 2d5623bc27073c407ec63e401f095d12f0025dd276a0bdc26d8b94b1f13c9a36
2025-10-27 23:57:57 +00:00
drh e34f35c833 The unixIsSharingShmNode() function should always return false for the
unix-excl VFS.

FossilOrigin-Name: 770f35dae47a98554b18f8a7aa9f6b6e39ae2b3aa8dce8d75b5bed0c6f0f9c21
2025-10-27 15:44:16 +00:00
drh 626351d444 Implement an experimental defensive measure to try to prevent the -wal and
-shm files of an active WAL-mode database connection from being deleted out
from under the database connection in the case where the database SHARED
lock has been released by an accidental call to close() in a different
thread, or similar.

FossilOrigin-Name: ed1b9206640f66cb8abff444809ccab8a4a5157b5c90e9aacddc422210e63423
2025-10-27 14:24:02 +00:00
dan 6e27846323 Fix a minor over-allocation of heap memory in wal.c.
FossilOrigin-Name: 1803cb9bb6a13fb66956f729066b6eae64c3a1c0715102fb1a9994e395c12ba9
2025-10-27 11:39:07 +00:00
dan 8ce786f173 Fix sanitizer complaints in the regexp extension.
FossilOrigin-Name: 6ff9ecb89d769bc2a27f8a57130f28ec7478979d3e35ba765c16017b5bdf775d
2025-10-27 11:20:47 +00:00
stephan 6b9230d2a1 Merge the OPFS/SEE tests into trunk (where they should have been committed).
FossilOrigin-Name: f8a4d7abf0d1c9c92fa102165d08aed76fd766d49615e3d347b5547580355574
2025-10-26 21:58:41 +00:00
stephan d4ead9b9e4 A better/cleaner fix for [1c80ff88c0ce].
FossilOrigin-Name: 6138043bdde09224a764b5d5f18a9e2776c761c424f41b0d69427d92d47ec41c
2025-10-26 18:36:57 +00:00
stephan f57d368078 c-pp-lite: Fix another newline-related off-by-one which could cause newlines to get lost in @token@ filtering. Problem found in out-of-tree testing.
FossilOrigin-Name: 1c80ff88c0ce3d1c168c9bda734cf52114c35efdcf46a6da78f0ed9adc794eb8
2025-10-26 17:59:30 +00:00
stephan 3fceae3b95 Doc typo fix reported in the forum. No code changes.
FossilOrigin-Name: 6e065b6aa099f31493cfea22a729f92bb312147d8584f663fb75630a25772e43
2025-10-26 12:34:13 +00:00
drh 38113d392d Add the SQLITE_FCNTL_FILESTAT file control and the sqlite_filestat() SQL
function.

FossilOrigin-Name: 9870afcb2a360dff83e211009710bc85db238d9a6993afcc1eb38ca7699fb4a5
2025-10-25 22:22:58 +00:00
drh a105989856 Rename the file control to SQLITE_FCNTL_FILESTAT. Rename the SQL function
to sqlite_filestat().  Rename the enable macro to SQLITE_ENABLE_FILESTAT.

FossilOrigin-Name: ee797fec4eeace78caa2c5e463108bf1a6568db7c33d94d9fe6624cfc6b0d4fe
2025-10-25 20:46:09 +00:00
drh ecbeefecd0 Fix a bug in sqlite_file_info() output: It was showing the "pal" for
the main file descriptor when traversing other unused file descriptors
for the same inode.

FossilOrigin-Name: 3c4020d76e29c39483f6b92857ea470245afcd514870c63bd3373e0e213cd355
2025-10-25 19:51:16 +00:00
drh 2b24d8957e New --normal option for the ".open" command in the CLI. Also, when opening
the database for deduceDatabaseType(), use the same open-flags that will
be used subsequently for the official open, to avoid creating unusable
file descriptors that need to be held until all database instances close.

FossilOrigin-Name: 5e20a0435b1bd84d90c9a419219afe794fdf8ea73213f4c7ae5612c0375bed55
2025-10-25 19:36:12 +00:00
drh 726e836108 Add additional information about unix file descriptors to the same database file
in the sqlite_file_info() output.

FossilOrigin-Name: 64045f0a4d71ef068d64f2f25799cf1ae79c3cdb94039c73f1066290e3dbc943
2025-10-25 19:26:16 +00:00
drh 7be565f0cc Adjust unixPosixAdvisorLocks() to use redirectable system calls so that
it can be tested.

FossilOrigin-Name: eafe88b782875cd839fc27da509830e3e1d95781c686e27242a2844910203a42
2025-10-25 18:40:18 +00:00
drh c053b57716 Merge the CLI deduceDatabaseType fix from trunk.
FossilOrigin-Name: 82f907016ee75ca288d8ac0664d5c147fbfad42c5f8222211acc3220bd0eb609
2025-10-25 18:36:14 +00:00
drh 0d859b4828 Fix the CLI so that it does not try to open what might be an SQLite
database using open() in the deduceDatabaseType() routine, as this can
lead to broken posix advisory locks.

FossilOrigin-Name: 2a3a02715fa53673531575fa13aee056711139b409367cccc18654e82720c4e6
2025-10-25 18:35:29 +00:00
drh ab29c24dc3 Additional information about the unixShm shown.
FossilOrigin-Name: 85846c7fbeeaf5fccfcbe11a4b87c4ee49781456ccb4da1d090b7823d7b456d6
2025-10-25 14:06:36 +00:00
drh dcc07d3ca6 Do not attempt to show posix-advisory-locking status on journal files.
FossilOrigin-Name: 7f8baf64bb722d7dfdfca22d4f11a72113d5ed2b36d6cc6020fb0acf8185b3e7
2025-10-25 13:55:49 +00:00
drh 234c6c4bf0 The sqlite_file_info() function should always return JSON, unless there
is an OOM.

FossilOrigin-Name: 65aed79c29bf1aac0934475c02b358b916f413b20d2475ec7b631011f21f4e2b
2025-10-25 13:16:41 +00:00
drh 86319b841a New symbolic representation of posix advisory locking information
FossilOrigin-Name: b7d991ae04da1d6731b67fbdca65df996ec1c14a9530880fb7dbeeaef2575d14
2025-10-25 12:53:03 +00:00
drh f4e66056ac Merge trunk enhancements into the file-info branch.
FossilOrigin-Name: 73e1e081e9f7fc0ece98222669d13abde16197f0befc3343246a9e7da7856f02
2025-10-25 11:47:04 +00:00
drh 76db3a6e66 Stricter assert() statements on unixShmSystemLock().
FossilOrigin-Name: ed01ed337c04cce4cdbb6e80628b6f716d537e072b80067bd2bd6c5d18a1454f
2025-10-25 11:37:54 +00:00
drh 003737d1dc Improvements to the design of the /proc lock analysis.
FossilOrigin-Name: f2809dd3b266c0a6a6eb4ed62812a907493fb4006d26f8905df7ff2b1ca01a5e
2025-10-24 23:12:33 +00:00
stephan be4d0c2e2f Make it particularly clear in the wasm build output that unsupported builds are exactly that. Cosmetic tweak only, no functional changes.
FossilOrigin-Name: 86f53a2eb37d8ec98bc9d4c6b00253cc00d798e79c7d409e65d608354a556e19
2025-10-24 20:29:12 +00:00
drh aeb886bc53 Easier to read /proc lock interpretation.
FossilOrigin-Name: d7bcc54beb6463501c0559333455bd2a378798b58cb48f35590e9026d07acd2f
2025-10-24 20:26:13 +00:00
drh 2f9311c5cb Flesh out the sqlite_file_info() function further, and in particular
show locks based in /proc/PID/fdinfo/FD, when that information is
available.

FossilOrigin-Name: ce75111cced8a03f05cf47ef809b9f017f2dac3c64c6008d595f28dbfec32057
2025-10-24 20:04:16 +00:00
drh 093b26e8e0 New diagnostic SQL function "sqlite_file_info()" and its associated
file-control SQLITE_FCNTL_GET_INFO.

FossilOrigin-Name: 56ab9692583d5b64e1ab727e08a01c0a65b4e318b455c94397663ef8d3d7b6b8
2025-10-24 17:42:03 +00:00
stephan 63ee854264 Fix a duplicate SQLITE_API on sqlite3_carray_bind(), as reported in [forum:7499e8a19edc8908|forum post 7499e8a19e].
FossilOrigin-Name: 62917cd4297e734477d3201481548ddb7f79ec977b9da7d9313bc7f1c0091187
2025-10-24 17:16:00 +00:00
stephan 3ba506d9cc ext/wasm: dependencies fix for parallel builds attempted immediately after a distclean. Add version-info to the distclean rules.
FossilOrigin-Name: b99233fe3d901714c4369ba25c510050fb7a8a85c1168780108595e9639a6d15
2025-10-24 16:39:58 +00:00
stephan 67fa337744 ext/wasm/GNUmakefile: (A) When using a custom sqlite3.c, use sqlite3.h from the same directory instead of the top of this tree. (B) Re-add preprocessor flags for SEE which were misplaced during recent build refactoring.
FossilOrigin-Name: 1b1e530a9149ce62d3d53f5c558e358d4e6d1b00e0cce8bb04cb6b13d1841538
2025-10-24 16:25:23 +00:00
drh 033dbac510 Fix [4e713558f6c6ea3d] so that it supports separate builds of rtree.
FossilOrigin-Name: d030e955d703772e1637ef2c07d29816fc869ead0a15a85ec8b4633e5ca08e0a
2025-10-24 16:01:55 +00:00
stephan 9af334f54a Document minor discrepancies in how sqlite3_bind_pointer() and sqlite3_carray_bind() react to the SQLITE_TRANSIENT and SQLITE_STATIC finalizers.
FossilOrigin-Name: b92478c389a9ff57302c021444ced09aef067ab55394dcda38cde97a3f2628d4
2025-10-24 15:18:13 +00:00
stephan 4bb53ab2e4 Make explicit that sqlite3_bind_pointer() and sqlite3_carray_bind() call the provided destructor even if those routines fail, per [forum:6d81b10952|forum feedback].
FossilOrigin-Name: 1fcb0b60798c708fec53d9d69a65cca2e37a9af7a5fa654c7b2bba97056cd461
2025-10-24 14:30:42 +00:00
drh 7adc9a5978 Update the MSVC makefile for the amalgamation distribution.
FossilOrigin-Name: 440ce1cff2b7519912fec87f440894592e901d730bf74cf99479e7b1d047bf02
2025-10-24 13:23:43 +00:00
drh acdda1075d Enhance the tokenizer so that it is able to deal with individual tokens
larger than 2GiB.

FossilOrigin-Name: 4e713558f6c6ea3dfbc97d2eb0a328955ef6ad6f2ad05517efe9ed4a60181440
2025-10-24 13:18:31 +00:00
drh bc2691d5c1 In the CLI, improved error messages on input errors. Limit the size of a
single SQL statement to a little more than 2GB.

FossilOrigin-Name: 0b50e7e10aae3d57f1cbd38d02be50cfbd2d5148ab4a9be712afd8678787b7bd
2025-10-24 12:32:32 +00:00
drh 95c188d557 Limit the size of --hexdb files in the CLI to 2 billion lines, to avoid
overflowing the line number counter.

FossilOrigin-Name: 2adfd0f47b028b8378e6cc08dc22abf1606036bbd285a7bc3a0de0eaf6feeb8f
2025-10-24 09:24:56 +00:00
drh 4043096408 Additional defenses against over-sized inputs in the (unused) amatch.c
demonstration code.

FossilOrigin-Name: b9f6ae0767ce5d9cbc6fca6d63c929f919473fa669e50a0a460627e5fde2628c
2025-10-23 14:05:58 +00:00
drh d06a0be514 Fix a faulty error message in the ext/misc/fileio.c extension.
FossilOrigin-Name: 1fdef271cd15d0960a7933253a10f288e26771cdcf34b5cd22adbc49d6341bc5
2025-10-23 13:10:34 +00:00
drh 984e446891 Adjust some of the markdown in the LICENSE.md file so that it will hopefully
work better on GitHub.

FossilOrigin-Name: 773f9d3dcf1ac7a9ce7f0911f46301f3e0e01d699f73a264cab692299a8d615e
2025-10-22 00:38:28 +00:00
stephan 774ce0ba43 Back out [b144f875d6bddce6] and remove the former check for strchrnul() from the configure script.
FossilOrigin-Name: f4e059b2243c6db37b4dd201b03f0c1916baec5e9e1a660815fcd7eeaf530367
2025-10-21 16:15:53 +00:00
drh d41f5ef7e6 Reduce the maximum size of LIKE and GLOB patterns in the ossfuzz.c test
module to avoid false-positive infinite loop reports from OSS-Fuzz based
on long and complex fuzzer-generated LIKE/GLOB patterns that are not actually
infinite loops, but which do take a long time to resolve.

FossilOrigin-Name: 53edea286b0a38f4f9c7017276f3a826037919144d517f8c89ef0f35b65af5f1
2025-10-19 17:30:07 +00:00
drh efe8ae567c Use 64-bit memory allocations everywhere in the expert extension.
FossilOrigin-Name: 6caf793b8f406f5089e3811591bc69384646df16ee18d63bd63760eaaa95d122
2025-10-18 11:19:02 +00:00
drh 21c57abc53 Increase the range of integer indexes in the the merge() family of
SQL functions.

FossilOrigin-Name: 8d3943890ef3b533df35c4784c2a42c52503a4d9c3dbe67241510d8b70669b48
2025-10-18 11:04:03 +00:00