Commit Graph

173 Commits

Author SHA1 Message Date
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
drh
3ceeb75680 Change the name of PAGER_SECTOR_SIZE to SQLITE_DEFAULT_SECTOR_SIZE. Make
the new OS-layer interface routine for finding sector size optional. (CVS 3750)

FossilOrigin-Name: 0fb9af1d6e20bf25511c6d2097937cc11137776e
2007-03-29 18:19:52 +00:00
danielk1977
979f38e5ee Test handling of IO errors that occur in OsDelete() or OsTruncate() operations. Also use an anonymous file for temporary storage during a VACUUM. (CVS 3729)
FossilOrigin-Name: b24a6e7b024c8b9a0b6fd15bd8f247e458781ca2
2007-03-27 16:19:51 +00:00