Commit Graph

553 Commits

Author SHA1 Message Date
dan
e6ecd6630d Attempt to emulate mremap() on non-Linux systems by allocating a second mapping immediately following the first in virtual memory.
FossilOrigin-Name: 4d67433db8fb4754ae6b192945e479f3d7bad579
2013-04-01 17:56:59 +00:00
drh
6c5696381e Fix a comment in os_unix.c. No code changes.
FossilOrigin-Name: 72813b8ec924b91583c679668f7c4561dff82a02
2013-03-26 18:48:11 +00:00
drh
0d0614bdc6 Memory-mapped I/O is now on by default. The "PRAGMA mmap_limit(N)" can be
used to issue a hint to the VFS to limit mmap space to N bytes.  The VFS
is free to ignore that hint if desired.  However, if "PRAGMA mmap_limit(0)"
is used, xFetch is never called.

FossilOrigin-Name: 1b37c4effdd03aa2ea938a71b4f22ed27391689b
2013-03-25 23:09:28 +00:00
drh
d1ab8065c1 Add munmap and mremap to the set of os interfaces that can be overloaded
in os_unix.c.

FossilOrigin-Name: 8776047bd776bbf266eb9c3b56683badb84ae73e
2013-03-25 20:50:25 +00:00
dan
b7e3a326fe Use mremap() on Linux.
FossilOrigin-Name: 431aecc8600c29c203546e48d256510510238887
2013-03-25 20:30:13 +00:00
drh
dee6554811 Merge all recent trunk changes into the experimental-mmap branch.
FossilOrigin-Name: a607d63f0b6a3d3785e9385187d3e6b92e14fc70
2013-03-25 19:57:26 +00:00
dan
893c0ffc29 Add a test that simulates an error in mmap().
FossilOrigin-Name: 6ec7367d8e98425f00eeb8215ca8964313c1d0b7
2013-03-25 19:05:07 +00:00
dan
df737fe6f5 Change the signature of the xUnfetch method to "int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p)".
FossilOrigin-Name: 115b830509e8f0aa9d5965c1e9cd4f2ed9d01938
2013-03-25 17:00:24 +00:00
dan
aef49d7141 Remove unnecessary code to round the size of a memory mapping to 4KB from os_unix.c. Rename SQLITE_IOERR_MREMAP to SQLITE_IOERR_MMAP. Fix other small issues in os_unix.c.
FossilOrigin-Name: dce35c01a5fe66d2970075b1e3f0376026485e4c
2013-03-25 16:28:54 +00:00
dan
a1afc7425a Fix a case in the pager where an xFetch() reference was being leaked following an OOM error.
FossilOrigin-Name: 5885ba6ce768658ec25b60747430d147b315b55c
2013-03-25 13:50:49 +00:00
dan
f23da96636 Replace the sqlite3_io_methods.xMremap interface with sqlite3_io_methods.xFetch and xUnfetch.
FossilOrigin-Name: 1431be95579160fb70408d43e17fc23c7b69ab4a
2013-03-23 21:00:41 +00:00
dan
c00033125d Add a fix for the assert() statements added by the previous commit.
FossilOrigin-Name: 19345416ed5e1ab5b0b35993b0b9069c2fb1683b
2013-03-22 17:46:11 +00:00
dan
6101d50471 Add assert statements to os_unix.c to ensure that any mapped region of the database file is not being read or written using the xRead() or xWrite() methods.
FossilOrigin-Name: 765615f9fba7c1765eb741cb98a09a28b464ee55
2013-03-22 08:58:38 +00:00
mistachkin
48864df97d Many spelling fixes in comments. No changes to code.
FossilOrigin-Name: 6f6e2d50941e444ebc83604daddcc034137a05b7
2013-03-21 21:20:32 +00:00
dan
c71b45e619 Do not use the Linux mremap() call. Use the same strategy for xMremap() as on OSX instead.
FossilOrigin-Name: 5ed8ad780c991d2ca44003ee84350fb5e95ad58e
2013-03-21 14:47:47 +00:00
dan
d306e1a3a1 Optimize the xMremap method in os_unix.c some.
FossilOrigin-Name: 9529ed88a71fee02fae72dc86f0669bd6856ff92
2013-03-20 18:25:49 +00:00
dan
eb97b29345 When possible, use memory mapping when appending new pages to a database file.
FossilOrigin-Name: 14135da3cdbafd699563a29608f32347cda28338
2013-03-20 14:26:59 +00:00
dan
5d8a137218 Add the sqlite3_io_methods.xMremap() method to the VFS interface. Also "PRAGMA mmap_size".
FossilOrigin-Name: 6183f1bd86ceed76d22d9762f3d7eb33262c62d1
2013-03-19 19:28:06 +00:00
dan
b2d3de3bf4 Use mmap() to read from the database file in rollback mode. This branch is unix only for now.
FossilOrigin-Name: 6f21d9cbf5d457e63a7282015a89ae785526cf6d
2013-03-14 18:34:37 +00:00
drh
cfc176973e Fix an operator precedence problem on the [1d8086902e] check-in.
FossilOrigin-Name: 4f5f3aebe81c3cbe539db3e33ec38fa3de47e90b
2013-03-06 01:41:53 +00:00
dan
b83c21e600 Do not attempt to set the permissions on an existing journal or wal file. Do this only immediately after creating a new file (or opening one zero bytes in size).
FossilOrigin-Name: 1d8086902ee96347491bce5ec04dc92ccd42efa1
2013-03-05 15:27:34 +00:00
drh
503a686e09 Always use strncmp() rather than memcmp() when comparing strings where one
or other string might be less than the length parameter, since optimized
versions of memcmp() might read past the first difference and in so doing
generate an access violation.

FossilOrigin-Name: d73435587ba7459e2e2c32980d0e17abdeceb4bc
2013-03-01 01:07:17 +00:00
drh
e1186ab260 Do not use umask() since it change the umask for the entire process, not just
the thread using SQLite.  Make whatever permission changes are needed using
fchmod() after the file is created, instead.

FossilOrigin-Name: 6c4c2b7dbadedac384d380efd54f12f6ccbf4ca9
2013-01-04 20:45:13 +00:00
drh
696b33e622 Add the SQLITE_FCNTL_TEMPFILENAME file control that asks the underlying VFS
to return a new temporary filename.  Per request from NSS team at Mozilla.

FossilOrigin-Name: 1a63b1d5fa5d79f96eddbda6d94bc10248863710
2012-12-06 19:01:42 +00:00
drh
6033e15aa2 Use preprocessor macros to automatically detect whether or not
posix_allocate() is available.  (It is generally available on Linux
but not on Mac.)  Ticket [5eaa61ea1881040b17449ca043b6f8fd9ca55dc3]

FossilOrigin-Name: 597333f1024092b94bcd8772541e19a0f707bd40
2012-11-13 11:08:49 +00:00
drh
0fbb50ee15 When available, use posix_fallocate() rather than ftruncate() to allocate
space for mmap()ed -shm files, since posix_fallocate() gives an error if
no disk space is available whereas ftruncate() is silent and leaves the system
vulnerable to a SIGBUS upon first write to the mmap()ed region.
Ticket [5eaa61ea1881040b17449ca043b6f8fd9ca55dc3]

FossilOrigin-Name: 356259617cfad04492a02912fdf781f54a2b4494
2012-11-13 10:54:12 +00:00
drh
b43081675d Only log unlink() errors if the error is something other than
SQLITE_IOERR_DELETE_NOENT.  The error is still reported up the stack, it
is simply not added to the sqlite3_log().

FossilOrigin-Name: 5a3b07f0f5dfae7eea870303f52f37d6a17f1da2
2012-11-09 21:40:02 +00:00
dan
9fc5b4a539 Change os_unix.c to propagate ENOENT errors back to sqlite as SQLITE_IOERR_DELETE_NOENT. Have SQLite ignore these where they are benign and propagate them back to the caller where they may indicate a file-system malfunction of some description.
FossilOrigin-Name: bed9c172ce624ab7b5b9de9ad42444891717ad9a
2012-11-09 20:17:26 +00:00
drh
537dddf0cd Add QNX-specific performance tweaks to the unix VFS. (Cherry-pick merge of
[b02849e7bde458].)

FossilOrigin-Name: 63a7dd75e61afb3d05a1434f66ad6a5f08352aad
2012-10-26 13:46:24 +00:00
drh
5a05be1b68 Attempt to suppress warnings generated by Coverity.
FossilOrigin-Name: 7b1a6e6cb5099076bf19db142b17c99044a869cd
2012-10-09 18:51:44 +00:00
drh
c1fd2cfed2 Make sure the size parameter to read and write VFS methods in the unix VFS
do not become too big or go negative.  This was not actually possible in the
current code.  The checks are added to make sure some future bug does not
make it possible.

FossilOrigin-Name: daebe3bd2d9bd7b6f876a8110cf5045eb3fee078
2012-10-01 12:16:26 +00:00
mistachkin
d5578433ff Fix all known instances of 'repeated the' style typos in comments. No changes to code.
FossilOrigin-Name: 9b19b847533f944f289d93dcdba29c0d67bf251c
2012-08-25 10:01:29 +00:00
drh
f2f105d40e Remove tab characters from source code files. Replace them with spaces.
FossilOrigin-Name: 7edd10a960d5ff121e470b0549b0aa9fb7760022
2012-08-20 15:53:54 +00:00
drh
ed46682719 Avoid calling fchown() if the process is not running as root.
FossilOrigin-Name: 70c419a434be77b042a23174483d6a411899eb5d
2012-05-31 13:10:49 +00:00
drh
d3d8c04fd1 Changes some NDEBUG macros to SQLITE_DEBUG in os_unix.c. The is a notational
change only and really should not effect the code.

FossilOrigin-Name: 8e3025709e4954803919c84f3a810c7c63c60601
2012-05-29 17:02:40 +00:00
drh
5adc60bab0 In the unix VFS, always set every open file to close-on-exec using either
O_CLOEXEC at open (preferred) or FD_CLOEXEC in an ioctl after opening.  Before
this changes, many files were done this way, but not all.

FossilOrigin-Name: 9efbeb11ae0d480a13ff1353820c12f3a8bff452
2012-04-14 13:25:11 +00:00
drh
b8af4b7919 Ignore the value of SQLITE_FCNTL_CHUNK_SIZE if it is negative.
FossilOrigin-Name: 1b08fef9451f4d59148548faed115d1a5d0bcd98
2012-04-05 20:04:39 +00:00
drh
ef595984ec Fix a harmless compiler warning introduced by the previous check-in.
FossilOrigin-Name: a8a042a751557d06bf04455ed7629cb29adcd87f
2012-02-13 20:28:15 +00:00
drh
8c815d14f8 On unix, ignore the umask when creating journal files. That way, journal files
will have exactly the same permissions as the original database and any
process that has permission to write to the database can also recover
hot journals.

FossilOrigin-Name: 84b324606adc8437338c086404eb157f30f04130
2012-02-13 20:16:37 +00:00
dan
d3eaebd414 Fix a typo in the type of the fchown() function in os_unix.c.
FossilOrigin-Name: bfbfe05b81919ecc3d6e7be4c24994f795f16582
2012-02-13 08:50:23 +00:00
drh
23c4b97329 Make fchown() an overrideable system call in os_unix.c.
FossilOrigin-Name: 98efac9630ca96ba0497c8e206dc5022612ff381
2012-02-11 23:55:15 +00:00
drh
3ee3484c4a Silence GCC compiler warnings about unused return value from fchown().
FossilOrigin-Name: b022547389a40930cf0d2a75f5eb293acc9fbfe0
2012-02-11 21:21:17 +00:00
drh
ac7c3ac150 When creating journal files (including -wal and -shm files) try to set the
ownership to be the same as the original database.  This will prevent root
from locking out the original owner of the file.

FossilOrigin-Name: 1254dffe4071656a783cd000b1dd40c975ac18cb
2012-02-11 19:23:48 +00:00
drh
c96d1e79a8 Remove a redundant test from the shared-memory logic in os_unix.c.
FossilOrigin-Name: 31142ca795005bf664f34000591e6572c72652f2
2012-02-11 18:51:34 +00:00
drh
c18b40462b Fix an important bug in the handling of EINTR in unixRead(). Never came
up on x86 but crashes on sparc.

FossilOrigin-Name: 1a16db0bca717a2582a48332d81854ca90d6d49b
2012-02-10 03:10:27 +00:00
drh
c02a43afae Only require double-zero terminators on database filenames, not any every
files supplied to the xOpen method.  This backs out [2544f233f1].  Also
refactor the fillInUnixFile() routine in os_unix.c to reduce the number
of parameters.

FossilOrigin-Name: cb774b26e13745cfad0d76a71e47466d703e0007
2012-01-10 23:18:38 +00:00
drh
9cb5a0d989 Make sure the name of the shared memory file has two zero-terminators in the
UNIX VFS, so that sqlite3_uri_parameter() will work correctly on that name.

FossilOrigin-Name: 3d088ba5e36c0b6bccc86986f8fa9a22b340c297
2012-01-05 21:19:54 +00:00
drh
e349519f1e Change the unix VFS so that it ignores all but the least-significant bit
of the syncDir flag to xDelete.  Add an assert to prove that the core only
ever uses that one bit.

FossilOrigin-Name: e75fd3b27423272b988921ac0e272f9600818b8c
2012-01-05 16:07:30 +00:00
drh
bce51350d6 Remove the SQLITE_FCNTL_SYNC_OMITTED cases from the unix and windows VFSes
as they are no longer needed because of check-in [fd3822f1f2].

FossilOrigin-Name: 7cf568a101cda20ab6005bd250154b7f6960193a
2012-01-05 11:43:10 +00:00
drh
52bcde0e2d Make sure filenames passed into sqlite3OsOpen() always have the extra
zero-terminators needed by sqlite3_uri_parameter().

FossilOrigin-Name: d73e93cfdc9441ade77b796dcdcf6eeb753cb398
2012-01-03 14:50:45 +00:00
drh
8942d4125e Remove the code that attempts to find the sector size from the OS and
hardcode the xSectorSize methods of the unix and windows VFSes to return
SQLITE_DEFAULT_SECTOR_SIZE, which is now set to 4096 unless overridden.

FossilOrigin-Name: 03d8362cd2cadab8e1cc5b18a3194152f2bd0a84
2012-01-02 18:20:14 +00:00
drh
cb15f35f3b Change the name ZERO_DAMAGE to the more descriptive POWERSAFE_OVERWRITE.
The query parameter used to control this device characteristic is now "psow".

FossilOrigin-Name: 6191c5e45175f5c6040e891843b0725a929d6dd7
2011-12-23 01:04:17 +00:00
drh
bec7c97899 Merge the latest trunk changes into the statvfs branch.
FossilOrigin-Name: d5e36327c12f264429eb079bddbb71a310f76389
2011-12-23 00:25:02 +00:00
drh
9291372094 Add interfaces sqlite3_uri_boolean() and sqlite3_uri_int64() which are
wrappers around sqlite3_uri_parameter() combined with internal routines for
converting strings to booleans and 64-bit integers.

FossilOrigin-Name: 83d26b9a9115eadac9e59a33d608bca0ab2519e3
2011-12-23 00:07:33 +00:00
drh
f12b3f609f Add the ability to enable or disable SQLITE_IOCAP_ZERO_DAMAGE using a URI
parameter for both unix and windows.  Add a file-control to query or disable
the ZERO_DAMAGE setting.  Add the -uri option to the "sqlite3" TCL command
in tclsqlite3.c.  Allow the sqlite3_uri_parameter() interface to accept a
NULL pointer for its first parameter.

FossilOrigin-Name: c83627b73285f883719845c1b9fe85f378f28dd2
2011-12-21 14:42:29 +00:00
drh
8bbaa89d8d Add SQLITE_IOCAP_ZERO_DAMAGE and enable it for both unix and windows. Use
this device characteristic to reduce the required work in journaling.
A side effect is that this changes the default page exists back to 1024
even with the use of statvfs().

FossilOrigin-Name: a0be6ea464695fdf1eaf2b7cf0652778617814f2
2011-12-17 19:49:02 +00:00
drh
9c0e29371e Fix a bad #endif with the previous check-in on this branch.
FossilOrigin-Name: 915713ffe4d02ddf1d09a82e39a47b88d3d95ea0
2011-12-17 16:25:17 +00:00
drh
1da88f025f Add support for statvfs() in os_unix.c, for determining the sector size.
This causes many TCL test failures under Linux.

FossilOrigin-Name: e0d44450b9bec8ea7b057c1ad0a2088cd3f1f221
2011-12-17 16:09:16 +00:00
drh
a60ef3d570 Merge the nx-devkit changes into trunk. This includes the new
SQLITE_FCNTL_VFSNAME file-control.

FossilOrigin-Name: da118e02c0576ce16f7a26663f59413316223d55
2011-12-14 18:33:13 +00:00
drh
de60fc2d87 Add a file-control that will discover the name of the bottom-level VFS and
all the shims in between.

FossilOrigin-Name: cdbfb553af02d10767a905489d9dfc57fc6be54e
2011-12-14 17:53:36 +00:00
drh
73795becfe Backport a minimal set of changes needed to get 8+3 filenames and the
multiplexor shim playing well together.

FossilOrigin-Name: c4e2ce486217c96373836bfe641f46abf891799a
2011-12-12 20:01:12 +00:00
dan
28a67fd3f8 Fix os_unix.c so that, unless 8.3 filenames are actually in use, journal and wal file permissions are assigned correctly even if SQLITE_ENABLE_8_3_NAMES is defined.
FossilOrigin-Name: 169e12295cca701443746b1209bd6a7714fd8988
2011-12-12 19:48:43 +00:00
drh
13e0ea9923 Fix harmless compiler warnings.
FossilOrigin-Name: 1e6a698aab9270637d3ea00fd6b0e94f4172e875
2011-12-11 02:29:25 +00:00
drh
5802464316 Make the unix VFS tolerant of read() calls that return less than the
requested number of bytes.

FossilOrigin-Name: a210695abcfa5cb04279edfd04824d881b7c4ada
2011-11-07 18:16:00 +00:00
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