mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-30 11:29:19 +08:00
mdbx: fix mdbx_cursor_put().
Change-Id: I280c6f275372952ce3411e564928ad6c3387b00c
This commit is contained in:
parent
78143d9a48
commit
6d33c137f6
@ -8333,6 +8333,10 @@ new_sub:
|
|||||||
rc = mdbx_page_split(mc, key, rdata, P_INVALID, nflags);
|
rc = mdbx_page_split(mc, key, rdata, P_INVALID, nflags);
|
||||||
} else {
|
} else {
|
||||||
/* There is room already in this leaf page. */
|
/* There is room already in this leaf page. */
|
||||||
|
if (IS_LEAF2(mc->mc_pg[mc->mc_top])) {
|
||||||
|
mdbx_cassert(mc, nflags == 0 && rdata->iov_len == 0);
|
||||||
|
rc = mdbx_node_add_leaf2(mc, mc->mc_ki[mc->mc_top], key);
|
||||||
|
} else
|
||||||
rc = mdbx_node_add_leaf(mc, mc->mc_ki[mc->mc_top], key, rdata, nflags);
|
rc = mdbx_node_add_leaf(mc, mc->mc_ki[mc->mc_top], key, rdata, nflags);
|
||||||
if (likely(rc == 0)) {
|
if (likely(rc == 0)) {
|
||||||
/* Adjust other cursors pointing to mp */
|
/* Adjust other cursors pointing to mp */
|
||||||
|
Loading…
Reference in New Issue
Block a user