dan
c5dc3dcd6e
Merge the BTREE_FORDELETE enhancement with this branch.
...
FossilOrigin-Name: 20da0849ce910ceb445954dfc5f985acf9a02695
2015-10-26 20:11:24 +00:00
dan
2b4e95226c
Remove an unused #define from whereInt.h. Add comments describing the new sqlite3BtreeCursor() flags.
...
FossilOrigin-Name: 4c0ba8be43bb7c7100456bd8cd6921c164be31e1
2015-10-23 11:50:23 +00:00
dan
fd261ec67e
Modifications to pass a flag to internal routine sqlite3BtreeCursor() when a cursor that is used solely for deleting b-tree entries, or for obtaining the components of keys to delete from other b-trees, is opened.
...
FossilOrigin-Name: cdc92919e600007cae5eb61223684f48a65babc0
2015-10-22 20:54:33 +00:00
drh
81966bea22
Merge enhancements from trunk.
...
FossilOrigin-Name: 66fe06832614010d3156d7b21a760af9957018cc
2015-09-15 17:31:47 +00:00
dan
f0ee1d3c12
Experimental change to use a single-pass approach for DELETE statements on non-virtual tables that do not fire triggers or require foriegn-key processing.
...
FossilOrigin-Name: eaeb2b80f6f8f83679c8323a81bb39570ec946fe
2015-09-12 19:26:11 +00:00
drh
0403cb3012
Always provide the BTREE_BULKLOAD hint, even when SQLITE_ENABLE_CURSOR_HINTS
...
is not defined, as that hint gives a 4% performance increase.
FossilOrigin-Name: 83a844357e132683ab3d88eee0fe32a8beeb6662
2015-08-14 23:57:04 +00:00
drh
0df57012da
Refactor the sqlite3BtreeCursorHint() interface for improved maintainability.
...
FossilOrigin-Name: fc3fb5cd0d2c123a069e5b18b62bb1f708c8698a
2015-08-14 15:05:55 +00:00
drh
bec2476afc
Merge in all the trunk changes from the previous year. This breaks the
...
cursor-hint mechanism, but provides a baseline for trouble-shooting.
FossilOrigin-Name: 82a7a61bc0883b1e7432548e4890791717aa1bb3
2015-08-13 20:07:13 +00:00
drh
e0997b341b
Provide the BTREE_SEEK_EQ hint to the b-tree layer.
...
FossilOrigin-Name: e750830f1e61160c0c67e35b13e50b35a95b50e1
2015-03-20 14:57:50 +00:00
drh
ad0961b31b
Keep track of the optimal number of reserved bytes (by looking at reserve
...
byte requests in calls to sqlite3BtreeSetPageSize()) and then change the
reserve byte count to the optimal when doing a VACUUM or when using the
backup API.
FossilOrigin-Name: 28c2b726285ea88b334acfd6390a057d2d244838
2015-02-21 00:19:25 +00:00
drh
9161856495
Experimental "PRAGMA data_version" command for detecting when another process
...
has changed the database file.
FossilOrigin-Name: 43db1f44bce5a0ee50197b95ab0d844540b69d86
2014-12-19 19:28:02 +00:00
dan
8023104252
When a transaction or savepoint rollback occurs, save the positions of all open read-cursors so that they can be restored following the rollback operation.
...
FossilOrigin-Name: dd03a2802f3f276525f3cef9a93f825dd8606626
2014-11-12 14:56:02 +00:00
drh
47b7fc7843
Experimental changes that permit read operations to continue after a
...
ROLLBACK, as long as the schema is unchanged.
FossilOrigin-Name: fa6e6a9ae276cad60e9a4abc1bc23cf2809ea786
2014-11-11 01:33:57 +00:00
drh
def6889d21
Add the SQLITE_CONFIG_PCACHE_HDRSZ option for sqlite3_config().
...
FossilOrigin-Name: 6eb03e62a34e8e0964175283587247b0212db604
2014-11-04 12:11:23 +00:00
drh
6848dad894
Another performance tweak: Split the sqlite3BtreeCursorHasMoved() routine
...
into two with the second routine named sqlite3BtreeCursorRestore(). The first
now only reports whether or not the cursor has moved and the second tries to
restore the cursor. This allows the sqlite3VdbeCursorMoveto() routine to be
refactored to avoid stack pointer movements, for a noticable performance gain.
FossilOrigin-Name: ce123b5c592556a8cd38b01fcc91ba76231d3098
2014-08-22 23:33:03 +00:00
drh
781597feca
Fix the sqlite3_db_readonly() API so that it reports true if the database
...
is readonly because the file format write version (byte 18 of the header)
is too large.
FossilOrigin-Name: 8d8af114dac301335ec10671c1e9a5a6d8266a60
2014-05-21 08:21:07 +00:00
drh
e4529c5724
Merge in the latest changes and fixes from trunk.
...
FossilOrigin-Name: f6211540c9d66a08dc580dd733e4f4a98968ae30
2014-03-31 22:03:32 +00:00
drh
079a307259
First attempt at getting block-sort to work. This is an incremental check-in.
...
There are many problems still to be worked out.
FossilOrigin-Name: 59742dd4c5259883850044d0938248b009ebd045
2014-03-19 14:10:55 +00:00
drh
18c7e40ca3
Fix a harmless compiler warning that crops up with SQLITE_MAX_MMAP_SIZE=0.
...
FossilOrigin-Name: 1277932b7e8bb36c7070ffafbf110a8e128c267b
2014-03-14 11:46:10 +00:00
dan
5a500afd57
Enable the b-tree cursor objects overflow page-number cache, which is normally enabled only for incr-blob cursors, for all cursors.
...
FossilOrigin-Name: da59198505990a4fe832be7932117c7e014955b7
2014-03-11 20:33:04 +00:00
drh
e0670b6220
Remove the "rowid cache" that sought to remember the largest rowid for a
...
table and thereby speed up OP_NewRowid. That cache was ineffective.
Removing it results in a performance increase of 0.4%, less memory usage,
and a slightly smaller library size.
FossilOrigin-Name: 56bc5ce8958c8e6250531b4052b905d7ac993db3
2014-02-12 21:31:12 +00:00
drh
28935364ef
If the SQLITE_ENABLE_CURSOR_HINTS macro is defined, then invoke the
...
sqlite3BtreeCursorHint() interface to provide hints to the storage engine
about rows that need not be returned. Hints can be disabled using
SQLITE_TESTCTRL_OPTIMIZATIONS with SQLITE_CursorHints (0x2000). Cursor
hints are not used by the built-in storage engine of SQLite but might
be useful to applications that provide their own storage engine. The
current code is work-in-progrss and contains bugs.
FossilOrigin-Name: 3a9bec524ef2de44028b4058e67dc962082888d3
2013-12-07 20:39:19 +00:00
drh
501932ca68
Changes some offset and amount parameters from "int" to "u32" to avoid
...
harmless signed/unsigned comparison warnings.
FossilOrigin-Name: 4e8c5d0795cb7c603182bfa70f3855d654f0997e
2013-11-21 21:59:53 +00:00
drh
40c3941cfa
Add the cache_spill pragma.
...
FossilOrigin-Name: cdb181c04fa99c6c29f23eb68ccb5475e7f6bf9c
2013-08-16 20:42:20 +00:00
drh
4ee09b4bcc
Allocate 4 bytes of unused header space for an "Application ID". Add
...
the "PRAGMA application_id" command to set and query this identifier.
Add the "magic.txt" file to show how the posix file command might use
this application id.
FossilOrigin-Name: 28c9e7fdee2471a3026ee05ff591194d5f398131
2013-05-01 19:49:27 +00:00
drh
0d0614bdc6
Memory-mapped I/O is now on by default. The "PRAGMA mmap_limit(N)" can be
...
used to issue a hint to the VFS to limit mmap space to N bytes. The VFS
is free to ignore that hint if desired. However, if "PRAGMA mmap_limit(0)"
is used, xFetch is never called.
FossilOrigin-Name: 1b37c4effdd03aa2ea938a71b4f22ed27391689b
2013-03-25 23:09:28 +00:00
dan
5d8a137218
Add the sqlite3_io_methods.xMremap() method to the VFS interface. Also "PRAGMA mmap_size".
...
FossilOrigin-Name: 6183f1bd86ceed76d22d9762f3d7eb33262c62d1
2013-03-19 19:28:06 +00:00
dan
b483eba051
Ensure that when the source of a backup is a database that is zero bytes in size, the final destination database consists of at least one page. Truncating it to zero bytes is equivalent to zeroing the schema cookie and change counter, which can cause problems for existing clients.
...
FossilOrigin-Name: af5c9ee4a453f71c03f24ad08824ced6c1b97afb
2012-10-13 19:58:11 +00:00
drh
a1f3853793
Omit the sqlite3GetReservedNoMutex() routine in build configurations where
...
it is not used.
FossilOrigin-Name: f193dbb6b96b2f49dd0d6345802c9c006cd99e3c
2012-10-01 12:44:26 +00:00
dan
0094f37e1f
Avoid calling sqlite3BtreeEnter() in a corner case where the corresponding database handle mutex (sqlite3.mutex) may not be held. This prevents a potential deadlock or crash that can occur if the backup API, shared-cache mode and SQLITE_HAVE_CODEC are all in use.
...
FossilOrigin-Name: 89b8c377a6f03d9fa885f3f94c1f0b1eec263dea
2012-09-28 20:23:42 +00:00
dan
428c218c90
When reusing pages as part of creating a new index, allocate the leaves from each free-list trunk page in ascending order, instead of trying to maximize localization for each individual allocation. This increases the chance that pages will be written to disk in ascending order by a large CREATE INDEX statement, improving overall performance.
...
FossilOrigin-Name: d045f8b2d44e388d8c4549ff02d4ca7eff4e2038
2012-08-06 18:50:11 +00:00
drh
0f198a7409
Change the ROLLBACK command so that pending statements to not block it. The
...
pending statements instead return SQLITE_ABORT upon next access. Note: This
causes separate shared-cache connections in read_uncommitted mode to abort as
well.
FossilOrigin-Name: 9b66c79e054c8a109d1ee8d35fed1c42814c330d
2012-02-13 16:43:16 +00:00
drh
33f111dc72
Remove the undocumented PRAGMA omit_readlock hack.
...
FossilOrigin-Name: 96900c47e4fc6ed55cefc10d55d3d8d16bcb1d31
2012-01-17 15:29:14 +00:00
dan
5134d1357e
Instead of a temporary b-tree, use a linked-list and merge-sort to sort records in main memory in vdbesort.c.
...
FossilOrigin-Name: 7769fb988d9be0f2d8129aaac19620ac88f9b4a6
2011-09-02 10:31:11 +00:00
drh
2a5d9908f9
Create a new pager type, PAGER_SORTER, for use in the external merge sort.
...
Such pagers are always held in memory but do report when they are under
memory pressure by calling pagerStress.
FossilOrigin-Name: c71d73201d950355862dd8d5de142c9673888755
2011-08-26 00:34:45 +00:00
dan
3a6d8aec2a
Have the ATTACH command do URI interpretation in the same way as sqlite3_open() and sqlite3_open_v2() do.
...
FossilOrigin-Name: 68240e75e87a54cde93352b0ec364d34365a8170
2011-04-23 15:54:54 +00:00
drh
dc5b047ec3
Fix a performance regression: Keep two btree masks in each prepared
...
statement; one for btrees used and another for btrees that require locks.
Only try to lock the btrees identified by the second mask.
FossilOrigin-Name: 614de91a504d2231009a9de1305e31fce1b1c5a6
2011-04-06 22:05:53 +00:00
drh
e54e051800
Remove the mutex counter and the logic that attempts to verify that btree
...
mutexes are held continuously. We are not making that assumption at this
time.
FossilOrigin-Name: 242ce7cff416a87d57d4eb624cb79fa4e2215559
2011-04-05 17:31:56 +00:00
drh
2120608e0f
Add a description of access rules for the Schema object and lots of asserts
...
to verify that the access rules are followed.
FossilOrigin-Name: ae8374af057b6e6546e9265148cfffe32fcb0849
2011-04-04 18:22:02 +00:00
drh
bdaec52c62
Remove the BtreeMutexArray object - use the Vdbe.btreeMask field to accomplish
...
the same result. Add a generation counter to btree mutexes in order to assert
that mutexes are never temporarily dropped over a range of instructions in order
to do deadlock avoidance in some subroutine. Lock all btrees in any Vdbe
program that uses OP_ParseSchema.
FossilOrigin-Name: d81708f7d1eee399bfe76f6b8dac950a85dc2582
2011-04-04 00:14:43 +00:00
dan
60939d0ade
Fix a problem whereby following an IO error in CommitPhaseTwo() of a multi-file transaction the b-tree layer could be left in TRANS_WRITE state, causing problems later on.
...
FossilOrigin-Name: dbe569a099c2855480e35c0cc4d9332821ad80da
2011-03-29 15:40:55 +00:00
drh
27f9aba18c
Merge the checkpoint_fullfsync pragma and the superlock demonstration into
...
the checkpoint-v2 experimental branch.
FossilOrigin-Name: ebf74015f09fe241c1c6902dc8954f2b59ab41ec
2010-11-19 18:51:31 +00:00
drh
c97d84638e
Add the checkpoint_fullfsync pragma which enables F_FULLFSYNC on checkpoint
...
operations only, not during ordinary commit fsyncs.
FossilOrigin-Name: a069867301de3ca2e1753bd4d2e426d27365be4c
2010-11-19 18:23:35 +00:00
dan
cdc1f049bf
Modify the interface to the blocking wal-checkpoint functionality.
...
FossilOrigin-Name: 72787c010c8944e8fcf9c98aa4482f129142d8e9
2010-11-18 12:11:05 +00:00
dan
a58f26f93f
Add experimental command "PRAGMA wal_blocking_checkpoint", which uses the busy-handler to block until all readers have finished in order to ensure the next writer will be able to wrap around to the start of the log file.
...
FossilOrigin-Name: 7e3fc2c833a5baa08820c499867b6902bdc2ed5a
2010-11-16 18:56:51 +00:00
drh
d4187c716c
Provide hints to the btree layer during the creation of transient tables
...
when it is possible for those tables to use a hash rather than a binary tree.
No use is current made of those hints, though assert() statement verify
their accuracy.
FossilOrigin-Name: 4fead8e714c7e50a9d246467e62bc846ef6180a0
2010-08-30 22:15:45 +00:00
dan
a550f2decd
In shared-cache mode, do not allow one connection to checkpoint a database while a second connection is reading or writing the same shared-cache.
...
FossilOrigin-Name: e75b52d156905ce16bedb94f65c01a4640bdfa75
2010-08-02 10:47:05 +00:00
dan
e04dc88be5
Use the read and write version fields of the database header to mark a database as operating in wal-mode.
...
FossilOrigin-Name: 96bef18c1411c3e0348295886f105e1646c46320
2010-04-20 18:53:15 +00:00
drh
b1299158c7
Continuing refinements to the filesize-in-header enhancement.
...
FossilOrigin-Name: 79e22b95038c50b9b7f35e09262805ff6338b59b
2010-03-30 22:58:33 +00:00
drh
5b47efa662
All the secure-delete setting to be changed at run-time using a pragma.
...
The SQLITE_SECURE_DELETE compile-time option determines the default setting.
FossilOrigin-Name: f72f8a870a0fc98a9f2b564ffafe7946bbce506e
2010-02-12 18:18:39 +00:00