drh
d6ef5afe3f
Change the OP_Last opcode so that it is a no-op if the cursor is already
...
pointing at the end of the b-tree.
FossilOrigin-Name: 663473850c4274270445b3771911fa773a8c405f
2016-11-15 04:00:24 +00:00
drh
9b4eaebc68
Enhance the OP_IdxInsert opcode to optionally accept unpacked key material.
...
FossilOrigin-Name: 89d958abbac45f2ca5954080cd9e74ec9a07ebb2
2016-11-09 00:10:33 +00:00
drh
2eb22af03d
Changes to give a warning-free build with SQLITE_OMIT_INCRBLOB and
...
SQLITE_OMIT_SHARED_CACHE.
FossilOrigin-Name: 711c59171b22df04224183a713e6c36e0bb3bba8
2016-09-10 19:51:40 +00:00
drh
43f58d6a17
Fix various internal #defines to conform to new C-language naming restrictions,
...
specifically that private-use macros names must not begin with "_".
FossilOrigin-Name: 5471aca0158851d3fb0a2517306917536deb38bb
2016-07-09 16:14:45 +00:00
dan
272989b44d
Add the SQLITE_DBSTATUS_PROPORTIONAL_CACHE_USED sqlite3_db_status() parameter.
...
FossilOrigin-Name: 118321c8b9d88b8f439c952436f42838c3fc80cb
2016-07-06 10:12:02 +00:00
drh
a7c90c42ea
Change the sqlite3BtreeKeySize() interface into sqlite3BtreeIntegerKey() and
...
make it only work for table btrees. Change sqlite3BtreeDataSize() into
sqlite3BtreePayloadSize() and make it work for all btrees. Combine
sqlite3BtreeDataFetch() and sqlite3BtreeKeyFetch() into a single
sqlite3BtreePayloadFetch() routine. These changes seem to make the
b-tree interface more rational and they reduce both binary size and
CPU usage.
FossilOrigin-Name: bef35e18dd19732f7859287b097feeb593e5900f
2016-06-04 20:37:10 +00:00
drh
8eeb4463d9
Simplify the sqlite3BtreeInsert() interface by gathering the five arguments
...
describing the content to be inserted into the new BtreePayload structure, and
thus reducing the number of parameters from eight to four.
FossilOrigin-Name: 55f348cdd24c7812ea4b63345514764b69f64dc8
2016-05-21 20:03:42 +00:00
drh
b052958657
Remove code not needed now that synchronous=OFF database files no longer
...
trigger the use of a master journal.
FossilOrigin-Name: aa9f4c622af191edbeb6a535942944f8c91f5c37
2016-02-22 23:44:42 +00:00
drh
def19e3b48
Change the name of the BTREE_IDXDELETE flag to BTREE_AUXDELETE, to better
...
reflect its purpose.
FossilOrigin-Name: 1d3bf6bebdda9f96734bc139601e9b05344ea0b4
2016-01-27 16:26:25 +00:00
drh
e807bdba86
Add a new hint bit on the flags parameter of sqlite3BtreeDelete(). The new
...
BTREE_IDXDELETE bit indicates that the call is to delete an index entry
corresponding to a table row that has already been deleted.
FossilOrigin-Name: ac2cbadd8000947c097da5b00c00090fe58fdcff
2016-01-21 17:06:33 +00:00
drh
9c0c57a4ca
Improved comments on the FORDELETE hint. No logic changes.
...
FossilOrigin-Name: a3cec529f0238e4ca1196fec420f2de80d28db78
2016-01-21 15:55:37 +00:00
dan
20d876fa1c
Have the vdbe layer call sqlite3BtreeEnter() on all b-trees in use from within sqlite3VdbeExec() even in SQLITE_THREADSAFE=0 builds. This ensures that BtShared.db is set correctly.
...
FossilOrigin-Name: d0214602d44d6b84b7463d530720e2560aee6edf
2016-01-07 16:06:22 +00:00
drh
9b0cf34f81
First attempt at enhancing the "PRAGMA cache_spill" statement to accept a
...
cache threashold size.
FossilOrigin-Name: 549d42be0dac87dc04c3eeccfdc60615c3a6ad3f
2015-11-12 14:57:19 +00:00
drh
b1d607de25
Improvements and simplifications to the equality seek logic. Tests are
...
adjusted so that they all pass now.
FossilOrigin-Name: 997ce6c90b454c03cc2ef6934752ee8dd2e520e3
2015-11-05 22:30:54 +00:00
drh
f7854c7329
Split out sqlite3BtreeCursorHintFlags() from sqlite3BtreeCursorHint()
...
the interface for improved performance.
FossilOrigin-Name: b3ec9a0d62c5543e91d4be2cd634ec4a3d6dca11
2015-10-27 13:24:37 +00:00
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