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

695 Commits

Author SHA1 Message Date
drh
2e2338101a Fix error tests in seldom-used compile-time branches of the unix backend.
FossilOrigin-Name: 885c2b44a44f8d054014e4079b2cac8279c11d13206d5b5215189ef75b9c5254
2017-08-22 15:21:54 +00:00
drh
c68886bb9e For the unix VFS, avoid an unnecessary stat() system call prior to opening
any file in the common case where there are no unused file descriptors.

FossilOrigin-Name: 3075cfa07489eaf13cb9a2760e2391e79dd73181fe1730fae7bdcd6ad66d2a1f
2017-08-18 16:09:52 +00:00
mistachkin
e35395a45a On Windows, avoid casting a value larger than 2^31 to a (SIZE_T) on systems where it is a 32-bit type.
FossilOrigin-Name: f08d63b413601b22726e8b96ff8eb779857321b9df30db0333f71e50ffb5077d
2017-08-07 19:06:54 +00:00
dan
089df50687 Fix a problem with handling SQLITE_FCNTL_MMAP_SIZE requests with a negative
parameter in os_unix.c.

FossilOrigin-Name: 4249fcf7b0c0233f9b3ba5139702738d5221c5309240e6e91dc139eff59471fe
2017-08-07 18:54:10 +00:00
dan
43c1e622cd Avoid casting a value larger than 2^31 to a (size_t) on systems where it
is a 32-bit type.

FossilOrigin-Name: 46c3085dcad6372ac20eff499e17fe11680fdf4adb9186bf8b12221a5047e485
2017-08-07 18:13:28 +00:00
drh
344f763f72 Add new extended error codes for the atomic write file-controls.
FossilOrigin-Name: 94a2004756ffe027b3495be91366750135c294a9c460edc9a1b4b9422dcc33bd
2017-07-28 13:18:35 +00:00
dan
77b4f528fa Do not set device-capabilities flags SEQUENTIAL or SAFE_APPEND for f2fs
file-systems.

FossilOrigin-Name: 4477e60cd801dab7a8aec12c5bc5e81e774bedbfed38abbc8eb8b37336141a44
2017-07-27 18:34:00 +00:00
drh
d76dba7eb5 Omit unused batch-atomic-write code if SQLITE_ENABLE_BATCH_ATOMIC_WRITE is
not defined.

FossilOrigin-Name: a89b62c4966cd297326e8712da40e0962d2328d7ba1f201d5abcec911eeef347
2017-07-22 16:00:34 +00:00
dan
9d70954094 Use ioctl(F2FS_IOC_GET_FEATURES) to determine whether or not atomic batch
writes are available.

FossilOrigin-Name: 532bbf1f2b1028db4e581c756533aa660e482d833caaed4eafb299ef9b584f3a
2017-07-21 21:06:24 +00:00
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