ITS#8316 cursor fixup in page_merge

Deleting the merged page requires bumping down other ki's
of the page's parent.
vl32b
Howard Chu 9 years ago
parent a98b74e6df
commit 60c34d14ec
  1. 2
      libraries/liblmdb/mdb.c

@ -7963,6 +7963,8 @@ mdb_page_merge(MDB_cursor *csrc, MDB_cursor *cdst)
m3->mc_pg[top] = pdst; m3->mc_pg[top] = pdst;
m3->mc_ki[top] += nkeys; m3->mc_ki[top] += nkeys;
m3->mc_ki[top-1] = cdst->mc_ki[top-1]; m3->mc_ki[top-1] = cdst->mc_ki[top-1];
} else if (m3->mc_ki[top-1] > csrc->mc_ki[top-1]) {
m3->mc_ki[top-1]--;
} }
} }
} }

Loading…
Cancel
Save