The motivation for this change is my distribution moving to a multiarch
layout. While the architecture specific stuff (binaries, libraries,
etc.) is installed under /usr/${host}/{bin,lib,...} architecture-independent
data should still be installed to /usr/share/.
Change-Id: I9bc1e4ba975e8ef7fe945ca3b30f044ac40eedf2
Includes:
- ITS#8321 deinit empty cursors
Always unset C_INIT flag if the cursor's target DB has been deleted
- ITS#8321 Fix mdb_cursor_set
Always reinit mc_pg[0] if cursor is not C_INITIALIZED
It might have a stale value when using nested txns
- ITS#8321 mdb_put cursor needs tracking too
- ITS#8321 page_touch - don't fixup the cursor we just touched
- ITS#8321 More cursor fixup
Based on page_touch fixup from ITS#7594 but expanded:
make sure sub-cursors agree with main cursors.
- ITS#8321 cleanup unused var
Change-Id: I4b825e20e9d42d3166052e9b3e5bd0ac33b70e85
ITS#8321 fix ambiguity in cursor_put fixup
After delete/add of a node, other nodes may no longer be
pointing at the data they intended. This can confuse subsequent
fixups.
Change-Id: Id43406a9828b440735835b024e94e9b2d5a17693
Multiple bugs were fixed in the cursor fixups which
adjust other open cursors in response to various write ops.
Includes:
- ITS#8321 Fix del/dupsort.
When deleting a dupsort key, if other cursors pointed at that key,
set them to uninit'd, not EOF. They no longer have anything to
point at.
- ITS#8321 don't skip fixups on splitting cursors.
Adjustments can't be skipped, in recursive calls each level must
fixup their own level.
- ITS#8321 fix mdb_cursor_chk().
It was reporting spurious errors due to uninit'd cursors
- ITS#8321 fix mdb_cursor_shadow().
Set a valid txn so that cursor fixup code works on the shadows
- ITS#8321 fix mdb_cursor_put.
Ignore sub-cursors that shouldn't be fixed up
- ITS#8321 track temporary cursors.
In rebalance/split operations, temporary cursors need to be visible
to propagate fixups
- ITS#8321 simplify page_split fixups.
- ITS#8321 reorganize page_split fixups.
DUPFIXED fixups needed to occur after separator update.
MDB_RESERVE handling moved after split fixup.
Change-Id: I0c04acf54ebf6e84f32996b5723ec6fafb983ad9
Check for top of stack. Usually the cursor only has height 1 when
calling page_split, but not always.
Change-Id: Iad221be30edac0f82b650f787e5dbe721cc978e0
This fix a TLS-memleak for thread from which mdbx_env_close_ex()
has been called. Bug was added by while fixing the
https://github.com/ReOpen/ReOpenLDAP/issues/48
In general we should explicitly free(), because
pthread_key_delete() don't calls a destructor.
Change-Id: Ic55a2348caf3be34b4331d5ad101ea33dbbdfa97
ITS#8258, ITS#7829 fixes checked parent index to see if we were moving
from a left neighbor. Should have just checked to see if current index
was 0, meaning we added on the left. (Parent index may not tell us
anything meaningful after a nested rebalance.)
Includes:
- ITS#8300 fix node_move
Don't adjust other cursors when we added a node on the right.
- ITS#8300 more for node_move fixups
When moving a node from the right neighbor, a different
adjustment is needed.
- ITS#8300 simplify
- ITS#8300 more for node_move
When moving a node from one page to another, make sure other cursors'
parent index gets adjusted too.
The tree height can also increase during rebalance, not just shrink.
This can happen if update_key needs to split a parent branch page.
Change-Id: Ie232bd9f4a6225b912b912a68f0b35411a632317