pma: mlist restoration bugfix

more precisely fixes erroneous logic in child node CoWing
This commit is contained in:
barter-simsum 2024-02-29 18:28:43 -05:00
parent aeb3f5fb50
commit 21a1fcce39

View File

@ -1563,7 +1563,8 @@ _bt_insert2(BT_state *state, vaof_t lo, vaof_t hi, pgno_t fo,
/* do we need to CoW the child node? */ /* do we need to CoW the child node? */
if (!_bt_ischilddirty(node, childidx)) { if (!_bt_ischilddirty(node, childidx)) {
pgno_t pgno; pgno_t pgno;
_node_cow(state, node, &pgno); BT_page *child = _node_get(state, node->datk[childidx].fo);
_node_cow(state, child, &pgno);
node->datk[childidx].fo = pgno; node->datk[childidx].fo = pgno;
_bt_dirtychild(node, childidx); _bt_dirtychild(node, childidx);
} }