1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

1674 Commits

Author SHA1 Message Date
drh
f94a173a95 Add some testcase() and assert() macros to btree.c to aid with testing
recent changes. (CVS 5757)

FossilOrigin-Name: fb461b78dfc2501fafa8bce03da5487fdfdff959
2008-09-30 17:18:17 +00:00
danielk1977
a69fda25ff Fix a comment in btree.c. No code changes. (CVS 5756)
FossilOrigin-Name: 0f3c56330b43fb7c9dc43a444ca38bace9397ede
2008-09-30 16:48:10 +00:00
drh
7b682804c7 Change leading tabs into spaces. (CVS 5755)
FossilOrigin-Name: 4e536463c1aa9991de85c7efc826c28896ca61d3
2008-09-30 14:06:28 +00:00
danielk1977
2f78fc66b5 Fix a recently introduced problem with deleting entries from index tables. (CVS 5754)
FossilOrigin-Name: 83c064cae481ca95b7107e22e98fc599fe85a2da
2008-09-30 09:31:45 +00:00
danielk1977
00a696d6d1 Remove the reparentPage() and reparentChildPages() functions from btree.c. All calls to these functions can now be replaced by a call to setChildPtrmaps(). (CVS 5751)
FossilOrigin-Name: 35e8e4dcd24b050b535ae005ca3b25e6a673eb89
2008-09-29 16:41:31 +00:00
danielk1977
bf93c56737 Remove the MemPage.idxShift variable. It is no longer required. (CVS 5750)
FossilOrigin-Name: 7354abd03be756b1d7d0a3d5b8958f5c0c985ff5
2008-09-29 15:53:25 +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
d326064e0d Performance enhancement: avoid calling reparentChildPages() from balance_nonroot(). (CVS 5743)
FossilOrigin-Name: 28fd0a50ca8529892f5b1ababd38d494889eed6d
2008-09-26 17:31:55 +00:00
danielk1977
d9f6c53232 In function moveToRoot(), use the MemPage.pParent pointers to find the root page if they are valid. This is slightly faster than requesting a new reference to the root page from the pager layer. (CVS 5725)
FossilOrigin-Name: 0c8b74e668b7462c5439c04993d1d7cd74210075
2008-09-19 16:39:38 +00:00
danielk1977
ea89730823 In sqlite3BtreeGetMeta(), if BtShared.pPage1 is available use it instead of requesting a new reference from the pager layer. (CVS 5724)
FossilOrigin-Name: 59be34cfa4fe74f7e5b547c55d273ecba9d7796c
2008-09-19 15:10:58 +00:00
danielk1977
e08a3c4f91 Fix a segfault introduced by (5720) that can follow an IO error. (CVS 5721)
FossilOrigin-Name: 05d3462688507b61710cbda27adf61d0b0514e27
2008-09-18 18:17:03 +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
897a820f46 Performance improvements in getAndInitPage(): omit the upper bound check on
page number if the page is already in cache. (CVS 5716)

FossilOrigin-Name: badd0873e6dffac9463b06a381b9f797a54d33e9
2008-09-18 01:08:15 +00:00
danielk1977
67fd7a9a98 Fix some trivial cases where database corruption was causing an error code other than SQLITE_CORRUPT to be returned. (CVS 5690)
FossilOrigin-Name: 89fda074f6b4959c32f1083badba3c73cffb4995
2008-09-10 17:53:35 +00:00
danielk1977
9f580ad886 Fix for handling database files corrupted in such a was as to make a b-tree page a direct or indirect descendant of itself. (CVS 5689)
FossilOrigin-Name: 93545861a70c190d67b0d1effdd8fe038d28811c
2008-09-10 14:45:57 +00:00
danielk1977
518002e4ba Fix a problem in btree.c preventing an OOM error from being propagated up to the caller. (CVS 5677)
FossilOrigin-Name: 0b8ee83f2ebadab099ccd6490f6995949dafdd6f
2008-09-05 05:02:46 +00:00
danielk1977
502b4e00c6 Move the sqlite3SharedCacheEnabled global and the inProgress static variable (function sqlite3_initialize()) into the global sqlite3Config structure. This is required for the OMIT_WSD feature to work on some platforms. (CVS 5662)
FossilOrigin-Name: 88c82759946910b5ffdd5febc17356403f986c2e
2008-09-02 14:07:24 +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
drh
78f82d1e6c Continuing work on adding full support for the SQLITE_OMIT_WSD
compile-time option. (CVS 5658)

FossilOrigin-Name: ef26ea5c46d3915d206f8ff7f82a24f4c8955f1f
2008-09-02 00:52:52 +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
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
daca5433a0 Fix a segfault that can occur when running integrity_check on a corrupt db. (CVS 5606)
FossilOrigin-Name: eae959ede1b2b50190c60de9249cf141c3031ce2
2008-08-25 11:57:16 +00:00
danielk1977
06249db141 Do not incorrectly detect corruption when an auto-vacuum database is converted to a non-auto-vacuum database within a vacuum. Ticket #3332. (CVS 5603)
FossilOrigin-Name: cb869946d68f2abbd1322fababbe4aa74a4e08aa
2008-08-23 16:17:55 +00:00
drh
ee76c61657 Remove dead code. (CVS 5601)
FossilOrigin-Name: 6de9c084fc533fbb22af6a4cd3e4e9a461b13876
2008-08-22 17:34:45 +00:00
drh
281b21daa6 Fix nuisance compiler warnings. Ticket #3309. (CVS 5591)
FossilOrigin-Name: 2a365e29944f9fd45ca2903875a8c2e2759c9492
2008-08-22 12:57:08 +00:00
drh
23f79d061f Modify the sqlite3VdbeUnpackRecord() interface to force the temporary
space to be 8-byte aligned.  This might be important for Sparc.
Ticket #3318. (CVS 5573)

FossilOrigin-Name: 00b177985ee08f13a7781d095936da3beaf0408c
2008-08-20 22:06:47 +00:00
danielk1977
8c0a791a58 Add the pcache module from the experimental branch. Also change things so that most of the built-in SQL functions are kept in single static hash-table, rather than creating and populating a separate hash table for each open database connection. (CVS 5566)
FossilOrigin-Name: cb494e10d71852024647aaa254203579ad438ea9
2008-08-20 14:49:23 +00:00
drh
e63d999189 Additional changes toward fixing ticket #3292. (CVS 5562)
FossilOrigin-Name: 0b92cbf5255020d4fde382f81590ff0488936667
2008-08-13 19:11:48 +00:00
drh
ec1fc80ca3 A partial fix for ticket #3292. This fixes the original problem but there
are other similar problems lurking in the code still. (CVS 5561)

FossilOrigin-Name: 055f173ab1b6fb657bf817faa3a37335d8fa60d5
2008-08-13 14:07:40 +00:00
danielk1977
a68468f5b1 Fix a reference count leak introduced by (5526). (CVS 5527)
FossilOrigin-Name: f653995c32197cacbcd14ea9e876ba5b2fde94df
2008-08-02 17:36:45 +00:00
danielk1977
f328bea9da Avoid doing IO purely to check assert() constraints. (CVS 5526)
FossilOrigin-Name: fb26ae723959390a716f221af93c6c29eec16955
2008-08-02 17:03:31 +00:00
drh
c890fec362 Bring test coverage up to 99%. (CVS 5522)
FossilOrigin-Name: 2cd6bae80984126023bcf479e5f3db5eaa5c4134
2008-08-01 20:10:08 +00:00
drh
633e6d57d9 Implement the "lookaside" memory allocation cache. Use of this cache makes
the speed1.test script run about 15% faster.  Added new interfaces to
control the cache. (CVS 5488)

FossilOrigin-Name: e48f9697e9fea339e150ddc32940760027dd07d9
2008-07-28 19:34:53 +00:00
danielk1977
85d90ca7a7 Reduce the number of "#ifndef SQLITE_OMIT_AUTOVACUUM" conditions in btree.c by using the ISAUTOVACUUM macro instead. (CVS 5444)
FossilOrigin-Name: a560c61849cb669ab03ba4a63b23369db234f329
2008-07-19 14:25:15 +00:00
danielk1977
87c52b58f0 Improve the performance of balance_nonroot() on auto-vacuum databases by reducing the number of calls to ptrmapPut(). (CVS 5442)
FossilOrigin-Name: 9992b1aecdbbc7a260f00cb6ef78b500aeab22df
2008-07-19 11:49:07 +00:00
drh
4a0611dd29 Fix SQLITE_OMIT_AUTOVACUUM so that it works again. Ticket #3228. (CVS 5439)
FossilOrigin-Name: 3b2dd417f9dab3cae3ab3693629a65a2c90f00e9
2008-07-18 17:16:26 +00:00
danielk1977
8c666b1666 Performance improvement: reduce the number of calls to ptrmapPageno() made by ptrmapPut() and ptrmapGet(). (CVS 5437)
FossilOrigin-Name: d807fb271340901bbf3e06de23d91132422d1408
2008-07-18 09:34:57 +00:00
drh
1af4a6e67a The zeroPage() routine in btree.c need not actually zero the whole page,
just the header. (CVS 5434)

FossilOrigin-Name: c69633ec6977becfbd0a72854473b7f4515fb931
2008-07-18 03:32:51 +00:00
drh
1688c86f5a Omit the check for cell-pointer consistency in sqlite3BtreeInitPage()
for a 2.5% performance gain. (CVS 5433)

FossilOrigin-Name: b88087e69dffb743c5b552703e14a030349cf65b
2008-07-18 02:44:17 +00:00
drh
79df1f4a37 Optimization to sqltie3BtreeParseCellPtr. 0.3% performance increase. (CVS 5432)
FossilOrigin-Name: 77e099ad7de84fe07dfeb4c045c769653dd13b93
2008-07-18 00:57:33 +00:00
drh
44845221ed Simplify the b-tree logic by taking advantage of the fact that all b-trees
are either intkey+leafdata or zerodata. (CVS 5431)

FossilOrigin-Name: 29d3bfd7c9a68078385354394052612bf812859b
2008-07-17 18:39:57 +00:00
danielk1977
4c99999965 Eliminate some unnecessary IO during a commit in full auto-vacuum mode. (CVS 5426)
FossilOrigin-Name: 1d01c02ab04f9cc0eb6a2a46a24d3ea63a617d5b
2008-07-16 18:17:55 +00:00
drh
e8f52c5089 Remove leftover debugging commands (breakpoint and btree_breakpoint) from
test scripts. (CVS 5400)

FossilOrigin-Name: dcb160249fa2d592ad09b8b0052102dc44a93511
2008-07-12 14:52:20 +00:00
drh
a34605859d Detect and handles the case where a row is modified or deleted while it
is being read during SELECT processing. (CVS 5399)

FossilOrigin-Name: c80a5d09935c60a2a50bc262c172a94073355f0d
2008-07-11 21:02:53 +00:00
drh
a29afcbd1e Added corruptA.test for testing malformed database headers. (CVS 5397)
FossilOrigin-Name: 6dcce6b9748c6148a768a4f6b69f33f70edc3993
2008-07-11 16:39:23 +00:00
drh
34004cebb6 Additional test coverage for the btree module. Remove the failsafe() macro
and replace it with ALWAYS() and NEVER(). (CVS 5395)

FossilOrigin-Name: d7e2f0d2d45574d6191c1b191c0daf5260696f27
2008-07-11 16:15:17 +00:00
drh
d37d79e081 Remove an extra zeroPage() call that was left in the previous check-in
by mistake.  Ticket #3209. (CVS 5393)

FossilOrigin-Name: c45d578e4475486dc5df1c1c0b6987d1cef39188
2008-07-11 03:38:41 +00:00
drh
1013148b1c Make the btree layer robust when faced with a corrupt database that
contains duplicate entries on the freelist.  Ticket #3209. (CVS 5392)

FossilOrigin-Name: 30825f74d60d8ace39bafd06814017ceefeb4fa4
2008-07-11 03:34:09 +00:00
drh
fa67c3c584 Additional test coverage in btree.c. Added corruption tests for
the ptrmap pages of an autovacuumed database (corrupt8.test). (CVS 5391)

FossilOrigin-Name: 620b472133438607c412e0c21d2a27605a89a414
2008-07-11 02:21:40 +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