drh
7b341e6f99
Comment fix. No changes to code.
...
FossilOrigin-Name: c1e2ed0ef4d3436d19d3203c5fb553caac53659e
2015-07-08 14:13:44 +00:00
drh
52d9f40b7d
Do not do the bulk pcache1 allocations if SQLITE_CONFIG_PAGECACHE specifies
...
a global page cache buffer.
FossilOrigin-Name: 75d98dae676996a05e97b09b19e34463e8f30d51
2015-07-08 13:40:50 +00:00
drh
4698136594
Early detection of file corruption in a debugging routine, before the invalid
...
data can cause problems.
FossilOrigin-Name: b27a47fef995f0ab2516e6ca779711cab1f50fb9
2015-07-08 12:25:38 +00:00
drh
e56d43010d
Avoid left-shifting bits into the sign of a signed integer, as such behavior
...
is technically undefined.
FossilOrigin-Name: 9417b4021b779876dcb3b9be636f01f4055eb54e
2015-07-08 01:22:52 +00:00
drh
4297c7c4be
Add a compile-time constant for configuring the default pagecache setup.
...
FossilOrigin-Name: ad5fdfbac85682f0f0dee62e1086f40026a58be2
2015-07-07 21:14:42 +00:00
drh
fd5ae9649c
No need to test sqlite3GlobalConfig.bCoreMutex when SQLITE_THREADSAFE==0.
...
FossilOrigin-Name: 26db0fee06947d75621237a641b9652b312b3b37
2015-07-07 15:14:16 +00:00
drh
c54357cc2a
Simplify the page recycling condition in pcache1. Fix test cases to work
...
with the latest changes.
FossilOrigin-Name: 5b60df5503f61922326b3e10e94aa197b17afe4b
2015-07-07 14:06:18 +00:00
drh
db7ae89d5b
A unified cache is now only used for SQLITE_ENABLE_MEMORY_MANAGEMENT, or if
...
SQLITE_CONFIG_PAGECACHE defines a shared start-time page cache buffer and the
application is single-threaded.
FossilOrigin-Name: d5ff1d69054d51a55eff6e1979971822db7f8f30
2015-07-06 20:57:22 +00:00
drh
ee70a84ea7
Enhance separate pcache1 to allocate a block of pages from heap on startup,
...
if possible, for a 5.2% performance improvement.
FossilOrigin-Name: aa7341c8736732a0a59f6688cc34e78be02a7bfc
2015-07-06 18:54:52 +00:00
drh
b63ce02f57
Do not allow recursive CTEs that use aggregate queries in the recursive part.
...
FossilOrigin-Name: 6d2999afbc25b9c238e4028f637c10eaaf0ec75e
2015-07-05 22:15:10 +00:00
drh
01c5c00c12
Preserve the number of requested PAGECACHE pages even if the memory pointer
...
or size is zero. Enhance the pcache1.c header comment to explain the memory
layout of a page cache line.
FossilOrigin-Name: dacb2a615ce1c0573baf4518000454038745cf2a
2015-07-04 18:15:04 +00:00
drh
72e191ed71
Do not preserve the btreeInitPage() results in PRAGMA integrity_check if
...
there were cell sizing errors because PRAGMA cell_size_check was turned off
during the btreeInitPage() call.
FossilOrigin-Name: 743bf1f184be316971f2e9c651bcf573bde8654a
2015-07-04 11:14:20 +00:00
mistachkin
74db356726
Correction to check-in [1025873fdf], tighten up the number of static test mutexes.
...
FossilOrigin-Name: 4e515897af97cb3a4158bcc34318992e8dcee77a
2015-07-03 23:29:55 +00:00
mistachkin
28ae577a3d
Enhance mutex testing to include APP and VFS static mutexes.
...
FossilOrigin-Name: 1025873fdfd9e7e53094c48af1a79c60ae50ae97
2015-07-03 23:11:36 +00:00
mistachkin
93de653844
Add static mutexes for use by the built-in / third-party VFSs and use the built-in VFS mutex where appropriate.
...
FossilOrigin-Name: b202e2a1d73d104d795d2252b1c6f61d65bfb295
2015-07-03 21:38:09 +00:00
mistachkin
f156c9b684
Enable use of the __builtin_bswap32() only with GCC 4.3 and higher.
...
FossilOrigin-Name: 030f60a7ba171650ce8c0ac32dc166eab80aca32
2015-07-03 17:54:49 +00:00
drh
d2dc87f6d5
When doing coverage analysis of a btree page for pragma integrity_check,
...
make the first entry (that covers the header, cell index, and gap) implied,
for a performance boost and size reduction.
FossilOrigin-Name: e53d497c2d2fbc5014b39f5624b52ce207800698
2015-07-02 19:47:08 +00:00
drh
bed6de557a
Merge in the latest enhancements from trunks, especially the use of
...
_byteswap_ulong() and similar intrinsics on MSVC.
FossilOrigin-Name: 85ca4409bdca7aee801e9fba1c49a87fabbf2064
2015-07-02 18:47:12 +00:00
mistachkin
c29cbb0bec
Fix harmless compiler warnings and one macro VVA_ONLY macro usage issue.
...
FossilOrigin-Name: bcc8a75509aafda61feb6dcc074668c79611a662
2015-07-02 16:52:01 +00:00
drh
1910def351
Fix a (harmless) shadowed local variable definition in the integrity_check
...
logic.
FossilOrigin-Name: 3a26a919fd5550e5a0053a48cb93a27bb95cc916
2015-07-02 16:29:56 +00:00
drh
cbc6b71f39
Smaller and faster PRAGMA integrity_check that also does a better job of
...
detecting errors. Some output text describing discovered file corruption
has changed for clarity.
FossilOrigin-Name: 251a7590ff4f65f59a1c871892533e4e2c544515
2015-07-02 16:17:30 +00:00
drh
14681b739b
Avoid create a stack from in sqlite3BackupUpdate() in the common case where
...
the first argument is NULL.
FossilOrigin-Name: 2a897b9e94acaf1fd91e9f8e94fa52e01694f011
2015-07-01 19:59:36 +00:00
drh
e05b3f8f0b
Simplification of PRAGMA integrity_check logic. Make sure that the depth
...
of the right-most subtree is correct. Size reduction and performance increase,
with no change in output.
FossilOrigin-Name: 550705fcb64e7ad637686e47cabe2621d65851bf
2015-07-01 17:53:49 +00:00
drh
94a3115daa
Fix some harmless compiler warnings.
...
FossilOrigin-Name: 307195c8709d7fd2a642baa8011eb0c88cfdc0ac
2015-07-01 04:08:40 +00:00
drh
88266dc17a
Change integrity_check to analyze the cells of a page in reverse order, as
...
this will tend to insert the cells into the analysis heap in increasing order
by address, which is the most efficient way to load a min-heap.
FossilOrigin-Name: 59ad912c4c1f858e04d27b1b8f25581a5f6e5daf
2015-07-01 01:31:14 +00:00
mistachkin
647ca46fc5
Make use of the _byteswap_ushort() and _byteswap_ulong() compiler intrinsics for MSVC, when available.
...
FossilOrigin-Name: fe144dd73f7097a17c24c7812c2a1cc40466e6da
2015-06-30 17:28:40 +00:00
drh
59b4bd4840
Merge all the latest enhancements from trunk. This merge include FTS5
...
and a number of notable performance enhancements.
FossilOrigin-Name: 39936b33b0668aad81aa574d4d74c92b0ddd218a
2015-06-30 16:29:59 +00:00
drh
ad265296ff
Only use <nowiki>__builtin_bswap16()</nowiki> with GCC 4.8 and later.
...
FossilOrigin-Name: ce8177e3e64d2ac4cd5d9e7757cdd5fcecd7d0ea
2015-06-30 14:01:20 +00:00
drh
329428e208
Remove the use of htonl() in the previous check-in due to linkage issues.
...
Add the get2byteAligned() macro and use it for access to the cell offsets
on btree pages for about a 1% performance gain.
FossilOrigin-Name: 79ff36b7170c9e7e7a9935c8b9d1665867771087
2015-06-30 13:28:18 +00:00
drh
5372e4d4f9
Make use of htonl() and <nowiki>__builtin_bswap32()</nowiki> for faster
...
implementations of sqlite3Get4byte() and sqlite3Put4byte().
FossilOrigin-Name: bc27ebd7f73e9fc8e00da6ec82632e439fcce812
2015-06-30 12:47:09 +00:00
drh
3169906d06
Change an unreachable branch into an assert() in sqlite3PagerAcquire()
...
and optimize sqlite3PcacheOpenSavepoint() by factoring out rarely used code
into a subroutine.
FossilOrigin-Name: b406b20ecdf0bff63c5c222fab11cb9acee86765
2015-06-30 11:07:32 +00:00
drh
d8c0ba3b02
Optimization to the sqlite3PcacheFetch() logic.
...
FossilOrigin-Name: d9a0481ce0fd9824b1566f182d68ec46ef091b1b
2015-06-30 03:57:59 +00:00
drh
50642b1deb
Put all variable declarations for sqlite3PagerWrite()
...
at the beginning of the block. Syntax only - no logic changes.
FossilOrigin-Name: a0fa6b3ba59716e53b8c035b497602050ed0ccb8
2015-06-30 03:34:13 +00:00
drh
1116bf1359
Implement sqlite3Strlen30() using strlen() from the C library.
...
FossilOrigin-Name: 8001aa52bd12f900092387fe3571463e89efd977
2015-06-30 03:18:33 +00:00
drh
597d2b6412
Change sqlite3ApiExit() so that its first argument is never NULL.
...
FossilOrigin-Name: 791b706ec6c3e80885666e48e01524f0e9a7557e
2015-06-30 03:13:47 +00:00
drh
27fb746cde
Put BtCursor objects on a singly-linked list instead of a doubly-linked list.
...
Add the BTCF_Multiple flag. Only invoke saveAllCursors() when using a cursor
that has BTCF_Multiple set.
FossilOrigin-Name: 429ccef2b36fc46e92914eb54afd5f800b1a40ff
2015-06-30 02:47:36 +00:00
drh
98ef0f6c48
Convert several 5-year-old and older NEVER() macros into assert().
...
FossilOrigin-Name: ed54c14ea8a72d69d69e0c0d7f6936f54efc04c2
2015-06-30 01:25:52 +00:00
drh
207c817365
From sqlite3BtreeInsert(), bypass the btreeMoveto() routine for table inserts
...
and go directly to sqlite3BtreeMovetoUnpacked().
FossilOrigin-Name: 53fe685d56368af78238c8981cc41704929f7660
2015-06-29 23:01:32 +00:00
drh
b34755308c
Add a bypass path in sqlite3PagerWrite() for pages with the PGHDR_WRITEABLE
...
bit set, for about a 1% performance increase.
FossilOrigin-Name: ba425a6abb9886e6af87b5f6205202db450beba8
2015-06-29 20:53:18 +00:00
drh
60e32edba5
Combine subjRequiresPage() and subjournalPage() into a single
...
subjournalPageIfRequired() routine.
FossilOrigin-Name: 3b65eb56c422855ca47f709247205f0c77d98a5c
2015-06-29 19:08:18 +00:00
drh
1aacbdb374
Add the PGHDR_WRITEABLE bit for PgHdr.flags which is used to
...
distinguish between pages that are on the dirty list and pages that are
safe to modify.
FossilOrigin-Name: 7c4ef7b7c8744af19075bb96d1e0b63e35978ed1
2015-06-29 18:29:10 +00:00
drh
e399ac2e1e
Fix over-length source code lines in pager.c.
...
FossilOrigin-Name: 14de3d39267a4005a0fa900bab4adc4c104e4084
2015-06-29 18:14:02 +00:00
drh
82ef8775c7
Simplifications and performance improvement in pager_write().
...
FossilOrigin-Name: ab7aeeead395a05b91a921ef9ebe9252fffad667
2015-06-29 14:11:50 +00:00
drh
c78ae916b9
Add the new PGHDR_CLEAN bit to PgHdr.flags in pcache.c. This bit is always
...
the opposite of PGHDR_DIRTY. Use the extra bit to avoid a comparison
for a small performance boost.
FossilOrigin-Name: 8619fc346d9a5a66a3c4566b4cc032b6b6bf73fd
2015-06-29 04:21:15 +00:00
drh
234a93fc9c
Very small size reduction and performance increase in sqlite3BitvecTest().
...
FossilOrigin-Name: 9b3a7281bd45994edf813a687e4b7a0761697929
2015-06-29 03:28:43 +00:00
drh
325d087aa7
Move an assert() and testcase() into their correct position within
...
getAndInitPage().
FossilOrigin-Name: 18115164e12509ec21f34598089a7f1310048819
2015-06-29 00:52:33 +00:00
drh
95c91e145a
Use tail recursion in pcache1Unpin() to get a small size reduction and
...
speed improvement.
FossilOrigin-Name: fde70472aebc09b34a517131f676e6847d02b747
2015-06-29 00:21:00 +00:00
drh
b84c14d07c
Comment typo fix and minor cleanup in the pager. No logic changes.
...
FossilOrigin-Name: 94ef17012855b7be725594c34bcea75f34c40190
2015-06-28 17:33:11 +00:00
drh
c5ef7151b0
Avoid unnecessary calls to sqlite3VdbeSerialTypeLen() for integer
...
serial types, for a small size reduction and a speed increase.
FossilOrigin-Name: 9cd30d33b1d02dc8c55c1d74bdbcefab63ebf2a7
2015-06-28 02:58:51 +00:00
drh
c75d886b05
Make greater use of BtCursor.curIntKey.
...
FossilOrigin-Name: 63998471d023dd846d5583ac856e2acc47ad41ea
2015-06-27 23:55:20 +00:00