stephan
916fc1129c
Macro tweaks to get SQLITE_OMIT_WAL building. Remove some nearby stray EOL whitespace.
...
FossilOrigin-Name: c31a944680f18a799c763238dbb0561f8b039905ce442533258905219b33b743
2025-10-30 18:38:14 +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
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
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
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
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
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
drh
0b8e4294d5
Use a separate mutex (SQLITE_MUTEX_STATIC_VFS2) for the VxWorks file list
...
in os_unix.c.
FossilOrigin-Name: 8f45f1a9d9208fbf124c4087092718b83cd653126bc1ed5f388e3577561f615b
2025-09-10 18:34:09 +00:00
drh
e7f190b8e1
If open files in VxWorks, do not unlink the file unless the file was marked
...
as delete-on-close.
FossilOrigin-Name: bb6114dbbf3bfbea57cd9be21666299663e94576b0175f6aeefd1d0f7107398e
2025-09-09 19:00:55 +00:00
drh
130a2f52b1
Do not allow attempts to open files in VxWorks unless the full pathname is
...
provided.
FossilOrigin-Name: 4720205249214c01f6e63738e4927c0f53c853346cc2dfa45522aaa469f4d702
2025-09-09 17:39:28 +00:00
drh
4edee00ee0
Fix a potential memory leak in the VxWorks VFS that can occur following
...
an OOM or I/O error during xOpen().
FossilOrigin-Name: cb880145d899832cca0612b89024a54d188ed706600fa812ea74587d69c261be
2025-09-08 19:56:14 +00:00
drh
91020438c0
In VxWorks, temporary filenames must be full absolute pathnames in order for
...
vxworksFindFileId() to work.
FossilOrigin-Name: 1fc94becc5971812c3a91fb1410cb54f6ecb9e50da2d30863dc840cbf4e6c1f5
2025-09-08 18:45:58 +00:00
dan
f942995fd2
Ensure POSIX builds work as expected (no extra usleep() calls) if SQLITE_ENABLE_SETLK_TIMEOUT is defined.
...
FossilOrigin-Name: f04a826bac1620b28c32252fa2ceaccc5dfbb21405a6a98942f95d3d1ca89acb
2025-08-29 15:56:38 +00:00
stephan
4a27581f14
In builds without HAVE_FCHMOD (e.g. WASI), make the chmod() of temp files a no-op, analog to how lack of HAVE_FCHOWN is handled, as discussed in [forum:98d5158d3fdd7a41 | forum post 98d5158d3f].
...
FossilOrigin-Name: 7d13e8e403ba00d37b950caa359d74452319247495284d252efa6473bad15b64
2025-08-20 09:43:15 +00:00
drh
eff534e1a5
Back out a recently added NEVER().
...
FossilOrigin-Name: 4fcdd5bdb061d550b4a35594eb16c9a1699c76caf1d906f1781b4f9cb29ac80c
2025-08-05 00:16:40 +00:00
drh
cd552cf99f
Tag a condition in os_unix.c as unreachable.
...
FossilOrigin-Name: 151844ad5451295104f18f4823d2fdaf041f22bc09099f1fa3f90898aafa7ea5
2025-08-02 17:37:59 +00:00
drh
1e687a4187
On MacOS, when increasing the size of files on FAT filesystems from 0 to
...
1 byte in order to preserve their inode numbers, be sure to fsync() the file.
FossilOrigin-Name: 727efa8559852012cf3381baf5fcb1da198ff27d8856ce7b813920b99367dee5
2025-07-31 09:45:20 +00:00
dan
420233e375
Fix assert() statements in os_unix.c and os_win.c. Allow walsetlk_recover.test to run in non-SQLITE_ENABLE_SNAPSHOT builds.
...
FossilOrigin-Name: 9f521ecda2b8d2f383cc84e308b3a4adfcf1bd6339eb834c8fa76c8704c861b7
2025-05-31 15:10:41 +00:00
dan
ded1959120
If blocking locks are enabled, avoid using the busy handler when blocked by another process running recovery.
...
FossilOrigin-Name: a35236757ab57c4c9b34e47c5dbc10d8f1220f8152955f5303cf9c3902ee169b
2025-05-30 20:52:18 +00:00
stephan
5d60f47001
Approximately 50 typo fixes, spanning the whole tree, contributed via [forum:006c8fa165083ac3|forum post 006c8fa165083ac3] and individually checked for correctness. Affects only code comments, docs, and a single line of debug output in a test app.
...
FossilOrigin-Name: af928818a030924060ee0762431dae0f16d53a62f4e1132754d052eb9c621ac2
2025-02-25 20:55:14 +00:00
dan
833dd3daff
Fix "unused variable" warnings in os_unix.c and os_win.c.
...
FossilOrigin-Name: 8e809632ba3bb20b7ec23ce9e6ca659c57cf1338b1fe8c33502c5f3161061dd2
2025-02-11 18:29:35 +00:00
dan
138951dc2e
Merge latest changes from trunk into this branch.
...
FossilOrigin-Name: e5ec5bb9f4dc3e02db7ab0e49686f47617af75d3f7d4ab23288a1aea4a693e59
2025-02-11 17:10:46 +00:00
dan
2d87894700
Experimental change to allow clients to block when taking a SHARED lock to connect to a wal mode database.
...
FossilOrigin-Name: d2d6a000fb9bf8097e0ce9979685408d183be3ab785ceeb11ec1f97a81a83e41
2025-02-10 20:46:14 +00:00
dan
462888819e
Have sqlite3_enable_setlk(-1) configure indefinite blocking locks where they are supported.
...
FossilOrigin-Name: 62009565d2f2a2c4d347e1da0d5b4ad43056742df47fd6ddb92e62f53a2b57f1
2025-01-30 15:26:16 +00:00
drh
c69d537b93
Remove an assert() in the unix file locking logic that is not true
...
if alternative VFS "unix-excl" is used for a read-only connection.
FossilOrigin-Name: bd5dc92368e41231a07bb59dd3db8942e238129ec7a3c8d785459d9b62bfcba3
2025-01-20 19:19:31 +00:00
dan
23498de7be
Back out minor changes not required by this branch.
...
FossilOrigin-Name: 68c34ffd2332d89cb6400bce5dad350a6e48c395924b8380cbeb0dbe64141808
2024-12-03 19:41:41 +00:00
dan
6bd3faa092
Supports SQLITE_ENABLE_SETLK_TIMEOUT on windows. Does not work properly yet.
...
FossilOrigin-Name: 737ca8a9fb9dc74b28f2186d93c5101463497445d0fabba3def61fee29abf2c8
2024-11-22 21:24:08 +00:00
drh
1b37bc0e66
Add the SQLITE_FCNTL_NULL_IO file-control.
...
FossilOrigin-Name: f0e917fcf51b59f8ccfe5b9341937341d0e6016eb275d6c33dcb10b0b301a9da
2024-11-13 14:58:35 +00:00
stephan
710d00aa6f
Change a (#define HAVE_FCHMOD) to (#define HAVE_FCHMOD 1) per user request in [forum:24cf6020c6|forum post 24cf6020c6]. There's no semantic change for this tree, but this is consistent with how auto-config tools would define it and the empty #define interferes with some downstream code.
...
FossilOrigin-Name: 9c46d84f3bf2f5876211b498104067d32a4000979fad1345deb1000c23716d75
2024-11-05 02:38:32 +00:00
drh
96501c89d5
Rename to SQLITE_IOCAP_SUBPAGE_READ.
...
FossilOrigin-Name: dd446ef1816f4e95ce29de0b3841dd0a6c983646fd2dd271c2db8f3263478164
2024-10-22 18:26:03 +00:00
drh
c8284c766a
Add the SQLITE_IOCAP_BYPASS device characteristic. Do not allow the
...
SQLITE_DIRECT_OVERFLOW_READ optimization if that capability is missing.
FossilOrigin-Name: f50ae00ce9ff572e6bd5e2788602ba356383526ab7289622a32fbf52926c6df0
2024-10-22 18:00:26 +00:00
drh
87cb97b0ec
Fix harmless compiler warning in flockCheckReservedLock().
...
FossilOrigin-Name: f369de3d8fa34a403b5c9f6269f7e3fdb16a13784a70460c5032ad4e66615d64
2024-10-15 22:22:53 +00:00
dan
48dd75df73
Fix the xCheckReservedLock() method of the flock VFS to avoid dropping the file-lock.
...
FossilOrigin-Name: 8ffaf85249ff38ceea037a6e96b3484c912f1c1aa55b8642297d592768661344
2024-10-09 15:40:07 +00:00
stephan
2c77d51dfe
Resolve a harmless compiler warning in QNX builds.
...
FossilOrigin-Name: 2916460179c6089375188c6e4e3cff1fca5bbbbb7280a10c919e09e75d1f11f8
2024-09-26 18:13:10 +00:00
drh
901b671455
Automatically disable directory fsync when compiling for AIX.
...
FossilOrigin-Name: 8d170e07e20c21a5bb97fdc8c2d01d92178f5fe740e60d203e4621747cfce33e
2024-08-18 09:53:37 +00:00
dan
41caf1cdfa
Handle the case where unix-dotfile is used with URI parameter nolock=1.
...
FossilOrigin-Name: 3925a5b904e159d54455cfc73fe837a9c6ea3a6d60da63afde3242b4d6f67c90
2024-06-11 20:28:56 +00:00
dan
f6ec2b5946
Fix a problem with rolling back hot journals using the unix-dotfile VFS.
...
FossilOrigin-Name: 4ae3300b79e03381fd7f1033bb7978bb6367369790f17c3bdacac51e205edaf9
2024-06-11 20:03:32 +00:00
stephan
e1b55a5af9
Modify three #if checks in os_unix.c to improve handling of SQLITE_OMIT_WAL on WASI builds. Based on the discussion in/around [forum:57e918431735128a|forum post 57e918431735128a].
...
FossilOrigin-Name: 296eeb26c816bc734530cf446922f25be970b901c884df1a98083502f0d1e9f5
2024-06-03 07:22:28 +00:00
dan
af64a22762
Have os_unix.c reuse cached file-descriptors in the case when a read-write fd is requested on a read-only file and a read-only fd returned.
...
FossilOrigin-Name: a678e85402af08c1e387bf30ff2205f84dd7da749755da565d70f831c007a3d9
2024-03-21 11:37:36 +00:00