/* Returns: RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key not found.  */
static int rec_rdelete(BTREE *t, recno_t nrec)
/* Returns: RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key not found.  */
static int rec_rdelete(BTREE *t, recno_t nrec)
{
	EPG *e;
	PAGE *h;
	int status;
	if ((e = __rec_search(t, nrec, SDELETE)) == NULL)
		return (RET_ERROR);
	h = e->page;
	status = __rec_dleaf(t, h, e->index);
	if (status != RET_SUCCESS) {
		mpool_put(t->bt_mp, h, 0);
		return (status);
	}
	mpool_put(t->bt_mp, h, MPOOL_DIRTY);
	return (RET_SUCCESS);
}