1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-04-20 08:47:46 +03:00

551 Commits

Author SHA1 Message Date
jan.nijtmans
eb2644024a Merge trunk. Some additional test-fixes for Cygwin
FossilOrigin-Name: b36adadfa202fb8951149561471c3e01085d31e1837c99806f308f234cd24a8e
2025-03-27 14:13:12 +00:00
drh
a6f6fa8675 On winOpen(), redo the read-only test on every retry attempt. Just
don't retry the winAccess() call.

FossilOrigin-Name: ccdd67ad9a508530ccfcec582410768c24bca4eb8b05939577fb99a50dd44b15
2025-03-26 17:05:29 +00:00
drh
4a6de7ff7c Further attempted improvements at fast-fail for an inaccessible
database file.

FossilOrigin-Name: cdeb21a312d4f1a9e3009a0baf0af33857c172f7bc22bca047dcd46a03e9c964
2025-03-26 15:51:05 +00:00
drh
517a0e04d1 Attempt to reduce the amount of retry time when trying to open
an inaccessible database file on Windows.  See
[forum:/forumpost/e7991420f54dca50|forum thread e7991420f5]

FossilOrigin-Name: 986e45912cde7cb8e6db8ba7a9364aef7187a23032be64ef6cd573163f56676d
2025-03-26 14:45:15 +00:00
stephan
42e5ceb093 Reimplement pathname conversion on Cygwin. MSC test passes/failures are on par with trunk and 'make test' running on cygwin is down to a single failure.
FossilOrigin-Name: 57a4de09149663ac001848773c9dffe53e30f9263e4dacc792a0267401147d25
2025-03-10 15:15:13 +00:00
stephan
7b9407af90 os_win.c patches for Cygwin (described in the cygwin-fixes branch wiki page). Makefile.msc's test target on trunk fails the same 13 tests as this branch.
FossilOrigin-Name: 655c60d1926adb552d37441bf9857263eae92e3806a8524e8443b81fdfd8c258
2025-03-07 06:54:04 +00:00
dan
f037440bfe Support SQLITE_ENABLE_SETLK_TIMEOUT on windows.
FossilOrigin-Name: e88212b10a7829ff42ef51a02863d788c929e54161faf492f9ef2ad90fd7074e
2025-02-24 21:27:16 +00:00
dan
b081a391ce Merge latest changes from trunk into this branch.
FossilOrigin-Name: 55324d1c862c42b95251a398c40930d9fa94debb1aec7d3d0ae734d6b17b4a59
2025-02-24 10:52:34 +00:00
drh
ef86b942b9 Code changes that make it easier to prove that no 32-bit integer overflows
happen during memory allocation.  No problems fixed; this change is just
to make future maintenance easier.

FossilOrigin-Name: 215650a5a1d55bdbca9c92524804a1a54456a17f42a17e53747b21a6507506f5
2025-02-17 17:33:14 +00:00
dan
8bbce21ed7 Have the win32 VFS take a temporary shared lock (instead of the current exclusive) on the pending-byte when taking a SHARED lock on a db. Do not lock the pending-byte at all when taking an EXCLUSIVE lock if RESERVED is not already held.
FossilOrigin-Name: 5127509abb10cb1da35b9874ea63e0c2f882b10567606e2bdd636a50811a693c
2025-02-12 17:21:24 +00:00
dan
41f29806a1 Fix test script errors in walsetlk3.test. Tests still don't all pass.
FossilOrigin-Name: 56eb4114f8bf9971960998ae0b79352767657ee19b5bdfec5149906e72ba170f
2025-02-12 08:07:10 +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
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
dan
ff6bff4059 Have windows SQLITE_ENABLE_SETLK_TIMEOUT builds block indefinitely if the busy-timeout is set to 0x7FFFFFFF.
FossilOrigin-Name: daefcafe799ad7613cbdff1fb1e9d40659892906875b28fbc112abd7679e48ea
2025-01-15 12:45:38 +00:00
dan
362d51a159 Omit code to link all winShm objects open on a single node into a list. This is no longer required.
FossilOrigin-Name: b400ab4ba99d3ed7e90c93257d729563c630ef451017a702d42f322a4e57b663
2024-12-26 16:10:15 +00:00
dan
ce50282c3b Properly wait for asynchronous results for calls to LockFileEx() on FILE_FLAG_OVERLAPPED files even if LOCKFILE_FAIL_IMMEDIATELY, which usually causes LockFileEx() to return synchronously, is specified.
FossilOrigin-Name: 35b3e73c5a9efa12f9bb0dad1721fce128cd1e3bcbc87027ee4ea685a12a70d5
2024-12-24 14:44:38 +00:00
dan
800bf8fd93 Fix a problem on this branch causing a file-handle to be leaked following an OOM condition.
FossilOrigin-Name: 5ca12dc964b2d8c3d11a2be5be7eac0dc994cec3a8b5fdfeac4ff8dde19a5a93
2024-12-16 15:13:34 +00:00
dan
b1ad83a342 Ensure that all win32 API functions invocations in os_win.c are made via the function table. Fix asan error in test code.
FossilOrigin-Name: 2ffdc799c63ff8858f2aa9177ca9c74be2df5d7594cb10fb0a233537d83fd563
2024-12-11 15:30:58 +00:00
dan
d50eb9c999 Ensure windows may block on a SHARED (but not EXCLUSIVE) DMS lock.
FossilOrigin-Name: 55e4e7bb0074859e8c3e736e7eceb69af8408ce75135f5baa09e98aaf4e2a321
2024-12-10 19:00:07 +00:00
dan
4ab343cb7c Enhance tests to ensure that blocking locks, and not calls to xSleep(), are being used by SQLITE_ENABLE_SETLK_TIMEOUT builds when they should be.
FossilOrigin-Name: c892242bb642f7a6a961e310ed8b4f1e140f8ee32c00f50021c6011c6e7e1476
2024-12-09 16:01:28 +00:00
dan
093c21342c Assume an NT-based OS when running tests if sqlite_os_type is not set.
FossilOrigin-Name: 22e4aeded0a6a691fc7026f3cd90836a289dfc994269f8576d01e28fa478902b
2024-12-04 18:27:13 +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
9d592359fe Fix a problem with SQLITE_OS_WINRT builds.
FossilOrigin-Name: baf43e8c7da6aacce874ec30d0c9e1dcb44c5ed9de2214099d42fbbd335d2e93
2024-12-02 20:48:17 +00:00
dan
a180131454 On windows, use a separate handle for each connection for xShmLock() locks.
FossilOrigin-Name: 272d552f126357d7bc16d84f13a4bea823abc6ef7faf90e3cffcedb68210f52a
2024-11-30 20:00:54 +00:00
dan
f6d267491c Ensure that file-handle winShmNode.hFile.h is used in a thread-safe manner.
FossilOrigin-Name: 7a32b497ab16774021924a8536e1025a0a01740a6484f0de17623a69713511d8
2024-11-25 18:47:12 +00:00
dan
1743c5f836 Fixes for code on this branch. Now appears to work, but is not tested well.
FossilOrigin-Name: 0568fc6dde41dd29e85e697cd1865feb4db6aaae09d5e5100b3f97cab93590eb
2024-11-25 16:54:10 +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
9bf5bea607 Document that -nofollow does not work on Windows. Fix Windows symlink
test cases for when the test suite is run as administrator.

FossilOrigin-Name: 4de8a75ec5a2e3655a2d0c5a9333b58f8b48b681255f0a01866b610ae6249bc2
2024-11-21 01:50:01 +00:00
drh
1b37bc0e66 Add the SQLITE_FCNTL_NULL_IO file-control.
FossilOrigin-Name: f0e917fcf51b59f8ccfe5b9341937341d0e6016eb275d6c33dcb10b0b301a9da
2024-11-13 14:58:35 +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
dan
bcf3df0192 In os_unix.c and os_win.c, do not allow xFetch() to return a pointer to a page buffer that is right at the end of the mapped region - if the database is corrupted in a specific way such a page buffer might be overread by several bytes.
FossilOrigin-Name: 2684feac3bc9c5463604900d72710be861527614f4957224c74a16a3b3c702f5
2024-01-23 16:09:22 +00:00
drh
7309b50fbc Mix the current process ID into the randomness used for generating
temporary filenames on Windows.

FossilOrigin-Name: 775a36ee093df4b5f7529a43eeaee9d5a9a943ad5ed8ae03bc74e459e87ba438
2023-08-16 15:10:07 +00:00
drh
56a410741b Address various harmless compiler warnings from
[forum:/forumpost/d526da8ee4|forum post d526da8ee4].

FossilOrigin-Name: 365caf2f97e8f15842f52536e8d05d359e9d6e863182e020ce14a9a9f27ee057
2023-06-16 14:39:21 +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
mistachkin
cf5dce045f Adjust OSTRACE usage so that it works with the changes in the previous check-in.
FossilOrigin-Name: 1eb4573e9092d350d00d05ba716cb0272e2dbb1ecbaadc2a7cc22de0b8cc2bda
2023-04-27 21:31:21 +00:00
dan
2e225a35b4 Fix a problem on windows sometimes causing SQLITE_NOMEM to be returned if an error occurred while opening a temp file.
FossilOrigin-Name: c22a39a6b28e3039fe453c0c0db98744b8a63ef9063cc3f6e0ed67d2506d34be
2023-04-27 13:55:29 +00:00
drh
e38b6e0318 Fix typo in comment.
FossilOrigin-Name: c3b94d7d4697a5c3983253f6266c544d8037617778a09d491bc12eb13f08ac75
2022-11-07 15:01:05 +00:00
mistachkin
bdb6368d72 Fix harmless compiler warning seen with MSVC.
FossilOrigin-Name: 73c4c68d3b4c16caf8281dabddd7365d24691e5ee2da89b1783eca66bfbd9280
2022-09-09 17:50:29 +00:00
drh
6e440ab3de Fix the windows build so that it works with -DSQLITE_OMIT_AUTOINIT.
FossilOrigin-Name: f74a5ea8c986dc33d3afcda169c38abbe55728c56716cf9991a5e2ef7fc4917a
2022-09-05 18:17:03 +00:00
drh
fee6431392 Improved mutex protection of the sqlite3_temp_directory and
sqlite3_data_directory global variables.

FossilOrigin-Name: ebbe9634d6dde9e097f61fb98a79111e46de422b7bbbd9ed3af7b6f22aacf5ec
2022-09-02 11:12:16 +00:00
drh
18a3a48db1 Experimental changes to put sqlite3_temp_directory behind a mutex.
FossilOrigin-Name: 5ee3515fbb88bf1ae5f8b507844f82dcc429380b6ebeab9b09b52b25ee60a60d
2022-09-02 00:36:16 +00:00
drh
56d88aad29 Harden the xShmLock method of both the unix and Windows VFSes so that they
are robust against being invoked when the SHM file is not open.

FossilOrigin-Name: 67d8b434f628d44c4a90ce8ff5ab2e381f500bb42bdbfab9a17d21925a2ec6cd
2022-03-22 19:41:55 +00:00
drh
f8c4c3a09f The windows VFS accepts query parameter "exclusive=true" to cause it to
take a mandatory file lock, preventing other applications from even
reading the file.

FossilOrigin-Name: 05b573fdb27abec7d75aa1375325d45043cfd674f5b346fb341f001d7e04d160
2020-10-15 14:37:27 +00:00
drh
0c52f5a2b0 Fix other potentiall pointer aliasing problems associated with subclassing
of the sqlite3_file object for various VFS implementations.

FossilOrigin-Name: 270ac1a0f232d75537be40abae559004e950b992cb2c7e94cd6de66e96ae17bd
2020-07-24 09:17:42 +00:00
drh
067b92ba00 Extend the refactoring into extensions. Clean up stray newlines.
FossilOrigin-Name: 7a876209a678a34c198b54ceef9e3c041f128a14dc73357f6a57cadadaa6cf7b
2020-06-19 15:24:12 +00:00
drh
ccb2113a62 Refactoring various names. No changes in the resulting machine code.
FossilOrigin-Name: 7bb08b1bfcf184e4b59c8c9028926a0052612ff6a6731914ccdb8dee07ea4a98
2020-06-19 11:34:57 +00:00
dan
10757ed0ca In os_win.c, avoid calling sqlite3_uri_boolean() on anything other than a main-db filename.
FossilOrigin-Name: cb0a18e64f8d81c2ada9f698faaf5ca68a0666687bf6f3abc860324cb1997463
2020-05-19 15:40:07 +00:00
mistachkin
a8e41ecaca Enhancements to long-path support in the Win32 VFS.
FossilOrigin-Name: 0119d96decd344ae711388ac8475b92464a6d018ecf73862170f137410036dac
2020-05-15 01:18:07 +00:00