1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00
Commit Graph

736 Commits

Author SHA1 Message Date
dan
efe1697191 Add support for F2FS atomic writes. Untested at this point.
FossilOrigin-Name: 416973ede3bde8567d1f2699728f72352979e054ef988d1c1e1cfe4290f6f8b8
2017-07-20 19:49:14 +00:00
drh
25ef7f55d7 Work around a bug in the definition of "ino_t" on some versions of Android.
FossilOrigin-Name: 8df492c1711bfea250264fdaa4892e0842705f83
2016-12-05 20:06:45 +00:00
dan
1bf4ca7c42 Add the "modeof=<filename>" URI parameter to os_unix.c - used to specify a file to copy permissions from when a new database is created. Also allow passing NULL as the second parameter to sqlite3rbu_vacuum().
FossilOrigin-Name: ed406d31ff54ee3de8db91690a966e5c561f8f94
2016-08-11 18:05:47 +00:00
drh
2aab11fa5a Fix the temporary directory search algorithm for unix so that it fails
gracefully even if all candidate directories are inaccessible.  This fixes
a bug that was introduced by check-in [9b8fec60d8e].

FossilOrigin-Name: 614bb709d34e11488da88861243023cc5de4b409
2016-04-29 20:30:56 +00:00
drh
97a7e5e68c The pcache and the built-in VFSes should not use mutexes when
SQLITE_CONFIG_SINGLETHREAD is set.

FossilOrigin-Name: 12418b100196abbfbfb85e0ab4bb6b1cbf335df7
2016-04-26 18:58:54 +00:00
drh
23ee893752 Fix the fix to the temporary directory search algorithm so that it continues
to return "." as a fallback if that directory has the correct permissions.

FossilOrigin-Name: b38fe522cfc971b37ca04e7b63a92bbb6e0b01e1
2016-04-23 20:59:23 +00:00
drh
7694e06461 Change the temporary directory search algorithm on unix so that directories
with only -wx permission are allowed.  And do not allow "." to be returned if
it lacks -wx permission.

FossilOrigin-Name: 67985761aa93fb613b87d340e75371fa55b0f778
2016-04-21 23:37:24 +00:00
drh
f9986d90d1 The last parameter to pread64() and pwrite64() should be off64_t, not off_t.
FossilOrigin-Name: 3a7d72986fabe9434ff5bd02c93169314f072b23
2016-04-18 13:09:55 +00:00
drh
f878e6e1a7 Update comments on the unix file locking protocol. No changes to code.
FossilOrigin-Name: 716b20de4306de1653ba5bcdbfb8d210d2d46e1a
2016-04-07 13:45:20 +00:00
drh
6369bc3fbb Remove an unreachable branch from the unlink verification logic in the UNIX
VFS.

FossilOrigin-Name: 4dc30cce7fdb7dba9a9aad96bb8b499b965610b2
2016-03-21 16:06:42 +00:00
drh
1b9f2141a7 Experimental implementation of the sqlite3_system_errno() interface.
FossilOrigin-Name: 6782c87b3722fbd09684a5b1e5df05247956f1c6
2016-03-17 16:01:23 +00:00
drh
3f77389bb4 Avoid a few unnecessary fstat()s on journal files.
FossilOrigin-Name: dbf84705913c0845ca4e75eb30c91536c754efeb
2016-03-16 19:10:46 +00:00
drh
79a2ca3944 Further fixes to the pread()/pwrite() enabling logic.
FossilOrigin-Name: 38fb54e7854ac0500a88585ff9dd7487b4b2e586
2016-03-04 03:14:39 +00:00
drh
a46cadc42e Fix the build for cases when pread()/pwrite() are not available.
FossilOrigin-Name: 7d67d876b70c7a4199697c5b112d809c600e140e
2016-03-04 03:02:06 +00:00
drh
e32a256acd Update the configure script to detect pread/pwrite and update os_unix.c to
use those routines if they are available.

FossilOrigin-Name: 2cffb9e50bed77d1079603f5b4a71b7559de7294
2016-03-04 02:38:00 +00:00
mistachkin
fad3039c51 Enhance ability to debug out-of-memory errors.
FossilOrigin-Name: 6a9c4a3ebfb7cc0738ef6634440ccab44a21ff28
2016-02-13 23:43:46 +00:00
drh
6d258995e6 Refinements to synchronous logic:
(1) Use PAGER_SYNCHRONOUS_FULL rather than the corresponding magic number.
(2) Honor SQLITE_NO_SYNC on xDelete calls with sync
(3) Count xDelete syncs during testing
(4) Fix #ifs on SQLITE_EXTRA_DURABLE so that directory syncs on journal
unlink are off by default.

FossilOrigin-Name: e3157cb5ad0d22758e766a95fb1463a7810f7d7f
2016-02-04 09:48:12 +00:00
dan
2349670262 Ensure that unixFullpathname() always nul-terminates its output buffer, even when returning an error.
FossilOrigin-Name: 4a4385564dd3887a7953820b60c99d6ce289f96a
2016-01-26 13:56:42 +00:00
drh
f0fc992936 Remove an unused variable.
FossilOrigin-Name: 1c2656c1d37906230edc142d3a4253b16b6e925f
2016-01-26 00:12:42 +00:00
dan
af1b36b1df Only use lstat() if the HAVE_LSTAT macro is defined. Fix some test file issues.
FossilOrigin-Name: 8a6e4147a680ad6c5fdd588468b6daac82349d2c
2016-01-25 18:43:05 +00:00
dan
caf6b150a1 Simplify the unixFullpathname() function. This adds a dependency on lstat().
FossilOrigin-Name: f71249d3db9242b8f38955db51a7a5789d002803
2016-01-25 18:05:49 +00:00
dan
e88ec187cd Fix issues on unix with opening database files via symlinks that are not in the current working directory. And with nested symlinks.
FossilOrigin-Name: 80398fd44fb232193450103808e1854e0eba5652
2016-01-25 17:04:48 +00:00
drh
c3dfa5eba7 Reenable the xCurrentTime and xGetLastError methods on the unix VFSes as long
as SQLITE_OMIT_DEPRECATED is not defined.

FossilOrigin-Name: c11c85fdb6514cae54bb44945cc197dcaba72307
2016-01-22 19:44:03 +00:00
drh
e2258a2076 Various #ifdef enhancements for improved VxWorks support.
FossilOrigin-Name: 75cd41ff179e29c5d45f9d7fed784bc339e0d7a0
2016-01-12 00:37:55 +00:00
drh
a829992969 Typo fix in the previous commit.
FossilOrigin-Name: 52c166039831cc8423e2252019ef64a21b9d7c2a
2016-01-08 22:31:00 +00:00
drh
24dbeae6f5 More #ifdef fixes for the unix VFS.
FossilOrigin-Name: 122c111e360761de8166e16ca151cb7260ee9bf8
2016-01-08 22:18:00 +00:00
drh
e4a08f9e39 Fix a problem with #ifdefs on the system calls in the unix VFS that causes
problems when compiling with SQLITE_OMIT_WAL.

FossilOrigin-Name: ceceea4c5ee242b20ebf216593c15c11ce2c369a
2016-01-08 19:17:30 +00:00
drh
86151e8905 Avoid unnecessary work inside of verifyDbFile() in the unix VFS.
FossilOrigin-Name: f3c0579e931799088e9a83757e25bae229120697
2015-12-08 14:37:16 +00:00
drh
dc27851e21 Fix the openDirectory() routine in the unix VFS so that it works for databases
located in the root of the filesystem and for database files that have no
pathname at all.

FossilOrigin-Name: e7ae120d04cffafd9bc2b4ecd68571c17e05ed72
2015-12-07 18:18:33 +00:00
drh
90e5dda217 Cleaner code and additional comments on the handling of 8+3 filenames when
trying to find the name of a database file based on its journal filename, 
in the unix VFS.

FossilOrigin-Name: 9e489a71f2aeb1f13f9ca6f106b9144d07ca25aa
2015-12-03 20:42:28 +00:00
drh
af19f173d3 Fix an incorrect, though harmless, assert() in the unix VFS.
FossilOrigin-Name: 4692ae84f93530e27d7c106a60236355e176b7fd
2015-12-02 17:40:13 +00:00
drh
333e6ca9a5 Remove an unreachable branch from the unixMapfile() routine of the unix VFS.
FossilOrigin-Name: b50f67bc46e65fe4e51667d48b4add58706a9443
2015-12-02 15:44:39 +00:00
drh
f3b1ed0fc2 Minor simplifications to the unix VFS.
FossilOrigin-Name: 2f13c16b45685ec6850cbd9da79e8198bad6a491
2015-12-02 13:11:03 +00:00
drh
2c8fd12f42 Change the SQLITE_NO_SYNC compile-time option to call fstat() in place of
fsync() rather than being a total no-op.

FossilOrigin-Name: f64ea8a052af9790d5e6987cbd5e81d77da6f172
2015-12-02 02:33:36 +00:00
drh
adfa22e118 Fix a (harmless) off-by-one error in the unix VFS logic that fsync()s a
directory after deleting a file.

FossilOrigin-Name: 3d02711a709a7e708edb0ea8ca5d17b39dd307f6
2015-12-02 02:08:30 +00:00
drh
50358adfaa Simplification of the logic used to take the process-wide lock in the
unix-excl VFS.

FossilOrigin-Name: 73defd52bb0e3e5db763d3bfbeebc972b645867e
2015-12-02 01:04:33 +00:00
drh
dcfb9652fd Remove all traces of SQLITE_FCNTL_WAL_BLOCK from the unix VFS - that feature
had been disabled for a long time and never actually worked.

FossilOrigin-Name: e1d5320ca089336e26d200305b744b06ce883be4
2015-12-02 00:05:26 +00:00
drh
053378dfa8 Simplification to the posix_fallocate() replacement used for the
SQLITE_FCNTL_SIZE_HINT file control in the unix VFS.

FossilOrigin-Name: 74934d3f60ad9f6550297410eada0f288e0123c4
2015-12-01 22:09:42 +00:00
drh
e1818ec740 Simplification to the read and write primatives in the unix VFS.
FossilOrigin-Name: 9eefa449792f03c4c149edcbc6b9b7692617994c
2015-12-01 16:21:35 +00:00
drh
025d2f7ad8 Fix a problem in xFullPathname for the unix VFS. The problem was found by
Kostya Serebryany using libFuzzer.

FossilOrigin-Name: bb1e2c4df0b81327923f121dd6c002845486a314
2015-11-30 22:22:23 +00:00
drh
40fe8d31f5 The EOVERFLOW errors from fstat() is not possible unless SQLite has been
compiled with SQLITE_DISABLE_LFS.

FossilOrigin-Name: 8cfb7a50bb70ba1e021c1d12d31563e98a20d291
2015-11-30 20:36:26 +00:00
drh
a8de1e1c90 Simplifications to the locking logic in the unix-dotfile VFS.
FossilOrigin-Name: 583813525888c7e106f3e8cb46c1a507006daee6
2015-11-30 00:05:39 +00:00
drh
b7e50ad555 Improvements to temporary file creation logic in the unix VFS.
FossilOrigin-Name: d6e177fd09c83d46adc5b5d36e9a439aa5397450
2015-11-28 21:49:53 +00:00
drh
acb6b28d60 Simplify logic for syncing directories after creating or deleting a file in
the unix VFS.

FossilOrigin-Name: eb180b4f04d412dcd0af138e2dd7f62fbb5ac439
2015-11-26 10:37:05 +00:00
drh
5a2d970a1a Small simplification to the xOpen method in the unix VFS.
FossilOrigin-Name: 96e7d638ecdabbf84a152036eb01d408d142839e
2015-11-26 02:21:05 +00:00
drh
970942e4fc Simplify the temporary filename generator and the time-of-day functions in
the unix VFS.

FossilOrigin-Name: 6c5621ce1b1a65913b088ed8be65f9b689260d2c
2015-11-25 23:13:14 +00:00
drh
d260b5b2ce Make the xAccess method of the unix VFS smaller and faster.
FossilOrigin-Name: 191aef986ffc4ef34d813e417e52a4ec820b0300
2015-11-25 18:03:33 +00:00
drh
5337dacbad Remove unused methods from the unix VFS.
FossilOrigin-Name: 228bd15bbb7a1e6e3e0d03832e7f39ba169356a8
2015-11-25 15:15:03 +00:00
drh
91c4defbcf Simplification of the error code translator in os_unix.c. Code cleanup only.
The logic is unchanged.

FossilOrigin-Name: 2a20f793fdf6a2e88b679a7bd4e8ccf2935df049
2015-11-25 14:00:07 +00:00
drh
5a8d190b9e Remove from os_unix.c pointless logic that tries to prevent a recurrence of
a warning message that can only occur once.

FossilOrigin-Name: 20256177072caa4f2b4114038ad1c8f6e26bc562
2015-11-24 16:40:23 +00:00