drh
062cf27d00
Fix datetype size asserts in btree.c.
...
FossilOrigin-Name: ff4812d0e8e6322ca8b6992925fd4ef4aee463e6
2015-03-23 19:03:51 +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
1ffede8c86
Change SQLITE_TESTCTRL_INITMODE to SQLITE_TESTCTRL_IMPOSTER. Revise the order
...
of parameters. Give it the ability to reset the schema parse table so that
imposter tables can be erased.
FossilOrigin-Name: 42d5601739c90434e5adfda8fa99ef7b903877db
2015-01-30 20:59:27 +00:00
drh
37c057b8ff
Round all object sizes that go into computing SQLITE_CONFIG_PCACHE_HDRSZ up
...
to a multiple of 8 bytes.
FossilOrigin-Name: b28ce75f2d3a6343dc20d581dc55afae89ab5efa
2014-12-30 00:57:29 +00:00
dan
ee7172f12a
Fix a failing assert() in balance_nonroot().
...
FossilOrigin-Name: e2e323145f66cca31babe1a979db6ef97038b879
2014-12-24 18:11:50 +00:00
drh
3da9c04712
Redefine the way PRAGMA data_version works: It continues to change when
...
any other connection commits, including shared-cache connections, but does not
change if the local connection commits.
FossilOrigin-Name: 7a97826f33460f3b4f3890c9cf97116c3355eeda
2014-12-22 18:41:21 +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
drh
7efa426ee9
Make sure the sqlite3BtreeCount() routine does not leave index cursors in an
...
inconsistent state, as doing so might result in an assertion fault inside
of sqlite3BtreeKey() called from saveAllCursors() if content is deleted out
from under the statement that issued the sqlite3BtreeCount() call.
FossilOrigin-Name: 5b1b697040116048e464b3ebab8395fe088e389a
2014-12-16 00:08:31 +00:00
dan
857536623a
Fix a race condition to do with very large index keys in shared-cache mode.
...
FossilOrigin-Name: fc157dd7f18c94b7ae5f155e1b4a5d7714b7da8c
2014-12-11 16:38:18 +00:00
mistachkin
0fbd7350a1
Fix harmless compiler warning.
...
FossilOrigin-Name: e97b7a8b4df784d148fefb9554da0f511e351d9f
2014-12-09 04:26:56 +00:00
dan
8f1eb8a1cb
Avoid accessing a single uninitialized byte when moving a rare 3-byte cell from an internal page to a leaf. This was not actually causing a problem, just a valgrind warning.
...
FossilOrigin-Name: 6aeece19a235344be2537e66a3fe08b1febfb5a0
2014-12-06 14:56:49 +00:00
drh
d52d52be80
Fix a (harmless) uninitialized variable reference in b-tree balancing for
...
auto-vacuumed tables with overflow pages.
FossilOrigin-Name: dd1dd4451f468599f7a0c2f7b5ee6125db3bb152
2014-12-06 02:05:44 +00:00
drh
1fd2d7d471
Convert two unreachable branches into assert() statements.
...
FossilOrigin-Name: 61b31e771430f490fc2c4cef55046debc4a5f4f5
2014-12-02 16:16:47 +00:00
drh
5ab63775dd
Fix a problem in the new b-tree balancer that was causing corruption of
...
the fragmentation count.
FossilOrigin-Name: f242394e079dd185aad90f2aee902a5edf27e150
2014-11-27 03:46:04 +00:00
drh
fdab02635c
Ensure that when the number of cells on a page drops to zero that the freelist
...
and fragment counter are both cleared. Also add evidence marks corresponding
to file-format documentation.
FossilOrigin-Name: ef9fbc08b0a047042deeb2d6007d67028fefb9e2
2014-11-20 15:30:50 +00:00
drh
113762a284
Add new requirements marks associated with the file format documentation.
...
No changes to code.
FossilOrigin-Name: 6d00bcca6ed1903fb17275752cab71c14392355b
2014-11-19 16:36:25 +00:00
drh
64b600ff13
Merge in all the other ROLLBACK fixes from the branch-3.8.7 branch.
...
I don't know why I was doing them one-by-one.
FossilOrigin-Name: 296b0c7397790ceadbdb330959e962f6491abc3e
2014-11-18 20:49:30 +00:00
drh
bea3b976a9
Fix a bug in the sqlite3TripAllCursors() routine that prevents it from
...
reporting errors. It is unknown at this time whether or not this omission can
result in any incorrect result in an actual query.
FossilOrigin-Name: 2896f2640ab3e102ee248d20fb68c497817524eb
2014-11-18 20:22:05 +00:00
drh
c5352b996a
Remove code from sqlite3BtreeKeySize() made unreachable by the previous
...
check-in.
FossilOrigin-Name: 57c4aa988c8eda3cc513c1e5df5804d88bee99a0
2014-11-17 20:33:07 +00:00
drh
13835c41e8
Fix a bug in the sqlite3TripAllCursors() routine that prevents it from
...
reporting errors. It is unknown at this time whether or not this omission can
result in any incorrect result in an actual query.
FossilOrigin-Name: 42588207ff5451cb785c394633e1ab631fb82f01
2014-11-17 15:32:47 +00:00
drh
6f9c5669e2
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. Cherry-pick of check-in [dd03a2802f3f27]
...
FossilOrigin-Name: 402780a9c8df9e7ea898bdca49c1191042fe387a
2014-11-13 13:42:39 +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
85fabf1444
This is a cherry-pick of version [b5df5ac052].
...
FossilOrigin-Name: d4b2d5d066891e06f2bf4337902b44b000fa9fd2
2014-11-11 22:55:26 +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
fefa094921
Fix harmless compiler warnings in the new balance_nonroot() routine.
...
FossilOrigin-Name: 83a1e5db926b3a6d40f4a5cf9a8e6852b9bac9ac
2014-11-05 21:21:08 +00:00
drh
cbd55b0362
Change the definition of SQLITE_CONFIG_SCRATCH so that at most one scratch
...
buffer is used per thread. Use the generic heap memory allocator for the
WalIterator object when running a checkpoint.
FossilOrigin-Name: 391c9b85abcb5ba300fb2e116384639310c69ed2
2014-11-04 14:22:27 +00:00
drh
5279d3433c
Improved documentation and addition of source-code evidence marks for the
...
sqlite3_config() interface.
FossilOrigin-Name: 681031a436fdd4cce426d6cd43cbae6b83167d26
2014-11-04 13:41:32 +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
d836d42383
Simplify the logic in the cell redistribution loop of balance_nonroot().
...
Enhance and clarify comments and add assert() statements for additional
verification of correctness.
FossilOrigin-Name: a07078b60007e88adea67bec5f0caf91f707ad78
2014-10-31 14:26:36 +00:00
drh
bec021b9fc
Simplify the math slightly, and reduce by one the number of loop iterations,
...
for the loop in balance_nonroot() that moves cells between pages.
FossilOrigin-Name: 2e838db82e533598b3cb00011c04fc0d5a896895
2014-10-31 12:22:00 +00:00
drh
768f29002e
Remove an unnecessary branch from balance_nonroot().
...
FossilOrigin-Name: 9fc7c88e3f5221883aa6eafbf8af3be94db0c299
2014-10-31 02:51:41 +00:00
drh
00fe08af82
In the balance_nonroot() routine, protect the values in aPgno[] array from
...
change during the page sort, so that aPgno[] can be used to avoid unnecessary
pointer-map updates for auto_vacuum databases.
FossilOrigin-Name: 69c3924fe834a78d4a8d86833626bf5f68e33a3a
2014-10-31 00:05:23 +00:00
drh
2a0df92542
Improvements to the wording of some comments. Reinstate an assert() that
...
is only true for non-corrupt database files by adding an "|| CORRUPT_DB" term.
FossilOrigin-Name: 67adb44838f98805f86aecca634d9a3b07370b9e
2014-10-30 23:14:56 +00:00
drh
ba0f999418
Tweaks to comments in btree.c. Minor code changes to enhance testability.
...
FossilOrigin-Name: c7d9aa3a1ce63e27ec94295601bc89fecf1e4977
2014-10-30 20:48:44 +00:00
drh
eefaf448db
Correct the documentation on the maximum size of a scratch allocation.
...
FossilOrigin-Name: 30f86eb3f9ac88f83ed9e23ea6cd1fccf68e0812
2014-10-28 00:56:18 +00:00
mistachkin
a95d8ca1fa
Fix harmless compiler warning in an assert statement.
...
FossilOrigin-Name: d33a1ff3aad0bfabf70a98ac338a68f82074e4fe
2014-10-27 19:42:02 +00:00
drh
8a42d1bba1
Fix an unused variable in btree.c:allocateSpace().
...
FossilOrigin-Name: 637246165a14c4808b90d0437e4d43fa5fac659e
2014-10-27 18:21:01 +00:00
dan
61e94c9deb
If a free-slot is found within a page, but using that free-slot would fragment the page further and there are already at least 60 fragmented bytes, degragment the page. This matches the behaviour of the trunk.
...
FossilOrigin-Name: 1f80f8c136ac970dcc7fb2337263dc5922e348c3
2014-10-27 08:02:16 +00:00
dan
89ca0b3878
Further modifications to new code to better handle corrupt databases.
...
FossilOrigin-Name: 1a8cf0a043347772ac54d150d634c32845beee8b
2014-10-25 20:36:28 +00:00
dan
31f4e99d44
Ensure that the "Any prior cache entry associated with newKey is guaranteed not to be pinned" guarantee made to xRekey implementations is not violated.
...
FossilOrigin-Name: ecc3544e712041736af7c7b4f34864a1f2e30ff7
2014-10-24 20:57:03 +00:00
dan
23eba45d23
Fix some issues in the new code on this branch related to the handling of corrupt databases.
...
FossilOrigin-Name: 19736dd9fbbb7e252c4f8715e2277d48ac41f5bc
2014-10-24 18:43:57 +00:00
dan
e6593d8e8c
Fix some minor formatting and code organization issues.
...
FossilOrigin-Name: eab8706dc47aa0a44caf73619de858397c3e0b4e
2014-10-24 16:40:49 +00:00
dan
cc8490d2cd
Merge latest trunk with this branch.
...
FossilOrigin-Name: 854a54c6c21e800b0cd999023014813f7c50b23f
2014-10-22 18:42:31 +00:00
drh
92787cf042
Add a four-byte prefix to the BtShared.pTmpSpace buffer to avoid reading
...
before the beginning of an allocation.
FossilOrigin-Name: 9386bfca128023583a24303e5f1d832987a49d43
2014-10-15 11:55:51 +00:00
dan
8e9ba0c335
Fix some code duplication issues on this branch. Add minor optimizations to the new code.
...
FossilOrigin-Name: 58d7793bd5d608ba9fc3a2cd44b9d9512e0332ba
2014-10-14 17:27:04 +00:00
dan
d0b8f93b5f
Merge trunk changes into this branch.
...
FossilOrigin-Name: d5b7c5a88dd58de85b3060a1f28b6d96e6e21207
2014-10-13 18:09:13 +00:00
dan
d7b545bbcb
Further work on balance_nonroot().
...
FossilOrigin-Name: 6594f9b420e2fa642737722ff8521f756ecef227
2014-10-13 18:03:27 +00:00
drh
c22284f4b3
Reduce the CPU load imposed by sqlit3VdbeCursorMoveto() by factoring out
...
some of its functions and by avoiding unnecessary calls.
FossilOrigin-Name: c2799aece17d347c64217a0e407bb10e50c184a3
2014-10-13 16:02:20 +00:00
dan
09c6840153
Attempt to further reduce memcpy() in balance_nonroot().
...
FossilOrigin-Name: fec849dcca3aead2bc2d4ecffeda750684d32fb0
2014-10-11 20:00:24 +00:00