drh
9ef6bc427a
Use mkdir() and rmdir() rather than open() and unlink() to create the lock
...
files with the unix-dotlock VFS. The change is backwards compatible and,
we are told, works better on some network filesystems.
FossilOrigin-Name: e2f08426d7a84a2ac6148f485b7af377201a175b
2011-11-04 02:24:02 +00:00
drh
d337c5bde8
Fix an issue with finding the access permissions of journal files when
...
8+3 filenames are in use.
FossilOrigin-Name: 2b35c5144ddcc2ed6d0fcaa8c0ba5d20b9487be7
2011-10-20 18:23:35 +00:00
drh
30ddce6ff4
Added the tool/warnings-clang.sh script. Changes so that there are no
...
warnings with either gcc or clang even including FTS4 and RTREE and
both with and without SQLITE_THREADSAFE=0.
FossilOrigin-Name: 39408702a989f907261c298bf0947f3e68bd10fe
2011-10-15 00:16:30 +00:00
drh
b07028f71c
Add assert() statements and eliminate needless variable assignments in order
...
to get the clang scan-build utility to report zero problems against the
SQLite core. Clang's static analysis did find one real problem - but it was
in the command-line shell, not in the SQLite core.
FossilOrigin-Name: 60fee9574b0125705787e33c16f116cf188c8323
2011-10-14 21:49:18 +00:00
drh
b87a666315
Fix a harmless compiler warning introduced into os_unix.c by one of the
...
recent changes.
FossilOrigin-Name: 4bf4d5ebfbf5d157a8bf3a3817e2ce350f25af0e
2011-10-13 01:01:14 +00:00
drh
3170225f19
The date/time functions return NULL if the xCurrentTime or
...
xCurrentTimeInt64 VFS methods fail.
Ticket [0b803bff856c644c]
FossilOrigin-Name: c96651dd6ceadd51c9e1f4d942177d3c128c47b4
2011-10-12 23:13:43 +00:00
drh
3ec4a0c1a5
Change the behavior of the readonly_shm=1 query parameter so that it never
...
attempts to open the -shm file read/write.
FossilOrigin-Name: f1364004836078378e4005ab3eb9c0a04e3d4ce7
2011-10-11 18:18:54 +00:00
drh
c47167a6a8
When finding the appropriate file permissions for journal files with
...
SQLITE_ENABLE_8_3_NAMES, ignore "-" characters in the name of the
containing directory.
FossilOrigin-Name: 328cc1867ffbbf1c953dfd843649f5f209c8e6ec
2011-10-05 15:26:13 +00:00
drh
20f8e13b44
Formerly, we enabled fdatasync() on linux only. But now we learn that
...
fdatasync() is not supported on Android. So we disable fdatasync() on
Linux too. It can be reenabled at compile-time for those who really need it.
FossilOrigin-Name: 70b5b309568ac55565558d5456aca1e431cfd26b
2011-08-31 21:01:55 +00:00
drh
fd53231c85
Always include the unixShm.id field, even when not debugging.
...
FossilOrigin-Name: 07803476206b8cde60ccc320b9ccdc0d48a41d65
2011-08-31 18:35:34 +00:00
mistachkin
d589a5444b
Make sure SQLITE_FCNTL_SIZE_HINT a no-op if the chunk size is not greater than zero.
...
FossilOrigin-Name: 88b763e8d73fafa1538b08af28b1c8b723b39c61
2011-08-30 01:23:34 +00:00
drh
2f7820d8b5
Back out [05c9832e5f6eb] since it was causing a performance regression with
...
no obvious benefit.
FossilOrigin-Name: 639cc85a911454bffdcccb33f2976c683953ae64
2011-08-29 11:56:14 +00:00
drh
3d4435b234
Fix several harmless compiler warnings and a documentation bug.
...
FossilOrigin-Name: 5454d0fe227b7c1f0e7715b6c08f97019628fc4c
2011-08-26 20:55:50 +00:00
dan
ee140c4d71
Fix the SQLITE_DISABLE_DIRSYNC compile time option.
...
FossilOrigin-Name: 6deb3ea1f080324ea23ebdc9008753fbbc4063e2
2011-08-25 13:46:32 +00:00
drh
1ee6f74046
If the application-defined openDirectory() function returns SQLITE_CANTOPEN,
...
then silently ignore the error. This allows the chromium sandbox to disallow
opening of directories without causing errors.
FossilOrigin-Name: 880b51150aaed804005f5062b4dd2fa0ffafa147
2011-08-23 20:11:32 +00:00
dan
da04ea4f88
Change to test instrumentation of os_unix.c: Regard IO errors that occur within SQLITE_FCNTL_SIZE_HINT requests as benign.
...
FossilOrigin-Name: ca47da2a1f6e6d221470e7f02b129fc21c288d7b
2011-08-23 05:10:39 +00:00
drh
bd1e50c920
When retrying a write() after an EINTR error on unix, be sure to also
...
rerun the previous lseek(). Ticket [e59bdf6116036a]
FossilOrigin-Name: 21452f3ae6b5882b03c7cc41e661c7b8144cc3df
2011-08-19 14:54:12 +00:00
drh
90315a2417
Make the openDirectory routine in os_unix.c overrideable so that it can
...
be turned into a harmless no-op for the chromium sandbox.
FossilOrigin-Name: 6b236069e1ea3c99ff0a007a790d4baebda70b13
2011-08-10 01:52:12 +00:00
drh
0059eae367
In os_unix.c, do not open the directory containing the database file when
...
the database file is opened. Instead, wait until time to fsync() the
directory. And do not report an error if the open fails, since some
systems (Ex: AIX and a chromium sandbox) are unable to open and fsync
directories.
FossilOrigin-Name: 713b1b7dc1296e9cee42aeaad8c85528155f721d
2011-08-08 23:48:40 +00:00
drh
036ac7fa90
Allow the unlink() system call to be overridden in os_unix.c.
...
FossilOrigin-Name: 8d1b5c3ac027ac00d57a250aad45230a09645617
2011-08-08 23:18:05 +00:00
mistachkin
5b7f786e7e
Merge changes for the new sqlite3_file_control() that will cause the -wal and -shm files to persist after the last database connection closes.
...
FossilOrigin-Name: 1b56677bdfb102d070a2057a65ba424fec81131d
2011-07-28 20:48:38 +00:00
drh
58384f1720
Use osStat() instead of stat() consistently in os_unix.c
...
FossilOrigin-Name: 9109128cb5640d687251dfbefa2fd998063cd9fb
2011-07-28 00:14:45 +00:00
drh
253cea5c6f
Test cases added. Fix the query mode.
...
FossilOrigin-Name: a9d8794ae949df570466a84836882bc8bed95c7c
2011-07-26 16:23:25 +00:00
drh
f0b190d94c
Prototype change for a new sqlite3_file_control() that will cause the
...
-wal and -shm files to persist after the last database connection closes.
FossilOrigin-Name: e34c553bf04761e86f3bd72f91439c05886caa5c
2011-07-26 16:03:07 +00:00
drh
7d2dc7156c
Enable the SQLITE_FCNTL_SIZE_HINT on unix even if SQLITE_FCNTL_CHUNK_SIZE
...
has not been set.
FossilOrigin-Name: 05c9832e5f6eb705f1dce4e65cf4e2d56512ff6b
2011-07-25 23:25:47 +00:00
dan
33067e7393
In os_unix.c, check if the ESTALE macro is defined before using it.
...
FossilOrigin-Name: 87017410f2fc3f2ae15ef06714563ba9ad4350c7
2011-07-15 13:43:34 +00:00
drh
df3aa16e2b
Fix some harmless compiler warnings that were occurring with THREADSAFE=0.
...
FossilOrigin-Name: 9b191bb4c7c1e1b12b188c0b3eee1f8f587887c8
2011-06-24 11:29:51 +00:00
drh
dbe4b88aac
Rework the autoconf script to better deal with utime() and dlopen().
...
FossilOrigin-Name: f69ed286ffb3f62f5cb5c1f7df55fa4d2468b472
2011-06-20 18:00:17 +00:00
drh
fd019ef7ce
Make use of the sqlite3GetBoolean() interface for more robust processing
...
of the readonly_shm query parameter inside of unixShmMap().
FossilOrigin-Name: 1f930d7e04cd4a5ff3d91a0e9f1b62114f1cebd2
2011-06-01 20:13:36 +00:00
drh
66dfec8b7a
Simplify the wal-readonly branch so that it does not require changes to
...
anything other than os_unix.c and wal.c and a couple of new error codes.
FossilOrigin-Name: d6b4709de4d1f8af001f58938247f00a652a616e
2011-06-01 20:01:49 +00:00
drh
bdd0f3bc0e
Merge the latest trunk changes into the wal-readonly branch.
...
FossilOrigin-Name: 2c6b5a28e3f6b7cb96b944d0a254f3707885f1ce
2011-05-31 17:08:32 +00:00
drh
81cc516352
Add the ability to limit filenames to 8+3 using the
...
SQLITE_ENABLE_8_3_NAMES compile-time option together with a URI
parameter of "8_3_names=1".
FossilOrigin-Name: 96d609856025919571f781207dfa6a24b1732e8d
2011-05-17 20:36:21 +00:00
dan
4edc6bf3ee
Add experimental support for read-only connections to WAL databases.
...
FossilOrigin-Name: bb59f9862da45d25fb51d7821130854828c91c98
2011-05-10 17:31:29 +00:00
drh
9a3baf10ca
Invoke the unix open() system call through a wrapper to avoid problems
...
resulting from differing declarations to that function in various systems.
FossilOrigin-Name: 4c7ff4dd352276e9c01cc536e188cbcd69396952
2011-04-25 18:01:27 +00:00
drh
1c4e603727
Change the prototype for the open() system call to agree with Posix. Though
...
a faulty function prototype in a pointer cast is a seemingly innocuous error,
the correct prototype is necessary for pthreads to work correctly on NetBSD.
FossilOrigin-Name: 3e135748f1efacb52b414b3ac3f4ae2c08bcd8fb
2011-04-17 17:09:58 +00:00
drh
d4a80312b8
Fix #ifs involving SQLITE_ENABLE_LOCKING_STYLE so that they check the value of
...
that macro and not whether it is defined.
FossilOrigin-Name: 8775f159c129e1ee36a1a13c362184713376bd40
2011-04-15 14:33:20 +00:00
drh
a21b83ba3b
Make sure the unix backend returns SQLITE_FULL if write() fails with an
...
ENOSPC error code.
FossilOrigin-Name: 721e3c16b389a43f5d7c47a8fd0294473a39dad2
2011-04-15 12:36:10 +00:00
drh
50990dbb29
Add new extended error codes for I/O errors on seek and shared-memory map.
...
Add sqlite3_log() calls in the windows backend to record details of errors.
FossilOrigin-Name: fe603217fce8e3a696bd108d5ae7f7a291b7e215
2011-04-13 20:26:13 +00:00
drh
2aa5a00e70
Make sure the array of overloadable system calls is always correctly
...
sized, regardless of the compile-time configuration.
Ticket [bb3a86e890c8e96ab].
FossilOrigin-Name: c6e727ab3b16e71b0151673bb24b0bafec368ee6
2011-04-13 13:42:25 +00:00
drh
a6c47493ee
Do not override the fchmod system call in unix unless the
...
SQLITE_ENABLE_LOCKING_STYLE compile-time option is engaged.
FossilOrigin-Name: 51029d8430d2dbc782f161577d47e3dd11c4e4d7
2011-04-11 18:35:09 +00:00
dan
dc5df0f824
Fix a benign inaccuracy in the os_unix.c SQLITE_FCNTL_SIZE_HINT code.
...
FossilOrigin-Name: 61a6ccbe3c9c3ad5f35fb325e3c327cb19409925
2011-04-06 19:15:45 +00:00
dan
51438a7936
Avoid returning SQLITE_NOTFOUND when the unix xSetSystemCall interface is invoked with NULL passed as the second argument, even if all the default system calls are already installed.
...
FossilOrigin-Name: 3b91eaaa0b3c25022332ba3d1a5651848fc5d84c
2011-04-02 17:00:47 +00:00
drh
026663d305
Move a variable declaration inside an #ifdef to avoid a compiler warning.
...
FossilOrigin-Name: 7a6d05dfbc36310683dd51a280e9283cef4f9056
2011-04-01 13:29:29 +00:00
dan
ea83bc614e
In os_unix.c, do not return SQLITE_BUSY to SQLite following an error in fcntl(F_UNLCK), regardless of the value of errno.
...
FossilOrigin-Name: ff6dfe6ed74f9ff1669b2bda41d61a01cd0a1bc6
2011-04-01 11:56:32 +00:00
dan
211fb08433
Fix some problems in os_unix.c when compiled with ENABLE_LOCKING_STYLE on OSX. Also some minor issues with test scripts.
...
FossilOrigin-Name: 8088031bc949bd4efb5edf33bbd1bce5700fca56
2011-04-01 09:04:36 +00:00
dan
661d71af8c
Further tests for os_unix.c.
...
FossilOrigin-Name: a84f7711949ea3885b0e36e48118d2c76a8a5b82
2011-03-30 19:08:03 +00:00
dan
0fd7d86081
Fix a problem in the unix VFS implementation of xNextSystemCall(). Also some typos that prevent compilation when HAVE_POSIX_FALLOCATE is defined.
...
FossilOrigin-Name: bc6cce81565b17f886478bd51500bba2ed11ec1d
2011-03-29 10:04:23 +00:00
drh
58ad580ffa
Change the xSetSyscall methods of the VFS so that they do not cast object
...
pointers into function pointers. Fix other unrelated compiler warnings.
FossilOrigin-Name: e059152adce3a8fb693f082b82b5669a238c8d6f
2011-03-23 22:02:23 +00:00
drh
7719711b81
Make the "unix-excl" VFS work exactly like "unix" if the database
...
file is read-only.
FossilOrigin-Name: d9846834993079fb2e42d6bd2644b2154ef324d1
2011-03-15 19:08:48 +00:00
drh
3cb9339a6c
In the "unix-excl" VFS, use the heap for shared memory, since only a single
...
process is able to read or write the database.
FossilOrigin-Name: a05a6d40875df674f9c2b46e33128c6878d4edaa
2011-03-12 18:10:44 +00:00