1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-04-20 08:47:46 +03:00

1192 Commits

Author SHA1 Message Date
danielk1977
3b8a05f681 Modify the interface to the pager sub-system in preparation for performing IO in blocks based on sector-size, not database page-size. (CVS 3705)
FossilOrigin-Name: 7dc7658887046f066b564a5994578074a99756ba
2007-03-19 17:44:26 +00:00
danielk1977
b94bf855b2 Fix some problems with test cases in shared_err.test. Also a real bug causing a segfault after an IO error in pager.c. (CVS 3703)
FossilOrigin-Name: 9f62ef1ec385d9f1a1913439dc4c2d710373f12a
2007-03-19 13:53:37 +00:00
danielk1977
4099f6e129 Changes to support medium sector sizes larger than the database page size. (CVS 3701)
FossilOrigin-Name: 3a3e8eb25d8e04cfccc5c0513ed04efcc25d3dbf
2007-03-19 11:25:20 +00:00
danielk1977
b472117c11 Add new OS file method to return the sector-size of the underlying storage: sqlite3OsSectorSize() (CVS 3700)
FossilOrigin-Name: 5752d84d374205e011d49b0221d6237967fe0743
2007-03-19 05:54:48 +00:00
drh
a7aea3dd52 Fix the pager so that it handles persistent I/O errors correctly.
Update the testing infrastructure so that it tests for persistent
I/O errors instead of just transient errors. (CVS 3690)

FossilOrigin-Name: ea8507a796c65041f7e720edea89f919fca1a028
2007-03-15 12:51:16 +00:00
drh
3f56e6ebac Enhanced temp-file security under unix. There are no known attacks against
prior versions - this check-in is just an added precaution. (CVS 3687)

FossilOrigin-Name: 5af61402f65bddc4040a20470f267c9404cba631
2007-03-15 01:16:47 +00:00
danielk1977
8186df86ee Use heap instead of stack for large buffers in the pager. Fix for #2262. (CVS 3673)
FossilOrigin-Name: dfe1dffa4515ed6494055887d351863fe0cdb87f
2007-03-06 13:45:59 +00:00
drh
0787db6519 Changes to the btree and pager that reduce the amount of I/O when dealing
with the freelist.  (1) Avoid journaling pages of a table that is being
deleted.  (2) Do not read the original content of pages being pulled off
of the freelist. (CVS 3671)

FossilOrigin-Name: 2ba5be311945a4c15b6dce7c01efefb513b9a973
2007-03-04 13:15:27 +00:00
drh
602c237461 Additional I/O Tracing support. (CVS 3667)
FossilOrigin-Name: ed915f579a8e5b75681a9a6012b5041500cad36c
2007-03-01 00:29:13 +00:00
drh
b0603416dc Add the undocumented and experimental I/O tracing interface. This
interface is likely to change and may be completely abandoned in the
near future. (CVS 3665)

FossilOrigin-Name: 007ca283892a66dd8b9e0dfece4f75d0d08a4300
2007-02-28 04:47:26 +00:00
drh
24c9a2eeb2 In the btree.c, when releasing the page1 lock, first make sure the
pager has not reset and released the lock already.  This fixes a bug
introduced by (3549). (CVS 3563)

FossilOrigin-Name: 36a2db96efa7f227c0a39e58fd83d56cc491472b
2007-01-05 02:00:47 +00:00
drh
c2ee76cb1c Fix a memory leak introduced by the latest changes to pager.c. (CVS 3554)
FossilOrigin-Name: 8cad5d671be9be3f7dd7dab99ad65c0fa21931ad
2007-01-04 14:58:14 +00:00
drh
bafda0962e Additional changes in the pager and os interface layers to fix problems that
might be contributing to recently observed database corruption. (CVS 3549)

FossilOrigin-Name: a593d5743eab12c0f93a7bc436f0d69dfab0c387
2007-01-03 23:36:22 +00:00
drh
1aa2d8b55b Make sure that the database size cache in the pager is invalidated whenever
the database is unlocked.  A stale value in the database size cache can
result in database corruption on a heavily loaded system running
autovacuum. (CVS 3548)

FossilOrigin-Name: 6806b9ecb5e3b90e793c5862404e76485df33b25
2007-01-03 15:34:29 +00:00
drh
588f5bc31b Update the vtab_err test to check for -DSQLITE_MEMDEBUG=1 and skip the tests
if missing.  Pager is more careful to clear its file size cache.  Remove
an assert() in VDBE that might fail on a corrupt database file. (CVS 3547)

FossilOrigin-Name: bf1afd016ad71dac90e58540122108f92e77ce3d
2007-01-02 18:41:54 +00:00
drh
d3627afc47 Speed improvement: do not journal or rollback pages that are pulled out of
the freelist. (CVS 3531)

FossilOrigin-Name: 4dffc4c3c9c4ccc024669cec204c68e953333563
2006-12-18 18:34:51 +00:00
drh
600123299e Make the pager sector size configurable at compile-time. (CVS 3517)
FossilOrigin-Name: 6221cf4f52e79f53043b7c10daedf2755d8fb167
2006-11-23 11:58:44 +00:00
drh
551b77365e Use the difference between the SQLITE_IOERR_SHORT_READ and SQLITE_IOERR_READ
returns from sqlite3OsRead() to make decisions about what to do with the
error. (CVS 3503)

FossilOrigin-Name: 6324ea811eec1200cee89e6f377368eaf2fcda77
2006-11-06 21:20:25 +00:00
drh
fa7d4acf0b Report the error SQLITE_CORRUPT instead of SQLITE_IOERR if unable
to rollback a hot journal that was damaged (for example) by filesystem
corruption following a power failure. (CVS 3460)

FossilOrigin-Name: 70501e4ea588ed762e4f6bc211ce63397faa3367
2006-10-03 19:05:18 +00:00
drh
e49f982792 Bug fix and better testing of the extended result codes. (CVS 3423)
FossilOrigin-Name: 78ae74db1cbf605cd421e7ea321e879d3638968e
2006-09-15 12:29:16 +00:00
drh
4ac285a1c2 Add support for extended result codes - additional result information
carried in the higher bits of the integer return codes.  This must be
enabled using the sqlite3_extended_result_code() API.  Only a few extra
result codes are currently defined. (CVS 3422)

FossilOrigin-Name: ba579ddc4361fc6e8ea66f9385770d70dfe94751
2006-09-15 07:28:50 +00:00
drh
0f7eb61108 Remove most static and global variables from a pure build. There
are still a number of static and global variables used for testing. (CVS 3342)

FossilOrigin-Name: 76e4d4187779097954038e444111f837737e789c
2006-08-08 13:51:43 +00:00
drh
3765df48c3 Changes to get tests to pass with OMIT_VIRTUALTABLE. Ticket #1877. (CVS 3318)
FossilOrigin-Name: 60616496b7d97fdda99262e2bab25e625151e857
2006-06-28 18:18:09 +00:00
drh
dc3e10b9c9 Write database pages in sorted order to reduce file fragmentation.
This is an experimental change.  It is not clear if it will help any.
It may well be removed in the future. (CVS 3255)

FossilOrigin-Name: fe3e70a7275d68acb6fb8ea5d62bed3e9d8d2766
2006-06-15 14:31:06 +00:00
drh
8ca0c724b5 Automatically increase the size of the pager hash table as the number
of in-memory pages increases.  Tickets #1790 and #1799. (CVS 3180)

FossilOrigin-Name: ef8e9886f40c8528604264308f5e4734ae6706c5
2006-05-07 17:49:38 +00:00
drh
605ad8fb69 Faster :memory: database COMMITs. Ticket #1790. (CVS 3178)
FossilOrigin-Name: 8f820e435272c0a4861421508c7e6f2979c2750f
2006-05-03 23:34:05 +00:00
drh
f07e7d502e Reorder code so that it compiles with SQLITE_OMIT_MEMORYDB. Ticket #1754. (CVS 3170)
FossilOrigin-Name: 1929e37d5e691f9d2bec01deb7bdbbbb6f5ace01
2006-04-07 13:54:46 +00:00
drh
d8f50c4957 Work around a bug in GCC 4.0.2. (CVS 3154)
FossilOrigin-Name: fe0920c7922bfdbefbc0107fb9170d98bec2dcef
2006-03-26 20:49:17 +00:00
drh
5229ae4df5 Get autovacuum and in-memory databases working together. Ticket #1727. (CVS 3148)
FossilOrigin-Name: 21446df6420df00468867f1131c28604a1ae91a3
2006-03-23 23:29:04 +00:00
drh
3752785f93 Fix some compiler warnings. (CVS 3140)
FossilOrigin-Name: 6c5175bc0f98e4ce715b099394f3fdc878ed82e8
2006-03-16 16:19:56 +00:00
drh
43617e9ab9 Code changes resulting from Coverity analysis.
http://scan.coverity.com/  Found 1 potential segfault in sqlite3_mprintf().
Also 2 failures to fclose() following a malloc() failure.  And lots of
cases where unnecessary conditionals could be removed from the code. (CVS 3126)

FossilOrigin-Name: e510e6dd9d6261f33b853af3b32d155b9d6b63b3
2006-03-06 20:55:46 +00:00
drh
c001c58a72 Pager performance enhancements. (CVS 3125)
FossilOrigin-Name: 9c26570743d878dee963e37728969fb30a2fb436
2006-03-06 18:23:16 +00:00
drh
580eeaf348 Additional compiler warnings suppressed. (CVS 3111)
FossilOrigin-Name: a359b1817e85a9c5f31085817ae70e3e0b8ac7a7
2006-02-24 03:09:37 +00:00
drh
74161705f1 Remove unused parameters on internal APIs. Suppress warnings from
CodeWarrior. (CVS 3110)

FossilOrigin-Name: 4b22e4b847f8d5c29830baea541194ef3a0c4811
2006-02-24 02:53:49 +00:00
drh
ac530b1ab4 Add support and documentation for the fullfsync pragma. Also include
some other unrelated documentation updates. (CVS 3080)

FossilOrigin-Name: f2069d0bf3161591535e68b7389792e9cb7fe043
2006-02-11 01:25:50 +00:00
drh
3caf58ea65 Memory DB works with autovacuum. (CVS 3041)
FossilOrigin-Name: 34dff874a2bf8331be87310809ba11d813fadb7d
2006-01-30 22:48:44 +00:00
danielk1977
f2fa8310f9 Return code was being dropped because of overridden variable in OP_IsUnique. Fix this and the test logic problem that hid it. (CVS 3025)
FossilOrigin-Name: c30705a00d7d9d61fb9cb47a1019b1a186d690a7
2006-01-24 13:09:33 +00:00
danielk1977
f011300000 Rename some variables to avoid hiding others. Also add "static" to two function signatures that were missing it. (CVS 3024)
FossilOrigin-Name: d86f18a4277ebffb644ba2e574e0b697c8bbf8e4
2006-01-24 12:09:17 +00:00
danielk1977
7d3a666f2c Add "#ifndef NDEBUG" around sqlite3pager_iswriteable() (only used in assert() expressions). Also set the internal page number of a page to zero if it fails to initialise. (CVS 3005)
FossilOrigin-Name: 77969c671c6ea1b5a2739f62de2bec10cc651b9e
2006-01-23 16:21:05 +00:00
drh
6245e0d19c Fix a bug in pager.c that was overwriting freed memory. Comment changes
in util.c. (CVS 3002)

FossilOrigin-Name: 8c7e18c3f2f0487c6125f2d12720669e4d40e760
2006-01-23 15:39:58 +00:00
danielk1977
8a7aea3bb3 Further coverage improvements for pager.c and another IO error bug fix. (CVS 3001)
FossilOrigin-Name: a9ec5ee4724ab993e71ef8b387e2d92f3e74959c
2006-01-23 15:25:48 +00:00
danielk1977
7f7bc66ef2 Do not automatically rollback at the btree or pager level if a commit fails. (CVS 2999)
FossilOrigin-Name: 0f6329ef1fe0d5b225b6381fda1e8d800f65ea0f
2006-01-23 13:47:47 +00:00
danielk1977
75bab7d64e Improve coverage of pager.c and fix an IO error handling bug found in the process. (CVS 2995)
FossilOrigin-Name: 6ec8e6b7856a0b394b8497ab9166b882f98124ba
2006-01-23 13:09:45 +00:00
danielk1977
c4da5b9f2c Fix more problems with malloc() and IO failures. (CVS 2985)
FossilOrigin-Name: 29281dea81c909b70b2d914d7061a6df8f388195
2006-01-21 12:08:54 +00:00
drh
02afc86171 More compiler warnings fixed - or in some cases comments are added to explain
that the compiler is wrong. (CVS 2984)

FossilOrigin-Name: 507653a98cbd096f836a977408e373640c7cdb8f
2006-01-20 18:10:57 +00:00
danielk1977
97a227c996 Fix another couple of IO or malloc() failure problems in a shared-cache context. (CVS 2982)
FossilOrigin-Name: 7e34163a65a5842ecc50a14a9d60601e7c9d3249
2006-01-20 16:32:04 +00:00
danielk1977
07cb560b23 Handle some of the IO error conditions that may occur in a shared-cache context. (CVS 2980)
FossilOrigin-Name: 97491d4eb5fc24d8f5cc7605db844359ecc6a818
2006-01-20 10:55:05 +00:00
danielk1977
76e8d1a292 Include the ThreadData structure in internal malloc() testing. Also fixes for revealed bugs. (CVS 2974)
FossilOrigin-Name: c7b9d50d0a975912776aaa2b870308652f77e1e6
2006-01-18 18:22:43 +00:00
drh
757b04ed36 Modify the sqlite3OsInMutex os-layer interface to take a single parameter
to distinguish between mutexes held by the current thread and mutexes held
by any thread.  Part of the fix for ticket #1630. (CVS 2973)

FossilOrigin-Name: e1ad9df1cf46287f2a7789275e98d28e05880e17
2006-01-18 17:25:45 +00:00
danielk1977
9e12800dec Use a global variable protected by a mutex instead of thread-specific-data to record malloc() failures. (CVS 2972)
FossilOrigin-Name: ac090f2ab3b5a792c2fdf897e10060f263e0d408
2006-01-18 16:51:35 +00:00