Commit Graph

475 Commits

Author SHA1 Message Date
drh
1b78eaf0ba Update header comments in wal.c to correctly describe the WAL file format.
Update the locking region offsets in os_unix.c and os_win.c and add assert()
statement to verify that the locking region offsets are correct.

FossilOrigin-Name: 40030c0739f821ea8ee188c28c579507f10448bc
2010-05-25 13:40:03 +00:00
drh
c527669df5 Comment out the SQLITE_FCNTL_SIZE_HINT from os_unix.c since it does not
seem to provide any performance gain there.

FossilOrigin-Name: 7d01309da658d6b658c1b2e53bbdc5112fb0a4d9
2010-05-21 18:24:06 +00:00
drh
286a288493 Add a new xShmBarrier method to the VFS - a shared-memory fence operation.
Implement the same in both unix and win32.  Use it to make the WAL subsystem
more robust.

FossilOrigin-Name: 1bd011c9fed5ef29fb616b4d0a52df3b82221b1f
2010-05-20 23:51:06 +00:00
drh
9ff27ecdb2 Add the SQLITE_FCNTL_SIZE_HINT operator to sqlite3_file_control() and use it
to give the VFS hints about the ultimate size of a database file when the
file is growing.

FossilOrigin-Name: 2b7e3b4a30d6a7c4a8a4b8e7dd2ed728b565c96d
2010-05-19 19:26:05 +00:00
drh
5939f44375 Mark the shared-memory in the WAL implementation as volatile.
FossilOrigin-Name: 0a6787908e989bd5e6af25acbdc59ebc8fa61d6d
2010-05-18 13:27:12 +00:00
drh
ff59a114bd Fix a typo that (by bad luck) was not a syntax error but which caused some
important lines of code to be skipped when SQLITE_DEBUG was not used.

FossilOrigin-Name: 9ef99d97d25aae81df971d40ad10c544b8f30053
2010-05-14 20:15:51 +00:00
drh
d91c68f6cc Simplifications to the SHM implementation in os_unix.c, taking advantage
of the removal of the LinuxThreads mess.

FossilOrigin-Name: d1debe5def82a6bc72f11b8787176ac60259630f
2010-05-14 14:52:25 +00:00
drh
8af6c228f8 Simplify os_unix.c by removing support for LinuxThreads. Linux systems must
either use NPTL or else not share database connections across threads.

FossilOrigin-Name: e294b696ba91512b1ca5547774c51ea07b4cb5bc
2010-05-14 12:43:01 +00:00
drh
308c2a5c0f Change the OSTRACEn() macro to OSTRACE(()). Also rename some internal fields
and variables in os_unix.c to be more meaningful and searchable.

FossilOrigin-Name: 5fe529f239cddbf4b7ea57abb02d95cc0d94f5f5
2010-05-14 11:30:18 +00:00
drh
a925fd256b Change the xShmSize() implementation in os_unix.c so that it will only
increase and never decrease the size of a shared-memory segment.

FossilOrigin-Name: 149d2ae4a6fe2f86822f286d2a7092c51bec7ebb
2010-05-13 08:33:35 +00:00
drh
d9e5c4f6ed Refactoring the VFS-SHM methods used by WAL. This version compiles and
runs non-WAL test cases but crashes and burns on wal.test.

FossilOrigin-Name: 2b00152c1ac0b3735aa6cfab61259ff04d81c701
2010-05-12 18:01:39 +00:00
dan
97c1f6c8f2 Have os_unix.c use the suffix "-wal-index" for wal-index files instead of "-wal-inde".
FossilOrigin-Name: 885e854e7cdc79ecc9d5772d563ddc0f61753ab6
2010-05-11 16:29:54 +00:00
drh
09b1330026 Fix an off-by-one error while constructing the name of the mmap file for
the wal-index under os_unix.c.

FossilOrigin-Name: 6e3735f72cb7d2f4d16c8f9bc59ff159c75243e5
2010-05-10 19:51:32 +00:00
drh
1c5bb4d69c Fix an uninitialized variable in OSX proxy locking.
FossilOrigin-Name: 96d6eaf4d2be453191b36875811d9556ad0763ed
2010-05-10 17:29:28 +00:00
drh
e874d9ed79 Change the xShmOpen() method of the VFS to take the database file name as
its argument, not the WAL file name.  Also fix some unrelated compiler
warnings.

FossilOrigin-Name: a65c2939267ef6acec4e355a207f98f217e263d6
2010-05-07 20:02:23 +00:00
dan
65be0d8cce Instead of transitioning to RECOVER state from CHECKPOINT when a recovery is required, perform the recovery while holding the CHECKPOINT lock.
FossilOrigin-Name: bb0b6021e721c2e4f1533ab18381604c6b7b31d5
2010-05-06 18:48:27 +00:00
drh
ccd13d1f80 Further simplifications to the SHM locking logic. Remove the SQLITE_SHM_QUERY
option.  Unify the WRITE to READ and RECOVER to READ transitions.

FossilOrigin-Name: e9bfa6e4ce7d1edc6be8b9173ac3b6bfd180632a
2010-05-05 19:09:49 +00:00
drh
4bc79def36 Simplifications to the SHM locking implementation in os_unix.c.
FossilOrigin-Name: 9de05bfb09e29bafdf5782263330fe8eefcfaba3
2010-05-05 18:20:07 +00:00
drh
0dcb0a7d7b Fix a bug in the xCurrentTime() method of the os_unix.c VFS.
FossilOrigin-Name: 551df11a5613e3edc6c5de44f0ac6abc2d0e6cdf
2010-05-03 18:22:52 +00:00
dan
76ed3bc044 Fix a couple of errors in WAL code that can occur in an OOM situation.
FossilOrigin-Name: 9d3f3736be42ef8ab48b099d4712e08dfca97873
2010-05-03 17:18:24 +00:00
drh
1fbe0f2a8f Change the VFS definition so that all methods take a VFS object pointer as
their first parameter.

FossilOrigin-Name: 43b5b07f0d996d7ef7426346b1792e9ca898f487
2010-05-03 16:30:27 +00:00
drh
b7e8ea2015 Use VFS method xCurrentTimeInt64 instead of xCurrentTime when it is available.
Provide an implementation of xCurrentTimeInt64 for os_unix.c.

FossilOrigin-Name: ab77b3ae6da3370d8bc3b2c9c0edc723b69f5a95
2010-05-03 14:32:30 +00:00
drh
2d536e187f Change the SHM interface so that it does not take the name of the shared
object but rather the name of the WAL file and derives its own name from
that.  Remove the xShmDelete method from the VFS and replace it with a
delete flag on xShmClose.

FossilOrigin-Name: 94dea5f9c11a68564220cec76ac3fae2ba90e907
2010-05-01 20:17:30 +00:00
drh
f72a8751c9 Remove the xShmPush and xShmPull methods from the VFS.
FossilOrigin-Name: 69e07fdbde5054593de948b76dfac157cf5d4058
2010-05-01 18:23:08 +00:00
drh
bee6f4ebe2 Define an invariant to guarantee deadlock-free operation of SHM in os_unix.c
and check that invariant with assert() statements.

FossilOrigin-Name: 6af2dca75b8139134ea394c1d71aefc6523f02e9
2010-05-01 17:57:36 +00:00
drh
77b95a379c Rework mutexes on the SHM implemention for os_unix to avoid a deadlock during
WAL recovery.

FossilOrigin-Name: 1a0f69bef2c489e81a3d4b910b426972e9ed4054
2010-05-01 17:50:37 +00:00
dan
5cf53537a8 Support compile-time option SQLITE_OMIT_WAL, for building without WAL support.
FossilOrigin-Name: 9b230c43dfa112e3e1589f9775926807bd36b36e
2010-05-01 16:40:20 +00:00
drh
6dea3248ae Change the SHM VFS logic in os_unix.c so that it does not hold an exclusive
lock n the mapped memory when also holding a CHECKPOINT lock.  This
improves concurrency between readers and checkpointers.

FossilOrigin-Name: 8660cda6f8ef43bd276897ef3b5fc2376b5684dc
2010-04-30 17:47:51 +00:00
drh
400df2ea70 In the debugging output for SHM-LOCK in os_unix.c, use symbolic names
for the lock states rather than raw numbers.

FossilOrigin-Name: 2afc33de2b2012d034fb0d2057a5a45e304516ca
2010-04-30 16:48:19 +00:00
dan
43a56b812c Fix a problem in the previous commit. Both unixShm.lockState and unixShm.readLock should be set to READ when downgrading from a WRITE to a READ lock
FossilOrigin-Name: 90119fecbce06c8db82194dfd9d5045be29b1cda
2010-04-30 16:41:53 +00:00
dan
78daa5a7d9 Fix a bug whereby upgrading from a READ_FULL to a WRITE lock, and then back to a read lock was dropping all WAL locks.
FossilOrigin-Name: 55f5af5e174df7a28deeb36faa51138926669897
2010-04-30 16:38:59 +00:00
drh
d749084ad0 Fix a couple uninitialized variables in the xShmLock method of the unix VFS.
Improved debugging logic for xShmLock.

FossilOrigin-Name: 69567c5fca9e30b7660e6f56350be929c3890d7e
2010-04-30 15:54:46 +00:00
drh
5530b764a8 Separate the concepts of underlying storage size and mapped size in the
VFS shared-memory implementation.

FossilOrigin-Name: 4cbe49f13fed288f94ff305bcfd99df907bf7baf
2010-04-30 14:39:50 +00:00
dan
87bfb51ef8 Add a missing walIndexUnmap() call to the checkpoint code. Change a couple of SQLITE_CANTOPEN constants to SQLITE_CANTOPEN_BKPT.
FossilOrigin-Name: 1f9e8c5c27ae2c68bc01d8e2bb2c662be7b3f161
2010-04-30 11:43:28 +00:00
dan
e93808dde2 Add missing mutexes to unixShmClose().
FossilOrigin-Name: a4741cb54dd5e753d48fd05ac9dbe27ee4aa1ec0
2010-04-30 10:06:09 +00:00
dan
4c97b53425 Fix a couple of assert() statements in os_unix.c and wal.c. Combine sqlite3WalIsDirty() with sqlite3WalUndo().
FossilOrigin-Name: a8f958be804ee05c4137b3cd110db344713af5f2
2010-04-30 09:52:17 +00:00
dan
ba51590bcd Add a missing walIndexUnmap() to sqlite3WalSnapshotOpen().
FossilOrigin-Name: 72b95fde15dae56390dc8d4168fb2757447e289e
2010-04-30 09:32:06 +00:00
drh
79e6c78ccc The first 6 WAL tests now work. It's a start.
FossilOrigin-Name: a92c1851da10acf51e7f6f086b8a23bd731940b3
2010-04-30 02:13:26 +00:00
drh
7ed91f2344 Refactor wal.c to use the VFS. This check-in compiles and links and works
ok as long as you leave WAL turned off, but WAL does not work.

FossilOrigin-Name: 62db5fa3b61be885b2d94e9b9ce3877b2c588350
2010-04-29 22:34:07 +00:00
drh
31cbbbad1c Untested implementation of the shared-memory dead-man-switch.
FossilOrigin-Name: 706611283ea2575c2942543391026b36061cfc1c
2010-04-29 16:40:51 +00:00
drh
7b6944047e Progress towards a VFS that will support WAL. Locking code is in place
but is untested.  Still no support for the DMS.

FossilOrigin-Name: 1bde41cf081570ad257f927b641e752dff4ed014
2010-04-29 15:17:48 +00:00
drh
9beb1584bd Changes to the interface design for the xShmLock method of the VFS.
FossilOrigin-Name: 348409de26eafe12f5cb1236e8e167a4183d4051
2010-04-28 17:21:33 +00:00
drh
af75c8695b Add the xShmRelease() method to the VFS. The os_unix.c implementation of
the shared memory logic is still non-functional.

FossilOrigin-Name: ed715b47c5f7657fbf901805981867898054b14d
2010-04-27 11:49:27 +00:00
drh
f2424c521b Begin moving WAL-specific I/O into the VFS. This checkin contains VFS
infrastructure but it is untested and is not yet hooked up to the WAL.
The version number is bumped to 3.7.0 because of the VFS extension.

FossilOrigin-Name: f5e615c28c7035a7e6d896790b51cf9bc7371d5f
2010-04-26 00:04:55 +00:00
dan
7c24610e64 Import experimental write-ahead-logging code.
FossilOrigin-Name: 409d61baeb0a19d1700c973f16c8acef7b8506cd
2010-04-12 19:00:29 +00:00
drh
f8b4d8c682 Adjustments to #ifdefs so that the #include of <sys/mount.h> is not included
twice, because that confuses the amalgamation builder.

FossilOrigin-Name: 27413fc8dd52b754b4be9344a66bb9e0d752d48e
2010-03-05 13:53:22 +00:00
drh
84a2bf67d8 Adjust some #ifdefs so that the build works on Mac both with and without
SQLITE_ENABLE_LOCKING_STYLE.

FossilOrigin-Name: 0cc981f1ccc2c99b87eb968590ad18b2d3ebf37b
2010-03-05 13:41:06 +00:00
drh
c05a9a8a57 Suppress harmless compiler warnings.
FossilOrigin-Name: fc2c63ac78ba7d48fe3232f88093e980ea34eaa9
2010-03-04 16:12:34 +00:00
drh
383d30f483 Avoid incorrect compiler warnings by doing a couple of needless
variable initializations.

FossilOrigin-Name: 8f29490da62df07ea922b03cab52b6edd2669edb
2010-02-26 13:07:37 +00:00
drh
413c3d36a2 Continuing improvements to error reporting and the sqlite3_log() routine.
FossilOrigin-Name: edea3bb740ddd096a46e00678b59d465bb1e2903
2010-02-23 20:11:56 +00:00
drh
9978c97ec5 Remove the obsolete sqlite3SafetyOn() mechanism. Add additional logging
output for CORRUPT, and CANTOPEN errors.

FossilOrigin-Name: 7c4cca6d1a23a6d1591b62f58c3716a944969947
2010-02-23 17:36:32 +00:00
dan
2b0ef4725f Change a C++ style comment in os_unix.c to use normal C style commenting.
FossilOrigin-Name: 7a1933097f2a95bd495c1621fca99e8952a1b25a
2010-02-16 12:18:47 +00:00
drh
309e6555a5 Make sure file descriptors are closed before unlinking in VxWorks.
FossilOrigin-Name: f64b81f13de4875343c752e7183bf61032dc9594
2010-02-05 18:00:26 +00:00
drh
7ed97b9de9 Move the Apple OS-X VFS changes into the trunk.
FossilOrigin-Name: 571594bfbe89d9949bdb8b07712e96d0a3467c6e
2010-01-20 13:07:21 +00:00
drh
9061ad10bc Fix a case in os_unix.c where two structures that might have uninitialized
padding bytes are compared using memcmp().

FossilOrigin-Name: e02f25560216c7c96c5e1c7e71a8531650b3a96f
2010-01-05 00:14:49 +00:00
drh
476bda7de4 In the OSTRACE debugging macros in os_unix.c, identify the VFS currently
in use.

FossilOrigin-Name: 082b8da005128f47f63e95b6b702bf4517221b2a
2009-12-04 14:25:18 +00:00
drh
3313b14f46 Fix the backup API so that a backup from an empty database to a non-empty
database works.  Ticket [0bf974bdf9].  The only changes are in assert()
statements.

FossilOrigin-Name: ddb71cd9ed395804a13dc136bb7688a7627c798f
2009-11-06 04:13:18 +00:00
drh
1d452e1de0 Fix compiler warnings. Better comments on some variables associated with
LIKE/GLOB processing in the query planner.

FossilOrigin-Name: cfa2db0ff7a94e7f66c35f672ee41cadd45a6dd7
2009-11-01 19:26:59 +00:00
drh
9b5db1dbd6 Use memcpy() rather than structure assignment so that memcmp() can later
be used for comparison.  Ticket [8550ecca70]

FossilOrigin-Name: 56f609da4bfcc794e1f8573652dcde8515e87098
2009-10-07 23:42:25 +00:00
drh
08da4bb16e Make sure the threadsOverrideEachOthersLocks variable is only referenced by
linux systems on a threadsafe compile.

FossilOrigin-Name: e9d064bd9318c2bc9248df948f71fd30f24525eb
2009-09-10 19:20:03 +00:00
dan
11b3879b18 Trying to open a transaction in one thread and close it in another is a misuse with LinuxThreads. Doing so may cause memory and file-descriptors to be leaked. Update an assert() and some test cases to account for this.
FossilOrigin-Name: ef99eb57c536d82e7c19fd3d990c17793cc64a3f
2009-09-09 18:46:52 +00:00
drh
3f022189dd Suppress some harmless compiler warnings.
FossilOrigin-Name: f0c72a53c5d57d7487b48a06a40816153f47aaac
2009-09-09 16:10:50 +00:00
drh
0c2694b744 Add the "unix-wfl" VFS that does whole-file locking in order to help NFS
do better cache coherency.

FossilOrigin-Name: 2aeab80e5b84f5e94c5c99b4adeca805601c844b
2009-09-03 16:23:44 +00:00
drh
2238dcccc7 Patch to the named semaphore locking mechanism used by VxWorks.
FossilOrigin-Name: 609c5341bea16e4e8bcd15388b209c753ca9e0bb
2009-08-27 17:56:20 +00:00
dan
15edd587fd Fix a bad interaction between "proxy-locking" and [http://www.sqlite.org/src/vdiff/aa6acfa8caa2ef59b4c16dfe42c4b5644da96905|aa6acfa8ca].
FossilOrigin-Name: 2a5c9e1dbf7f5f4b2081c964450a9305a4516f5b
2009-08-25 05:57:47 +00:00
dan
6aa657f76b Fix some errors in [http://www.sqlite.org/src/vdiff/aa6acfa8caa2ef59b4c16dfe42c4b5644da96905|aa6acfa8ca].
FossilOrigin-Name: 82d1934a428a34c292a612fb67bbcea262990e0f
2009-08-24 18:57:58 +00:00
dan
e946c3966a Fix a problem in os_unix.c where a malloc failure could lead to a leaked file descriptor.
FossilOrigin-Name: aa6acfa8caa2ef59b4c16dfe42c4b5644da96905
2009-08-22 11:39:46 +00:00
dan
08da86a68e When a database file is opened, try to find an unused file descriptor to reuse. This change affects unix (and other systems that use os_unix.c) only. Fix for cvstrac ticket [http://www.sqlite.org/cvstrac/tktview?tn=4018|#4018].
FossilOrigin-Name: 9b4d9ab62d687289837b13b07885e72cc3abe8a9
2009-08-21 17:18:03 +00:00
dan
9359c7b7ab Add assert() statements to os_unix.c to check that the mutex is held when it should be.
FossilOrigin-Name: 11a669b6537d6bac67764fd91a319234345ac504
2009-08-21 08:29:10 +00:00
dan
3d6e060b48 Move error simulation code from the sqlite3_os_init() functions into a wrapper.
FossilOrigin-Name: 67ad21abf88abb7a3e2eacddcaf1ab5d54149807
2009-08-17 15:52:25 +00:00
dan
e1ab219309 Add tests to check that sqlite recovers from an error in sqlite3_initialize() correctly.
FossilOrigin-Name: 904a371c6c9d3f20332b37767b06161fa0a78113
2009-08-17 15:16:19 +00:00
drh
06150f95e8 Test the result of pthread_create() and do not call pthread_join() if the
thread creation failed.  Ticket #3933. (CVS 6839)

FossilOrigin-Name: 304c5110ad958b2cc1ddff30e68c8791109128b5
2009-07-03 12:57:58 +00:00
drh
0d588bbc38 Suppress some -Wextra compiler warnings from GCC. (CVS 6774)
FossilOrigin-Name: 59ec937ce226bbf6c48c5e0466d3bab48873c9ea
2009-06-17 13:09:38 +00:00
drh
0b3bf92417 Changes to allow a clean compile with no floating-point instructions
generated when SQLITE_OMIT_FLOATING_POINT is used. (CVS 6763)

FossilOrigin-Name: 1591b8322babebc45df3b799cc5e457288f28594
2009-06-15 20:45:34 +00:00
danielk1977
50c55a90d5 Fix a warning in the osx-specific part of os_unix.c. Ticket #3847. (CVS 6620)
FossilOrigin-Name: 254ca3273cfbd833de82296b4859e1ec5535e8be
2009-05-08 11:34:37 +00:00
chw
78a1318b2e Compile fixes and improvements for vxwork: fixed deadlock in semClose,
detect if fcntl is usable, fall back to named semaphores if not. (CVS 6460)

FossilOrigin-Name: efd0682b7e78acc4242cf257fc246350fc29b5c8
2009-04-07 05:35:03 +00:00
drh
577d674f1a It is OK for a unix file descriptor to be zero. It just can't be negative.
Adjust an assert accordingly.  Ticket #3781. (CVS 6457)

FossilOrigin-Name: 47aa7eb0e047e30bbf09cb08c1e48c61f8d9861c
2009-04-07 00:35:20 +00:00
danielk1977
64a54c52fe Another change related to (6401) and (6402): When an attempt to unlock a file fails in os_unix.c, close all files held open waiting for the unlock event anyway.
This prevents a file-descriptor leak when testing IO errors. (CVS 6406)

FossilOrigin-Name: 50fbcdea045f7d4266d9afa721616c720564aa93
2009-03-30 07:39:35 +00:00
drh
f48f9ca65c Previous commit ((6401)) did not quite fix the problem. This should work
better. (CVS 6402)

FossilOrigin-Name: 2e7d3cc9f04de1fe7ef95cd5736dbc409c209cef
2009-03-28 23:47:10 +00:00
drh
cd731cf540 In the unix-backend, when simulating an I/O error on an unlock operation,
still mark the connection as unlocked to avoid a future assert(). (CVS 6401)

FossilOrigin-Name: fb35cff855e17771caee2a992e7b2b4105b94862
2009-03-28 23:23:02 +00:00
drh
892404323f Use fdatasync() only on linux, unless -Dfdatasync=fdatasync is set at
compilation time. (CVS 6383)

FossilOrigin-Name: cbf2ca4cc41f1f710635b863db6e98074bd5e8bc
2009-03-25 01:06:01 +00:00
drh
4a7384a25f Rig the unix backend to use fdatasync() by default, without having to set the
HAVE_FDATASYNC macro.  Systems that do not support fdatasync() can be compiled
using -Dfdatasync=fsync. (CVS 6368)

FossilOrigin-Name: a331562727be465874a66c2c1d15ee070f96f7e0
2009-03-21 14:56:52 +00:00
drh
0b647ffd47 On unix, always use fdatasync() instead of fsync() when available, even if
the file size changes, since (we are told) fdatasync() will automatically
flush the inode when the file size changes. (CVS 6367)

FossilOrigin-Name: 0d6b11bcf67f86e5554806869d32338e5831833e
2009-03-21 14:41:04 +00:00
drh
d43fe20bc9 Suppress some compiler warnings (where possible). Ticket #3696. (CVS 6331)
FossilOrigin-Name: a2373e5409e4e59903f315a4446db8cb6ba000cc
2009-03-01 22:29:20 +00:00
drh
08c6d4468c Add assert() statements to os_unix.c which fire if there is a read or
write for the locking region of a database file. (CVS 6270)

FossilOrigin-Name: 93e792ffa88ba2e8422d041f36b70d9b2e220da2
2009-02-09 17:34:07 +00:00
danielk1977
09480a9dc2 Ignore the return structure of and F_GETLK fcntl() call on djgpp. Fix for #3642. (CVS 6268)
FossilOrigin-Name: 8227af3463ded1c52d0a16c63b8dbc516eab57f0
2009-02-09 05:32:32 +00:00
drh
eb0d74ff39 Check at the write() call to work around the msdos bug in OSX actually
succeeds and throw an error if it does not.  #ifdef out the work-around
for all platforms other than OSX.  Ticket #3633. (CVS 6237)

FossilOrigin-Name: b054b569172c53f4e185e4a64f41d08784aa0f8b
2009-02-03 15:27:02 +00:00
drh
a6d90f0ddd Remove a harmless UMR that occurs inside some debugging code. (CVS 6190)
FossilOrigin-Name: 191c399fc6354b35477ec21f685377e2af26f49b
2009-01-16 23:47:42 +00:00
drh
c7288ee0b8 Avoid using ENOTSUP on systems that do not define that symbol.
Ticket #3512. (CVS 6182)

FossilOrigin-Name: fcb6c677124102558f7a7a22bc3569b664424a4c
2009-01-15 04:30:02 +00:00
drh
8f941bc7a1 Add asserts to detect if a transaction commits without first incrementing
the transaction counter.  These asserts are intended to prevent future
problems similar to ticket #3584. (CVS 6179)

FossilOrigin-Name: b676ccfd9019e65b52251332d94de1b3018ec823
2009-01-14 23:03:40 +00:00
drh
d2cb50b74c Coverage improvements in pragma.c. Change the __DARWIN__ macro to __APPLE__,
which is available by default on Leopard. (CVS 6153)

FossilOrigin-Name: 64c56226b91e57883c8059f65330318e53376b8a
2009-01-09 21:41:17 +00:00
drh
617634eca2 Allow database files to be created in the root directory on unix.
Ticket #3570. (CVS 6141)

FossilOrigin-Name: 81014334ad57e380e21c47ad6eebe9f16b4ad24c
2009-01-08 14:36:20 +00:00
danielk1977
852e232922 Fix a variable type to prevent a warning in the proxy-locking code. (CVS 6051)
FossilOrigin-Name: d9595b961800a13c141bebdb8c0a67377f30efad
2008-12-22 03:36:59 +00:00
drh
103fe74315 Fix the TCL test harness so that it compiles and runs on OSX with
SQLITE_ENABLE_LOCKING_STYLE. (CVS 6017)

FossilOrigin-Name: 561d5de16ec07546a3bb691f308fb2495a0d0a43
2008-12-11 02:56:07 +00:00
drh
ea6788322e Never use strlen(). Use our own internal sqlite3Strlen30() which is
guaranteed to never overflow an integer.  Additional explicit casts to
avoid nuisance warning messages. (CVS 6007)

FossilOrigin-Name: c872d554930ecf221ac2be5f886d5d67bb35288c
2008-12-10 19:26:22 +00:00
drh
1875f7a3db The amalgamation now compiles cleanly on GCC with options
-pedantic-errors -Wno-long-long. (CVS 5991)

FossilOrigin-Name: 73c7302c5f76a2f61ecd75f8bda69bb500d3119c
2008-12-08 18:19:17 +00:00
drh
947bd8091b Make sure dot-lock is fully enabled when SQLITE_ENABLE_LOCKING_STYLE is
disabled.  Fix compiler warnings when SQLITE_ENABLE_LOCKING_STYLE is
disabled. (CVS 5976)

FossilOrigin-Name: 4697249fcc6041ba7d2fb89589c855a8bec71eb2
2008-12-04 12:34:15 +00:00
drh
c66d5b64de Fix a missing forward declaration that is needed when
SQLITE_PREFER_PROXY_LOCKING is defined. (CVS 5972)

FossilOrigin-Name: 24235300b3f64f0396e1016afbe31aec9ea69b62
2008-12-03 22:48:32 +00:00
drh
715ff30e27 Reorganize the proxy-locking method in os_unix.c. Additional cleanup. (CVS 5971)
FossilOrigin-Name: 31f6090e22b54d657afc8c23171d000d47850205
2008-12-03 22:32:44 +00:00
aswift
f0551ee5e4 Make os_unix compile with SQLITE_ENABLE_PROXY_LOCKING (CVS 5970)
FossilOrigin-Name: 3efedac6aa4f544d40c2f782109d4e1795e449a0
2008-12-03 21:26:19 +00:00
drh
6b9d6ddc21 Continue with the cleanup of os_unix.c. (CVS 5969)
FossilOrigin-Name: 215d36ea89078036fb66b5154f054613b735dab3
2008-12-03 19:34:47 +00:00
drh
9b35ea62c7 Continuing to refactor os_unix.c. This is an incremental check-in. (CVS 5967)
FossilOrigin-Name: c13df0311ef4f6a510f42105293f7c53c323fda8
2008-11-29 02:20:26 +00:00
drh
7708e9720b Continuing work on the os_unix.c refactoring. Removed all of the
LOCKING_STYLE_* constants and instead pass around pointers to the
underlying sqlite3_io_method objects. (CVS 5966)

FossilOrigin-Name: 1017d2fb1935a278ef442030bf7bdf5e112c566a
2008-11-29 00:56:52 +00:00
drh
734c9864cb First step in refactoring os_unix.c. This is work in progress. The code
compiles and runs on Linux and MacOSX (as long as SQLITE_ENABLE_LOCKING_STYLE
is turned off), but there are a few test failures. (CVS 5965)

FossilOrigin-Name: 7825cd63e5cb390a9c2c05957ebc9b189612f04a
2008-11-28 15:37:20 +00:00
danielk1977
c015e39ff9 Move the definition of function transferOwnership() in os_unix.c to below the static functions it calls. (CVS 5954)
FossilOrigin-Name: 622cb59791ab9f61c2e5131cb6ece5e75cdc9fae
2008-11-25 12:07:40 +00:00
drh
107886abe8 Factor out and simplify the canonical pathname logic in the VxWorks OS
interface. (CVS 5943)

FossilOrigin-Name: adb0aafaa6b1ea06541f653a2559f099fb1b2795
2008-11-21 22:21:50 +00:00
drh
6c7d5c5b33 Work toward cleaning up and refactoring the os_unix.c VFS module.
Change IS_VXWORKS to OS_VXWORKS.  The VxWorks implementation can now
be built and tested on Linux using -DOS_VXWORKS=1 -Dsem_t=int -DPATH_MAX=512 -DNO_GETTOD=1. (CVS 5942)

FossilOrigin-Name: 30a0132a83ce95d45f106fce1439e7509fdc64d1
2008-11-21 20:32:33 +00:00
drh
41022645ee Fixes to the proxy locking so that os_unix.c compiles on linux with proxy
locking omitted. (CVS 5935)

FossilOrigin-Name: 6f910b7036817f4bb4de807bf48938d20ab033cc
2008-11-21 00:24:42 +00:00
aswift
aebf413d9a Added support for proxy file locking style
Added pragma support for controlling proxy file locking
Added file control access to last errno and proxy locking
Added support for TMPDIR environment variable
Extended unit tests to cover new proxy locking pragmas and file control features (CVS 5934)

FossilOrigin-Name: b9bc36d3d5e35821ef69c0881a84c0afed253c9e
2008-11-21 00:10:35 +00:00
danielk1977
f3d3c27a0c Fix some compiler warnings that show up when building the amalgamation only. (CVS 5927)
FossilOrigin-Name: d1abe8a1c9a990b02c71d6c249436381c9fde443
2008-11-19 16:52:44 +00:00
danielk1977
a03396aafb Fix a few more compiler warnings. (CVS 5926)
FossilOrigin-Name: 70b2f6839ca97dfc08f72875283f5c75c8fcf0cc
2008-11-19 14:35:46 +00:00
danielk1977
c70dfc477f In os_unix.c, use "IS_VXWORKS" instead of "defined(__RTP__) || defined(_WRS_KERNEL)". Purely because it's easier on the eyes. (CVS 5925)
FossilOrigin-Name: 92c91a6cd7bcbe79206bdf7708fe9049a7b7fdd6
2008-11-19 13:52:30 +00:00
danielk1977
397d65f641 Eliminate some of the "unused parameter" warnings in os_unix.c. (CVS 5923)
FossilOrigin-Name: 2f5aaad90b7e3bbb31866c43db3e24a1be26f03b
2008-11-19 11:35:39 +00:00
danielk1977
62c14b3487 Changes to avoid "unused parameter" compiler warnings. (CVS 5921)
FossilOrigin-Name: 88134322c36b41304aaeef99c39b4ef5b495ca3b
2008-11-19 09:05:26 +00:00
danielk1977
00e136135e Modifications to avoid unsigned/signed comparisons in various files. (CVS 5914)
FossilOrigin-Name: 8009220c36635dd9b6efea7dc13281ca9625c40a
2008-11-17 19:18:54 +00:00
chw
971854898a Added support for vxworks >= 6.4; RTP mode tested, kernel mode untested. (CVS 5910)
FossilOrigin-Name: f45a1493636a5ee474dd6c0b5d286be2249b05aa
2008-11-17 08:05:31 +00:00
danielk1977
41a6a61d94 Change the way threadsOverrideEachOthersLocks() works to avoid trying to write-lock a (potentially) read-only files. Also, assume that on non-linux systems threads do override each others locks. Ticket #3472. (CVS 5883)
FossilOrigin-Name: 8ecae0943b06102fe22133db0dcaf58ecbd39545
2008-11-11 18:34:35 +00:00
drh
4c17c3fb11 Add documentation to make it clear that short reads from xRead in the VFS
must be zero-filled. (CVS 5867)

FossilOrigin-Name: fb311d6f4098a08f05b3fac9a2a7e2a53c38bb5f
2008-11-07 00:06:18 +00:00
danielk1977
d39fa70c79 Fix an error in (5826). (CVS 5828)
FossilOrigin-Name: 8065a92f705dfa04863ba4a828f5bd2803901be8
2008-10-16 13:27:40 +00:00
danielk1977
d138dd8687 Do not open and sync the directory in unixDelete() if the SQLITE_DISABLE_DIRSYNC option is defined. (CVS 5826)
FossilOrigin-Name: 8ef141644edc5182785c6a554222c2ffbe92fef5
2008-10-15 16:02:48 +00:00
drh
72cbd078c3 Fix the xRandomness() method on the unix VFS to return the number of bytes
of randomness obtained. (CVS 5821)

FossilOrigin-Name: b7687e2f2dfa5b0a01ba87ae0bf13684cda50499
2008-10-14 17:58:38 +00:00
danielk1977
0afae93fa4 Fix some function declarations (change "int foo()" to "int foo(void)"). Ticket #3399. (CVS 5740)
FossilOrigin-Name: 0fb98c35353d8c0a8d669bbe45fe84e3a5060621
2008-09-24 09:12:46 +00:00
drh
40bbb0a3e8 Enable the LOCKING_STYLE extensions by default on a Mac. Leave them
disabled on all other posix platforms. (CVS 5737)

FossilOrigin-Name: bae1d5b16948705b7dec7b139e3586b4b510cbfa
2008-09-23 10:23:26 +00:00
danielk1977
cd3b3c8902 Add instrumentation to os_unix.c to test that a return value of SQLITE_FULL from an xSync() callback is handled correctly. (CVS 5730)
FossilOrigin-Name: 7bd2da93c6cce52edbbe53fe26a82ad159dd6b6b
2008-09-22 11:46:32 +00:00
danielk1977
5ad6a88f59 Check if error code ENOTSUP is supported before using it. Ticket #3375. (CVS 5697)
FossilOrigin-Name: c32cb106c5d68e98f51f1eaf9ae0e2a3c36d00d6
2008-09-15 04:20:31 +00:00
danielk1977
0a732f59b0 Add support for the SQLITE_THREADSAFE=2 and SQLITE_DEFAULT_MEMSTATUS compilation options. (CVS 5676)
FossilOrigin-Name: 85c2a58901338c1c4652c2cbee51e5f48d289191
2008-09-04 17:17:38 +00:00
danielk1977
73245a7818 If SQLITE_ENABLE_LOCKING_STYLE is defined, have the os_unix.c module offer the following extra VFS implementations for explicitly selecting a locking-style: "unix-none", "unix-afp", "unix-posix", "unix-flock" and "unix-dotfile". (CVS 5674)
FossilOrigin-Name: 6e8fb64639cc7451005d9f1dd2d0ef62576abbdd
2008-09-04 06:22:25 +00:00
aswift
f54b1b341b quieting compiler warning about pointer/int conversion size mismatch (CVS 5602)
FossilOrigin-Name: f8a70501c234545b3030144ac6bcbfaa0d2b0069
2008-08-22 18:41:37 +00:00
drh
f489c45a63 Fix os_unix.c so that it will compile on Linux again. (CVS 5588)
FossilOrigin-Name: 2416708208357304904e38b2d36081a1adf5e44b
2008-08-22 00:47:53 +00:00
aswift
5b1a256663 Added SQLITE_IOERR_LOCK extended error code and support for detecting and returning errors in the os_unix lock, unlock and check reserved lock variants, also added support for populating and returning system error codes so that they can be accessed via xGetLastError, unfortunately xGetLastError can't seem to access the unixFile structure where the lastErrno is recorded. (CVS 5586)
FossilOrigin-Name: c1af14e2b6bf5af0aff3df3adbe8cb9aabe1c4a3
2008-08-22 00:22:35 +00:00
drh
5462624dc4 When opening a zero-size database on unix, write one byte into the file before
interrogating the inode number.  This works around issues with msdos
filesystems mounted on OS-X.  Ticket #3260. (CVS 5504)

FossilOrigin-Name: a480a8845fb3b49967de0790b30e6250c824b9be
2008-07-30 17:28:04 +00:00
drh
da0e768be2 In the unix OS implementation, replace inode hash tables with linked lists. (CVS 5503)
FossilOrigin-Name: db4022db64dc5864e6f1d0a20672183879ad43aa
2008-07-30 15:27:54 +00:00
drh
93a960a0a8 Remove unused code. Test coverage enhancements. Modify the algorithm used
to select column names for VIEWs of joins so that the constructed column
names omits the underlying table names. (CVS 5386)

FossilOrigin-Name: 636cd723296a8b1709011fdd99b236ffddf3f1b0
2008-07-10 00:32:42 +00:00
danielk1977
6cb427f5c4 Fix a malloc() failure related problem in os_unix.c. (CVS 5328)
FossilOrigin-Name: ba8819a6f3dbc45d88346789de42971aacc0d246
2008-06-30 10:16:04 +00:00
danielk1977
e339d65a89 Rearrange some ENABLE_LOCKING_STYLE related code in os_unix.c. (CVS 5324)
FossilOrigin-Name: f70d552bcd0df884eea2e2272bae558d35fc8845
2008-06-28 11:23:00 +00:00
danielk1977
29bafeabcd Change the OS_XXX pre-processor symbols to SQLITE_OS_XXX. Symbols "OS_UNIX", "OS_WIN", "OS_WINCE", "OS_OS2" and "OS_OTHER" are now "SQLITE_OS_UNIX", "SQLITE_OS_WIN", "SQLITE_OS_WINCE", "SQLITE_OS_OS2" and "SQLITE_OS_OTHER", respectively. (CVS 5311)
FossilOrigin-Name: cdd4cf4ce2ab363ddc3f27c5e44896e17269a161
2008-06-26 10:41:19 +00:00
danielk1977
c0fa4c5f32 Remove internal function sqlite3OsDefaultVfs(). The built-in VFS layers now register their VFS implementations by calling sqlite3_vfs_register() from within sqlite3_os_init(). (CVS 5307)
FossilOrigin-Name: 8fa33b79d7369ec5777fd9ad3349f0fa31b98fd6
2008-06-25 17:19:00 +00:00
danielk1977
59f8c08ecc Implement the 'CONFIG_SINGLETHREAD' and 'CONFIG_MULTITHREAD' configuration modes. (CVS 5234)
FossilOrigin-Name: 5059644c4bc5f6679afd939e0bc26080f42a9918
2008-06-18 17:09:10 +00:00
drh
40257ffd0a Progress toward implementation of sqlite3_config() and a rework of the
mutex and memory allocation subsystems.  This is an incremental check-in. (CVS 5218)

FossilOrigin-Name: a03c5af115889f477e17187a198a7d2d40bc76bf
2008-06-13 18:24:27 +00:00
danielk1977
bcb97fe95e Add the xGetLastError() member function to the sqlite3_vfs structure. It is neither called nor implemented at this point. (CVS 5192)
FossilOrigin-Name: b8f1da52c303de20d40aa20a7a031728d5d69af5
2008-06-06 15:49:29 +00:00
danielk1977
17b90b5316 Remove the xGetTempname() method from the vfs structure. Temp files are now opened by passing a NULL pointer as the filename to xOpen(). (CVS 5190)
FossilOrigin-Name: 5173b3e816c7eb711cd21a9068bbafb9ebb7cff1
2008-06-06 11:11:25 +00:00
danielk1977
861f74563d Modify the signatures of the sqlite3_vfs.xAccess and sqlite3_vfs.xCheckReservedLock functions. (CVS 5188)
FossilOrigin-Name: 4226ac54beea1b58de8ab7b9d768d999f50438a6
2008-06-05 11:39:11 +00:00
shane
9bcbdad298 Consolidated inline assembly versions of "hwtime()" into hwtime.h. Provided MSVC version. Modified code for consistent use of hwtime(). Changed implementation to use sqlite_uint64 and sqlite_int64 instead of unsigned long long int and long long int for MSVC compiler support. (CVS 5178)
FossilOrigin-Name: 9883b406ce24eae93942ee5e6aab33fb6b05329f
2008-05-29 20:22:37 +00:00
danielk1977
822a51628f Add more version tags to files that lack them. Ticket #3120. (CVS 5137)
FossilOrigin-Name: 81a8c70ed7a86abf286706fdbc251f31c9c53382
2008-05-16 04:51:54 +00:00
drh
65594045d0 Better error messages when trying to open a large file using a version
of SQLite that omits large file support.  Tickets #3096 and #3094. (CVS 5085)

FossilOrigin-Name: bdd89cd231745e6bd498b2751d7ff2cf6169b3eb
2008-05-05 16:56:34 +00:00
danielk1977
f96d8aebf3 Fix test for buffer overrun in unixGettempname(). Fix for #3091. (CVS 5069)
FossilOrigin-Name: fc0ca647bd1c7c953bb0f3eb7d3471572fd18c34
2008-04-30 08:56:10 +00:00
drh
2fa1868fb6 Add a new api sqlite3_randomness() for providing access to SQLite's
internal PRNG.  Add sqlite3_test_control() verbs for controlling the PRNG. (CVS 4882)

FossilOrigin-Name: 15110ea02768bfe977a57eccd6b941a36ebd6b32
2008-03-19 14:15:34 +00:00
drh
308aa32ffc Another fix to the OsUnlock I/O error logic. (CVS 4839)
FossilOrigin-Name: 22bd537ee2af6779ecb38502513ae533f85f7c2e
2008-03-07 20:14:38 +00:00
drh
1aa5af1151 Correctly handle I/O errors that occur during OsUnlock(). Before this
fix, an I/O error during OsUnlock() could lead to database corruption.
That is not a serious problem, though, since errors during OsUnlock()
are not possible on most systems. (CVS 4838)

FossilOrigin-Name: b4c1258edb4a40501d13c9da674d0366d5a8c694
2008-03-07 19:51:14 +00:00
drh
339eb0b8af Cleanup the locking-style code in os_unix.c. (CVS 4837)
FossilOrigin-Name: 40f55c09dbd31f861b9f9c7641cce92553d94e35
2008-03-07 15:34:11 +00:00
drh
218c508433 Updates to the locking-style code in os_unix.c. Not yet working. (CVS 4834)
FossilOrigin-Name: 6ebce3b798c60050fb3c583d805570bb06837108
2008-03-07 00:27:10 +00:00
drh
93aed5a177 Get all tests running without memory leaks. (CVS 4714)
FossilOrigin-Name: 5807921f5a6e2e08f2c9e79aa91d8c587d64de74
2008-01-16 17:46:38 +00:00
drh
85b623f2f9 Change all instances of "it's" in comments to either "its" or "it is",
as appropriate, in case the comments are ever again read by a pedantic
grammarian.  Ticket #2840. (CVS 4629)

FossilOrigin-Name: 4e91a267febda572e7239f0f1cc66b3102558c36
2007-12-13 21:54:09 +00:00
drh
3c7f2dc4ca Use the specified buffer length, not the maximum buffer length in
unixFullPathname() and related functions. (CVS 4595)

FossilOrigin-Name: f015a38771d98996366d66787b9b066f9ef5e248
2007-12-06 13:26:20 +00:00
danielk1977
7c055b9b7c Avoid leaking a file descriptor after a malloc failure on unix. (CVS 4518)
FossilOrigin-Name: c249d5da721b32f6fe409a5b55a5d49a58994fec
2007-10-30 17:28:51 +00:00
drh
9e0ebbfa41 Add comments to the code warning that _XOPEN_SOURCE might need to be
defined manually if using USE_PREAD or USE_PREAD64. (CVS 4509)

FossilOrigin-Name: d7ed7cd077fe5f9ffba2bca48b84b231ccfd85b0
2007-10-23 15:59:18 +00:00
drh
777b17af7e Fixes for uninitialized variables. Tickets #2658 and #2659. (CVS 4437)
FossilOrigin-Name: 27fe1288336665c4d47c5d7ddcbeacc451ec4a9d
2007-09-20 10:02:54 +00:00
rse
25c0d1a18a The code is correct as it contains an assert(3) in the "default" switch
case, but GCC 4.3 is not able to detect this and instead complains
with "warning: 'amode' may be used uninitialized in this function".
Hence, although the assert(3) already protects the code here, get rid of
this compiler warning by doing a simple initialization of the "amode"
variable. (CVS 4436)

FossilOrigin-Name: 91831ff2922666b39d8f4ba448982c6763030633
2007-09-20 08:38:14 +00:00
danielk1977
adfb9b0501 Add a parameter to specify the size of the output buffer passed to xGetTempname() and xFullPathname(). This, and the previous commit, are changes to the public vfs API introduced in 3.5.0. (CVS 4433)
FossilOrigin-Name: 8b29f5fbfc723cdf67cf3410cd01f7c17ea39a4b
2007-09-17 07:02:56 +00:00
danielk1977
76ee37f9bb Change the names of xGetTempName and sqlite3OsGetTempName to xGetTempname. To be consistent with xFullPathname and sqlite3OsFullPathname. (CVS 4432)
FossilOrigin-Name: ad3687b16e9420d8bbaa3a645aaf803813b36061
2007-09-17 06:06:39 +00:00
danielk1977
ed10afb4c0 Remove the unixFile.isOpen variable (no longer in use). (CVS 4401)
FossilOrigin-Name: 1786e9c881a67fbf8bd014d643590534c8c601dc
2007-09-05 13:56:32 +00:00
drh
70c01456e8 Unix OS interface returns SQLITE_CANTOPEN following a getcwd() failure. (CVS 4384)
FossilOrigin-Name: ed15db4610bc6202c624234e48d234e0005825e4
2007-09-03 17:42:17 +00:00
drh
33f4e02af6 Honor the SQLITE_OPEN_ flags passed into sqlite3_open_v2(). Some
test cases added but more are needed.  Ticket #2616. (CVS 4376)

FossilOrigin-Name: 020a2b10d408f51d4ef3211c5f701f5378fd4625
2007-09-03 15:19:34 +00:00
danielk1977
843e65f2fc Remove the syncOk argument to pager_recycle. Now that sqlite3_memory_release uses a global lru list of page, it is no longer required. (CVS 4364)
FossilOrigin-Name: fb27692ab10b22851b265348bb6b3e1dececd60f
2007-09-01 16:16:15 +00:00
danielk1977
95c8a54c7d Fix for registration of non-default vfs objects. (CVS 4360)
FossilOrigin-Name: 5f48fb95c26a713b3259ee49fd444108030376dc
2007-09-01 06:51:27 +00:00
drh
9e33c2c108 Remove the xLockState method for sqlite3_io_methods. Replace it with
a defined call to xFileControl().  This simplifies the interface and
also gives us coverage testing of sqlite3_file_control(). (CVS 4355)

FossilOrigin-Name: 306586c412b87c6d12bac796641517afa3f9eb6a
2007-08-31 18:34:59 +00:00
drh
cc6bb3eaeb Initial implementation of the sqlite3_file_control() interface.
Compiles and passes all historical tests but the new method is itself
untested. (CVS 4353)

FossilOrigin-Name: d3ab3e3911f10b17d0859a34f4f007c790a0cd82
2007-08-31 16:11:35 +00:00
danielk1977
2f2d8c7331 Prevent sqlite from opening directories as databases under unix. Fix for test cae in misc7.test. (CVS 4342)
FossilOrigin-Name: e30546504c59c7d92d83a32d9b7e83edc175e247
2007-08-30 16:13:33 +00:00
danielk1977
c16d463085 Remove the SYNC_BARRIER flag. (CVS 4337)
FossilOrigin-Name: 5a22d8695b49cf7bc2eee382b66a98d29adb9e6e
2007-08-30 14:49:58 +00:00
drh
46c99e0f5d Work around problem with forward declarations of constants in MSVC
in the amalgamation.  Ticket #2574. (CVS 4304)

FossilOrigin-Name: dc80b2e1f4e1d31479aad9f39e651e62f2601fb8
2007-08-27 23:26:59 +00:00
drh
50d3f9064b Added the 34to35.html document describing the changes between 3.4.2 and
3.5.0.  Minor interface cleanups. (CVS 4302)

FossilOrigin-Name: 0791f917bb18d7305b805b9cbcb308bdd7b3a1f5
2007-08-27 21:10:36 +00:00
drh
1cc8c448b5 Remove nRef and vfsMutex from the sqlite3_vfs structure. Omit the
sqlite3_vfs_release() interface.  Less memory allocated for a pager
in the common case where the size of the pathname is less than MAX_PATH. (CVS 4287)

FossilOrigin-Name: b8451da378179d43f25d9a014480c0f13dd1dc37
2007-08-24 16:08:29 +00:00
drh
153c62c461 The win32 driver compiles but does not yet work well. Many bugs
fixed. (CVS 4282)

FossilOrigin-Name: 3a68fcddfa9184e4b310ce0a21312c54b9462ec8
2007-08-24 03:51:33 +00:00
drh
4a50aac564 Improvements to memory leak detection. The --backtrace=NNN option is now
recognized by tester.tcl.  Memory leak summaries are automatically written
to the file ./memleak.txt and each leak is tagged with the test in which
it occurred.  The quick.test script runs on Linux with no errors and
no leaks. (CVS 4273)

FossilOrigin-Name: 21f6b31097692171c6493e6ca6de6acbd62dc595
2007-08-23 02:47:53 +00:00
drh
f3a65f7e44 The malloc.test script now passes all tests with no errors. (CVS 4271)
FossilOrigin-Name: db818430e9ea4ef4a4af575784009d5acae785a3
2007-08-22 20:18:21 +00:00
drh
51fc347a2e Remove the obsolete static mutexes. Use only the lastest static mutex code. (CVS 4259)
FossilOrigin-Name: 6225cd461cdd2132eeb480aa4deb8986b7f63c15
2007-08-21 13:51:23 +00:00
drh
29278e3dbb Remove unnecessary #includes of "os.h". New mutex implementations. (CVS 4255)
FossilOrigin-Name: fbbd5bda544ffec4e1b43407b12e546235dc7873
2007-08-21 10:44:15 +00:00
drh
d677b3d688 Work toward multithreading support. Currently crashes quickly on a test. (CVS 4253)
FossilOrigin-Name: 1315bd8e125602275fb718780f9b2730bd37f6ab
2007-08-20 22:48:41 +00:00
danielk1977
2a6bdf6d5b Call sqlite3OsSleep() with an argument in microseconds, not milliseconds. (CVS 4248)
FossilOrigin-Name: 917790413ced92266bf5c7cca6d130ed7ac6221b
2007-08-20 16:07:00 +00:00
danielk1977
967a4a1c96 Changes to crash-test io backend (test6.c) so that it works with the sqlite3_vfs interface. (CVS 4247)
FossilOrigin-Name: 40f66ada815fa1043d24c9cd6d898e1797e7044a
2007-08-20 14:23:44 +00:00
danielk1977
ad94b58a5e Update the locking-style code in os_unix.c. The updates are as yet untested. (CVS 4244)
FossilOrigin-Name: 41f2175b1ed7eccf271b687ee5c3ea262a0cd096
2007-08-20 06:44:22 +00:00
danielk1977
f036aef061 Fix full_fsync() related functionality broken as part of the migration to sqlite3_vfs. (CVS 4243)
FossilOrigin-Name: cb24cda179c2b526c5ac48be75e372d2b9db808c
2007-08-20 05:36:51 +00:00
danielk1977
fee2d25a70 Further progress on migration to sqlite3_vfs. (CVS 4242)
FossilOrigin-Name: a258c4ec240f96bccfe493e98d0827ec7dd12e67
2007-08-18 10:59:19 +00:00
danielk1977
90949c2003 Remove some old OsFile and IoMethod related code. Add the sqlite3OsLockState function. (CVS 4241)
FossilOrigin-Name: 08a0f48028794abbeae1b4852652062b38d37d88
2007-08-17 16:50:38 +00:00
danielk1977
b4b47411ab Begin migration to using sqlite3_vfs interface. (CVS 4240)
FossilOrigin-Name: af3e3c7acdc67013dd733effebe981620d922dd1
2007-08-17 15:53:36 +00:00
drh
dce8bdb8c0 Remove the thread specific data subsystem from the unix build. Remove
legacy cruft from sqliteInt.h.  Use the new mutex subsystem in the PRNG. (CVS 4237)

FossilOrigin-Name: 3d60c14a32955b69e714a73372924d421899f83b
2007-08-16 13:01:44 +00:00
danielk1977
1e5369531e More work on refactoring of malloc() interfaces. There are still many errors. (CVS 4233)
FossilOrigin-Name: 77b1671351fe94b0ebc126a63140643deae2aa64
2007-08-16 10:09:01 +00:00
drh
174357527a Half-way through a major refactoring of the memory allocation.
I have not even attempted to compile so I am certain there are
countless errors. (CVS 4231)

FossilOrigin-Name: deb7ecd65f7b83eaf0ba610eeef3b0ede61db1c3
2007-08-16 04:30:38 +00:00
danielk1977
6207906027 Modify the crash-recovery test code in test6.c for 3.5. Also change some other code to use the new sqlite3_io_methods interface. Lots of things are broken now. (CVS 4228)
FossilOrigin-Name: af9503daf3f7703fcddad754bc1dc9e179830b6e
2007-08-15 17:08:46 +00:00
drh
fd131daecd Remove all tabs from source code files. Ticket #2556. (CVS 4198)
FossilOrigin-Name: 7550dd1d5980a399fbb06b4ed69216700f879a0b
2007-08-07 17:13:03 +00:00
drh
e78669b6b8 Set FD_CLOEXEC on all open files under Unix. Ticket #2475. (CVS 4146)
FossilOrigin-Name: f1e5fed8eb0fb92bd0f040666c017850afe3cf9f
2007-06-29 12:04:26 +00:00
drh
63fff5f7a5 Cast the 2nd parameter of ftruncate to off_t to work around bugs in
some unix implementations.  Ticket #2425. (CVS 4089)

FossilOrigin-Name: 0b20a69609c64af922bedab381f7d075e9da4fc5
2007-06-19 10:50:38 +00:00
drh
3b62b2fa8b Use C-sylte comments exclusively, never C++ comments. Ticket #2406. (CVS 4052)
FossilOrigin-Name: 8f5b789fea23d76128c10b37158de2525a54ce20
2007-06-08 18:27:03 +00:00
drh
5bb3eb9b9a Eliminate all uses of sprintf() and strcpy(). These were not being
misused.  But getting rid of them removes a library dependency.  And
it avoids warnings from the OpenBSD compiler.  Ticket #2336. (CVS 3916)

FossilOrigin-Name: ba4845b32bdf38e623c4f7246e6e327715bbba4b
2007-05-04 13:15:55 +00:00
drh
bb5f18d2ca Additional coverage testing. (CVS 3823)
FossilOrigin-Name: 26b2e1aede3f776134b2d6e941d17a907843e650
2007-04-06 18:23:17 +00:00
drh
bdcc276e94 Do not use the second parameter to gettimeofday() on unix. Pass it a NULL. (CVS 3804)
FossilOrigin-Name: 96b678818c9a536b77f10b25256facf4bff1ff65
2007-04-02 18:06:57 +00:00
drh
61fc595fdd Fix some warnings about unused and uninitialized variables. (CVS 3788)
FossilOrigin-Name: 18aec1ddfb08b74f0ef9cf1215eac7af71449db3
2007-04-01 23:49:51 +00:00
drh
2c547df6cf Make unix builds threadsafe by default. (CVS 3787)
FossilOrigin-Name: ddfc3b2df0b37be66fc55bb216cdcb6ba67aa7fd
2007-04-01 18:46:19 +00:00
drh
a16313e505 Move the sqlite3_temp_directory global variable out of the OS porting layer
and into main.c so that it is more accessible to non-standard OS porting
layers. (CVS 3759)

FossilOrigin-Name: 23653f7aab6609f69948a7366bef9ebd0fd4d0b1
2007-03-30 11:29:32 +00:00
drh
e2396a1090 Assume any return code from fcntl() other than -1 is success. Formerly we
only assumed that 0 was success.  Ticket #2173. (CVS 3754)

FossilOrigin-Name: 8d0073c0e8408558dae39f789ac3fa2622b52365
2007-03-29 20:19:58 +00:00