aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
Commit message (Collapse)AuthorAge
...
* | | Improvements to the mechanism that attempts to report SQLITE_CORRUPT ifdrh2020-11-18
| | | | | | | | | | | | | | | pread() says that the underlying filesystem is corrupt. FossilOrigin-Name: b887c7504e7edeba758f3c1203c6cc56eef499fe05e7e6c6d82939bf7d78c57f
* | | On unix, for certain error codes of read()/pread() returndrh2020-11-18
|/ / | | | | | | | | | | SQLITE_IOERR_CORRUPTFS instead of SQLITE_IOERR_READ. And then convert this error into SQLITE_CORRUPT prior to returning back to the application. FossilOrigin-Name: 9538ea8447e7b07c05197d6ff2208d3e97b45798736c85b63e8f0c7a3a98c1f3
* | Add ALWAYS() to conditionals associated with SHM locking that are always true.drh2020-11-06
| | | | | | FossilOrigin-Name: b599e89076d60afede7d2b3503b9338ca863d0c2d25799afe4080a6186386ea9
* | Do not invoke usleep() for more than 999999 microseconds.drh2020-09-15
| | | | | | FossilOrigin-Name: 1f5ed852f25515bbc0a7aaf236fdef40fa7e31805eee1249277fde4e68f95130
* | Ensure that the busy-handler count is reset at the end of each ↵dan2020-09-04
| | | | | | | | | | sqlite3_file_control() and sqlite3_prepare() (and _v2() and _v3()). FossilOrigin-Name: 5dd05940617fb05ee2faf212b15afc3a8e9695318eccb76761b37359fea681d1
* | Fix handling of an xShmLock(SHARED, UNLOCK) call when the caller does not ↵dan2020-08-28
| | | | | | | | | | hold any lock on the specified slot, but another connection in the same process holds an EXCLUSIVE. FossilOrigin-Name: 3eb365027b885e1f61965efd53a3643b6ff441ae01e79038a091314516a50dd4
* | Modify the unixShmLock() function to avoid iterating through the (possibly ↵dan2020-08-28
| | | | | | | | | | large) set of connections to the same database file. FossilOrigin-Name: e0faddf0dfc3a40b6b94408296dd781dd0264ecc9f2129ce4405438433fb00e0
* | Try to make SQLite easier to compiler for Mac Catalyst. See drh2020-08-19
| | | | | | | | | | [https://sqlite.org/forum/forumpost/803387a1c5|forum post 803387a1c5]. FossilOrigin-Name: e1595a20d71e61957944cc2b634578968cda8fba08a1f1e75edba20dc9c6080b
* | Fix other potentiall pointer aliasing problems associated with subclassingdrh2020-07-24
|/ | | | | of the sqlite3_file object for various VFS implementations. FossilOrigin-Name: 270ac1a0f232d75537be40abae559004e950b992cb2c7e94cd6de66e96ae17bd
* Extend the refactoring into extensions. Clean up stray newlines.drh2020-06-19
| | | FossilOrigin-Name: 7a876209a678a34c198b54ceef9e3c041f128a14dc73357f6a57cadadaa6cf7b
* Refactoring various names. No changes in the resulting machine code.drh2020-06-19
| | | FossilOrigin-Name: 7bb08b1bfcf184e4b59c8c9028926a0052612ff6a6731914ccdb8dee07ea4a98
* Expand upon a comment in os_unix.c. No changes to code.dan2020-05-29
| | | FossilOrigin-Name: 77933dc4dbe0e0af3b13a14293a8bd684edc5056f4ae9291c6f95d4433bf90ce
* Fix a problem preventing building without SQLITE_ENABLE_SETLK_TIMEOUT defined.dan2020-05-06
| | | FossilOrigin-Name: 98eb54c6d83992886f17a00b6fc8998df230e3b5f45bafc6fae0d15a9ee5a4c6
* Add error code SQLITE_BUSY_TIMEOUT, used internally by the OS layer to ↵dan2020-05-06
| | | | | indicate that a call to xShmLock() has failed due to timeout of a blocking lock. FossilOrigin-Name: f3ef9c7c2b4ba3de1057ad569f068b241d5f23e6629d8e0dacf85e57fd13b8aa
* Add tests for running recovery when opening a write transaction or ↵dan2020-05-06
| | | | | performing a checkpoint with blocking locks enabled. Fix some failing assert() statements. FossilOrigin-Name: d096ea3fe20f8af90f9e3f798fd0a69527b32ac8e208ade58b9d0af0e831f41b
* Unless upgrading an existing read transaction, have ENABLE_SETLK_TIMEOUT ↵dan2020-05-05
| | | | | builds attempt to use a blocking lock when opening a write transaction on a wal mode database. FossilOrigin-Name: d6f819a9e6b35f3fd558bd93255a6a24ad690a0fa15a82b009ca9c641db983c6
* Do not use O_NOFOLLOW when opening a directory just to call fsync() ondrh2020-04-20
| | | | | that directory. FossilOrigin-Name: 2fc80ef16ce5878311ab88a0c64631813572ffbb71f75363b4619c9667e0926b
* Modifications to the way blocking locks are used in ↵dan2020-03-27
| | | | | SQLITE_ENABLE_SETLK_TIMEOUT builds so that multiple processes or threads may not deadlock when operating on a single database. FossilOrigin-Name: c516027d5fd876b7d0bf566435667d554db29ded30ad6fc1165caa4a93d015a0
* Omit O_NOFOLLOW from the open() call when opening /dev/null, since /dev/nulldrh2020-02-13
| | | | | is a symlink on Solaris, we are told. FossilOrigin-Name: 0c683c43a62fe25c6cb765e4a31556ec91a7c21af79349b3d7eeb13f73dd1cdc
* Follow-up to check-in [c8c6dd0e6582ec91] - change the xAccess() method todrh2019-12-27
| | | | | | return true if the file exists and it is anything other than a regular file, or if it is a regular file with a non-zero file size. FossilOrigin-Name: 8a39803ef8db4d8cb0d231e66299525fad4e61266ca29b3704aebb88df1c745b
* In the xAccess() method of the unix VFS, return true if the named objectdrh2019-12-26
| | | | | | | is a directory, regardless of what stat() reports as the st_size for the object. Different filesystems report st_size differently for directories. Problem reported on the mailing list by Stefan Brüns. FossilOrigin-Name: c8c6dd0e6582ec9103d007b294c42bb1820be1fa7dab85d873b04e0b90571626
* Revise the SQLITE_OPEN_NOFOLLOW so that it actually uses O_NOFOLLOW in thedrh2019-11-22
| | | | | | | | open() system call. This backs out the SQLITE_ACCESS_SYMLINK value but adds the new SQLITE_OK_SYMLINK return code from the xFullPathname method of sqlite3_vfs when that routine resolves symbolic links. O_NOFOLLOW is always included in open() system calls for journal files. FossilOrigin-Name: 6a64fb6a2da6c98f1e87b55ad5689967e1db4eae2e08345471d95e28cd567e0f
* Add support for SQLITE_OPEN_NOFOLLOW.drh2019-11-18
| | | FossilOrigin-Name: cb79c828496a703f1410f61458ebc1e15a92a63412b36f51945b2b5a32ec6e88
* Allow compile-time options -DHAVE_GETHOSTUUID=0 and -DHAVE_GETHOSTUUID=1.drh2019-09-27
| | | FossilOrigin-Name: 3bcb9cc104e0265a600b03415ad955187fc6445ea8e46dc656412cba5bc1d621
* In the previous check-in, the variable should be openMode, not openFlags.drh2019-09-25
| | | FossilOrigin-Name: 77b0db22d6c7a031f332bfcf1c8fcd94e464de9f2396f0327ee761a30ebc8b60
* In the unix VFS layer, do not attempt to chown() the journal to be the samedrh2019-09-25
| | | | | | as the database if running in 8+3 filename mode. Also, update the comments on the chown() attempt to be more precise. FossilOrigin-Name: ab853724a7e01ca32167d294c3c80d6632e805bdf39b6d56db82226a00ad72dc
* Improved reuse of file descriptors for which close() is delayed to preventdrh2019-08-06
| | | | | clearly of posix advisory locks. FossilOrigin-Name: 509c1ba26a4c12c63ecf04ddfa2f175eaf4dd9b96ab7be15faebd36deb0a0a31
* Call ioctl() with the correct signature on both Android and stock Linux.dan2019-07-15
| | | FossilOrigin-Name: 68e12e063fe41bcd65cf8a120f838b9b1723ed803ea85240fe0f2145b78df2d7
* Remove unreachable "break" statements to silence harmless compiler warningsdrh2019-07-13
| | | | | from ICC. FossilOrigin-Name: 0d7287e1bfdd5a392bf2fb17699e7cfd0b08bf61fab6cbf4b4bb347b3c4b4610
* Back out the change to support Fuchsia, since it turns out fuchsia does notdrh2019-03-15
| | | | | like dot-file locks. FossilOrigin-Name: 1d801a3b2c48dc8a918d6da047bc877acf033d5f5c4e1d4b412ba7678ed6f8b3
* Changes to the unix VFS that allegedly enable it to build of Fuchsia.drh2019-02-20
| | | | | We have no way of testing this. FossilOrigin-Name: be21a6416d47ff7db995006a0422b745044d9b8bb5bad3c53342aa6e2e524771
* On the first connection to a WAL-mode database that was not cleanly shut downdrh2018-10-11
| | | | | | | | | and contains a left-over -shm file, truncate the -shm file to 3 bytes instead of to 0 bytes. Avoiding a truncation to 0 means that system monitoring tools can better detect if a process illegitimately tries to truncate a -shm file. Such a rogue process might think it is being helpful by cleaning up old files, but there is a race condition that can cause damage to the database. FossilOrigin-Name: 90cf32cde072a305f30c75a71665d1f9e23e805c0a49f5306f015c056dd70f0c
* In the unix VFS, fix the heap shm allocator (used for unix-excl) drh2018-10-11
| | | | | so that it works even on systems where the page size is larger than 32KB. FossilOrigin-Name: 7fbb083c5cf0948af3624b7538ffa086f77de27a3e84a7039ae7d6574f1a3a54
* Add an additional assert() verifying mutex invariants on thedrh2018-10-02
| | | | | unixShmSystemLock() routine in the unix VFS. FossilOrigin-Name: cb1511065d5348c5b3015dc9d690fc5d519a14ffdfa7164bb552a4fa686ad142
* Additional field name changes and commit fixes associated with shared-memorydrh2018-10-02
| | | | | locking in the unix VFS, to improve maintainability. No logic changes. FossilOrigin-Name: 9280774a4bbc665d70f346d258768cbcca3e0e77791473aecfd7d0e87810ab31
* Fix comments and refactor some names associated with shared-memory lockingdrh2018-10-02
| | | | | in the Unix VFS. No logical changes. FossilOrigin-Name: 3e9f1635271c92dce5324728b4ee1cc1a1856ec3c60b1b512a652c21e010e63e
* Fix a problem building on Android with SQLITE_ENABLE_BATCH_ATOMIC_WRITE set.dan2018-09-18
| | | FossilOrigin-Name: e41e50fe7430cb79f67369fe81ac9938665bfc5db59c4faaf429ceb8ca03f584
* Fix an assert() in os_unix.c that is not true when using RBU.dan2018-09-12
| | | FossilOrigin-Name: 028ed8618af012b51104a06cc155b45d98bc4ff833d4431b9c38fd6851a74e82
* Fix a harmless compiler warning in os_unix.c.drh2018-09-06
| | | FossilOrigin-Name: b9d1fb5d44e0a6ffc00ee987f178e448d7516e579beecdeeb387e69aef588921
* Fix a harmless unused-variable compiler warning that only came up in certaindrh2018-08-16
| | | | | compile-time configurations. FossilOrigin-Name: 456842924bb33c0af8af29402f06e5f25b6791f698a0d12a080258b20b0cfb61
* Stop requiring the global VFS mutex to access the unixInodeInfo.pUnused field.drh2018-08-13
| | | | | The unixInodeInfo mutex is sufficient. FossilOrigin-Name: e3ea43dabf099dc2954c23d348638e7b2a8b9122d2994154bc649a2c09260c46
* Take extra precautions to ensure access to unixInodeInfo.pUnused is protecteddrh2018-08-13
| | | | | by all necessary mutexes. FossilOrigin-Name: 8b1e0010b9e0b548a90087f4d25843d2b40f7e9551722ac587fa925d37b510c2
* Fix an incorrect comment on the unix-nolock VFS object. No functionaldrh2018-08-13
| | | | | code changes. FossilOrigin-Name: 90f7c193b42f0d8120a8e429bdea5e1cec5d3f45b901db8fc5a5c2ca3e69cba8
* Return an SQLITE_NOMEM error if the locking mutex fails to allocate.drh2018-07-23
| | | FossilOrigin-Name: 1c94834879be0601ac40ef3c4fb1b140f7737e89af7808f2f1db4ceb3daae19f
* First attempt at reducing mutex contention in the unix VFS by providingdrh2018-07-23
| | | | | a separate mutex for each unixInodeInfo object. FossilOrigin-Name: f69afaf00a659cd768a863c5f4a1d527f01187e037240da0ada527cb52c5afe8
* Proposed fix for the use of posix_fallocate() so that it handles EINVALdrh2018-06-02
| | | | | returns correctly. FossilOrigin-Name: ab3a5539db82814cafb832cdaebd1e14566139306453ef9cdba6b244a994fe0b
* Avoid a race condition that might cause a busy_timeout to last longer thandrh2018-03-26
| | | | | it should. FossilOrigin-Name: b81960561b47a1b49646f2f8870dd0684dc4ca7c0b9e11076fd713de66b75972
* Add infrastructure to support for using F_SETLKW with a timeout on systemdrh2018-03-26
| | | | | that support that functionality. Requires SQLITE_ENABLE_SETLK_TIMEOUT. FossilOrigin-Name: 2e54a7433ece4eb27e71bda6f2d121d5aa46ddd5a481357d8543d1432aaad689
* Remove an unnecessary memset().drh2018-02-21
| | | FossilOrigin-Name: e7b7f5884a78630c6ba6a217c36247397e62f1928d4b480df929efcfc4a01893
* Only try to use the geteuid() interface on unix if HAVE_FCHOWN is defined.drh2018-02-19
| | | | | This fixes the build for vxWorks, we are told. FossilOrigin-Name: 38f654dc117bb11d61407327884b5c913cfaf920547bebc4ce5a4cf983e5c20e