drh
f759bb83d4
Further updates to the sqlite3_pcache_methods documentation, plus the addition
...
of a few evidence marks related to pcache.
FossilOrigin-Name: 34edb54bb03ad4e54f2e4de12d767e6fa8822ba4
2010-09-09 18:25:34 +00:00
dan
026e598d0f
Store the MemPage structure in memory following, instead of preceding, the page data for cached pages. This reduces the likelihood of a corrupt database page image causing SQLite to read past the end of a buffer.
...
FossilOrigin-Name: 0ce42e76654d9ba52dac74c940d38b17866016ba
2010-06-10 06:53:26 +00:00
drh
f3609eeba7
Put an ALWAYS() around a condition in pcache.c that must always be true in
...
the current implementation.
FossilOrigin-Name: 88810cd091b33f2c56f842e32cafbac5d34d7412
2010-03-19 19:23:51 +00:00
drh
2ec050c5b1
When TEMP files are in memory, also put the massive TEMP file used by
...
the VACUUM command in memory.
FossilOrigin-Name: 9daf4e7d07769f25b3a579d80e7fada4e52344b1
2010-03-02 23:34:54 +00:00
drh
a963896796
Fix a performance glitch that appears for large transactions.
...
FossilOrigin-Name: 26cb1df73504d5d883cf0967e57b46aa062d0b00
2010-02-04 17:38:31 +00:00
drh
c81c11f62c
Remove the obsolete "$Id:$" RCS identifier strings from the source code.
...
FossilOrigin-Name: f6c045f649036958078cb15cd9d5453680c82b0c
2009-11-10 01:30:52 +00:00
danielk1977
750e87df2e
Add files that should have gone in with the previous checkin. (CVS 6935)
...
FossilOrigin-Name: 64c7afc704e95e13fb3315be402525d277a0d8d8
2009-07-25 11:46:48 +00:00
danielk1977
89bc4bc645
Change getAndInitPage() (btree.c) to use only PagerAcquire(), not PagerLookup() and PagerAcquire(). (CVS 6916)
...
FossilOrigin-Name: 0b41dfc066b60ccabbf1a9ab4db41ebcb73a2799
2009-07-21 19:25:24 +00:00
drh
e64ca7ba11
Code simplifications and comment improvements in support of structural
...
coverage testing. (CVS 6899)
FossilOrigin-Name: 945251798144110787b197f9eb552a2dd4a25cb4
2009-07-16 18:21:17 +00:00
drh
8711c7d62e
Remove two unused lines from pcache.c. (CVS 6415)
...
FossilOrigin-Name: d5cab05c9ecbc5cb5e9ed658a55c35434717e969
2009-03-31 01:32:18 +00:00
danielk1977
e1fd508a28
Optimization: When loading a new page into the cache, avoid redundant memset() calls to zero it. (CVS 6201)
...
FossilOrigin-Name: 9c0b9f881367871105965d4268e2f2cde7f4d884
2009-01-23 16:45:00 +00:00
danielk1977
bea2a94850
Big change to make pager.c easier to follow. Unused variables removed, comments improved, etc. (CVS 6197)
...
FossilOrigin-Name: 12f7346c13c180ed73d7a2e3b590be457360254a
2009-01-20 17:06:27 +00:00
danielk1977
45d6882fd9
Revert (6187). (CVS 6188)
...
FossilOrigin-Name: a353c1ab376b159c4d12532412365318cdbdcc60
2009-01-16 16:23:38 +00:00
danielk1977
443c0597fe
This commit is an error. Reverted by (6188). (CVS 6187)
...
FossilOrigin-Name: aa67fd0cdb4f53a0c6e15c001d37554d15006718
2009-01-16 15:21:05 +00:00
drh
3d4501e573
Replace the VDBE Fifo object with the new RowSet object. (CVS 5977)
...
FossilOrigin-Name: 39a0750b49cf55e9c0927169ca47db909f5c16ea
2008-12-04 20:40:10 +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
bc2ca9eb39
Add an API to support custom page cache implementations. (CVS 5899)
...
FossilOrigin-Name: 47866d6708e9b69e367937fd85f93580fd025447
2008-11-13 14:28:28 +00:00
danielk1977
95338ab70c
Remove some asserts that refer to variables removed in (5830). (CVS 5884)
...
FossilOrigin-Name: 9d880a6fd244fb73d0fce7e8180177c54d95cde2
2008-11-11 18:43:00 +00:00
drh
4d01aeedbb
When an assignment occurs in a boolean, always test the result using "!=0"
...
to avoid confusion and make it clear that assignment is intended, not
an equality test. Ticket #3491 . (CVS 5879)
FossilOrigin-Name: 89ee5295bdea6f2c093eb6a44d69917dcc8459e3
2008-11-11 00:36:16 +00:00
danielk1977
b3175389c7
Add "pragma journal_mode=memory". Change the way rollback works for in-memory databases so that it reuses the journal_mode=memory code. (CVS 5830)
...
FossilOrigin-Name: 39ebf01addf9d0867daafd06a38719e725128f9c
2008-10-17 18:51:52 +00:00
danielk1977
71d5d2cd49
Instead of storing a pointer to the parent page in the MemPage structure, have each B-Tree cursor keep track of the ancestry of the current page. (CVS 5747)
...
FossilOrigin-Name: 40425e93421286cca1965d7a5769084526210c7a
2008-09-29 11:49:47 +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
0db8ac43b5
Give file scope to non-API routines in pcache. Ticket #3392 . (CVS 5727)
...
FossilOrigin-Name: 6521f98ac3a5cd2d959a9672cd07b1d25b82d559
2008-09-21 15:14:04 +00:00
danielk1977
eaa06f6970
Avoid parsing the structure of b-tree pages (in sqlite3BtreeInitPage) more than is necessary. (CVS 5720)
...
FossilOrigin-Name: 6b998f3066754e219c266501327e5578c9406b63
2008-09-18 17:34:44 +00:00
drh
b3df2e1cfe
Speed improvements for in-memory databases by omitting flag clearing on pages
...
where it is impossible for the flag to be set and by avoiding assert()s on
non-debugging builds. Ticket #3384 . (CVS 5715)
FossilOrigin-Name: a7fd9e622bc1050e78f227ec42b6ba90c87c865a
2008-09-17 20:06:26 +00:00
danielk1977
e598bb4639
Add a type identifier to argument sz to sqlite3PageMalloc() in pcache.c. Ticket #3383 . (CVS 5713)
...
FossilOrigin-Name: 94fde77b9a4efde5f7fb2a84fedaf38b0ebbac70
2008-09-17 11:02:57 +00:00
drh
b5774cfa8f
Adjust the page recycling algorithm so that the number of pages allocated
...
to each connection does not exceed its cache_size limit. (CVS 5701)
FossilOrigin-Name: 3bc221b940565133ae8d95f59b3b120e57df0124
2008-09-15 15:36:57 +00:00
danielk1977
5b775295f0
Modify pcache.c to work with OMIT_WSD. (CVS 5659)
...
FossilOrigin-Name: 44def90d1bd4e37ab162e16f83e23d32e86b78ab
2008-09-02 09:38:06 +00:00
danielk1977
075c23af26
Begin adding support for the SQLITE_OMIT_WSD macro. Some (many) WSD variables still need wrappers added to them. (CVS 5652)
...
FossilOrigin-Name: 573d92abb9adb1c321ebc2fcadcf14374213b093
2008-09-01 18:34:20 +00:00
danielk1977
062d4cb0ae
If a page is made eligible for recycling when more than the configured maximum number of pages are allocated, free it immediately instead of adding it to the LRU list. (CVS 5638)
...
FossilOrigin-Name: 4b12922dcb4547bf3a7276d0542b2e1d12ad338d
2008-08-29 09:10:02 +00:00
drh
570f5c7d70
Partial fix for a bug in recovery from xStress failures in pcache. (CVS 5635)
...
FossilOrigin-Name: 44193b92770062271711570d8532fa5af5f5da54
2008-08-28 17:46:18 +00:00
danielk1977
29e2d6a5e6
Fix mutex related bug in pcache.c to do with handling IO errors. (CVS 5632)
...
FossilOrigin-Name: 5e304fed275137f98be56f475504422d1f5113a4
2008-08-28 11:12:09 +00:00
danielk1977
f599a1994c
Enable the disabled asserts added by (5629). Add extra tests to thread003.test. And the required modifications to pcache.c. (CVS 5631)
...
FossilOrigin-Name: 473c09fac22ed2f56ea86150a60b9f0f2263c889
2008-08-28 10:21:16 +00:00
danielk1977
51d2d03636
Fix a threads/mutex problem in pcache.c. (CVS 5630)
...
FossilOrigin-Name: 1928f15b78eee0fbf0a8ecdbbdd38dbbde2942b8
2008-08-28 08:31:48 +00:00
drh
a85f7e36e8
Miscellaneous cleanup in the new pcache code. (CVS 5629)
...
FossilOrigin-Name: da1777259f53c2e20c7ced06bf6f2a550f0ea0fc
2008-08-28 02:26:07 +00:00
danielk1977
468c82bc50
Modifications to malloc5.test to account for the fact that sqlite3_release_memory() no longer reclaims dirty pages. (CVS 5625)
...
FossilOrigin-Name: b01c65b065c62e3dd71e88866a953668b5e2f25f
2008-08-27 16:38:56 +00:00
danielk1977
a1fa00d95f
Use a bitvec object to store the set of pages with the 'always-rollback' property for a transaction. (CVS 5622)
...
FossilOrigin-Name: 9e9325997e11a0368721ed7860f4c37de3502a9b
2008-08-27 15:16:33 +00:00
danielk1977
4abdfa45db
Remove unreachable branches from pcache.c. (CVS 5620)
...
FossilOrigin-Name: 7de32498b349e046c5c886de255bbdefd6a7e8f7
2008-08-27 09:44:39 +00:00
danielk1977
29f55ae1e4
Disable some very expensive asserts in pcache.c that are too slow for all.test. (CVS 5616)
...
FossilOrigin-Name: 555dad900fad874099556d44c464ea9f64687ca0
2008-08-26 19:07:59 +00:00
danielk1977
d491e1bfd1
Simplify the pcache module by only recycling clean pages from 'other' caches. This commit causes errors in test files ioerr5.test and malloc5.test because they test recycling dirty pages from other caches. (CVS 5615)
...
FossilOrigin-Name: 9e511e161bcb077450d31fca5dd20c2557f103b3
2008-08-26 18:05:48 +00:00
danielk1977
502b74309a
Pick up a small performance increase by eliminating the pcacheRef() function. (CVS 5609)
...
FossilOrigin-Name: e3840fbf0adf824941a4b9b3cac3a869f195d6f8
2008-08-25 14:49:42 +00:00
danielk1977
8c20014a0a
If the sector size is greater than the database page size, SQLite journals all pages that lie within a sector before writing to any of them. This change ensure that a journal sync does not occur halfway through journalling the set of pages that belong to a single sector. (CVS 5605)
...
FossilOrigin-Name: 16f612d61e00938f29ecae4ebfe598be7a8709a8
2008-08-25 07:12:28 +00:00
danielk1977
33e3216a3d
Instead of marking a page as clean when sqlite3PagerDontWrite() is called, set a dedictated flag - PGHDR_DONT_WRITE. (CVS 5604)
...
FossilOrigin-Name: a323bd29a600abddbcc2cc9961ab84d82cccc5e5
2008-08-23 18:53:08 +00:00
drh
ee76c61657
Remove dead code. (CVS 5601)
...
FossilOrigin-Name: 6de9c084fc533fbb22af6a4cd3e4e9a461b13876
2008-08-22 17:34:45 +00:00
danielk1977
ed2781e3c8
Relinquish the pcache mutex before calling an xStress callback. This ensures that the pcache mutex is never held while IO is performed. (CVS 5599)
...
FossilOrigin-Name: 8fe234b2ca1292955162d38922a45c93004fb6ae
2008-08-22 17:09:49 +00:00
danielk1977
a858aa2e8c
When recycling a page, try to find one that does not require a call to xSync() on the journal file. Also simplify some of the mutex related things in pcache. (CVS 5597)
...
FossilOrigin-Name: 93dbc5427bebaa0b3d726731027caad3f70611c7
2008-08-22 16:22:17 +00:00
drh
777c5386c3
Move date+time functions to start-time initialization. Additional
...
start-time function cleanup. (CVS 5585)
FossilOrigin-Name: 80d6a31cb3851704c09ac9d99fe4bc241df3c180
2008-08-21 20:21:34 +00:00
danielk1977
801880f66c
Fix soft-heap-limit related test suite failures. (CVS 5582)
...
FossilOrigin-Name: 2091d9a5260b1d7e27ff5ca93e60dae1e3b12081
2008-08-21 15:54:01 +00:00
drh
69556698e0
Patch to mkfunction to try and detect miscompiles. Add an unimportant
...
assert back to pcache.c. (CVS 5577)
FossilOrigin-Name: a2f375fffb49b6f6adbfd59d24e9c6a170fd5ebb
2008-08-21 12:32:11 +00:00
danielk1977
67e3da7ad4
Fix the functionality associated with sqlite3_release_memory() and sqlite3_soft_heap_limit(). It is automatically disabled if the SQLITE_CONFIG_PAGECACHE option is used. (CVS 5576)
...
FossilOrigin-Name: d025866b09352b32a6d35b97144eaad2fafb7165
2008-08-21 12:19:44 +00:00