branches/innodb+: ibuf_insert_low(): Correct an off-by-one error that caused

Issue #117.  Before buffering IBUF_OP_DELETE, require that there be at least
two records on the page.  In that way, at least one record will remain after
the delete operation has been merged.
This commit is contained in:
marko 2008-11-19 20:13:27 +00:00
parent 8437e7c140
commit 01339a767c

View file

@ -3235,7 +3235,7 @@ ibuf_insert_low(
? &min_n_recs
: NULL, &mtr);
if (op == IBUF_OP_DELETE && min_n_recs == 0) {
if (op == IBUF_OP_DELETE && min_n_recs < 2) {
/* The page could become empty after the record is
deleted. Refuse to buffer the operation. */
err = DB_STRONG_FAIL;