Commit Graph

188 Commits

Author SHA1 Message Date
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