#define MDB_BAD_VALSIZE (-30781)
/** The specified DBI was changed unexpectedly */
#define MDB_BAD_DBI (-30780)
+ /** Unexpected problem - txn should abort */
+#define MDB_PROBLEM (-30779)
/** The last defined error code */
-#define MDB_LAST_ERRCODE MDB_BAD_DBI
+#define MDB_LAST_ERRCODE MDB_PROBLEM
/** @} */
/** @brief Statistics for a database in the environment */
"MDB_BAD_TXN: Transaction must abort, has a child, or is invalid",
"MDB_BAD_VALSIZE: Unsupported size of key/DB name/data, or wrong DUPFIXED size",
"MDB_BAD_DBI: The specified DBI handle was closed/changed unexpectedly",
+ "MDB_PROBLEM: Unexpected problem - txn should abort",
};
char *
if (mp != dl[x].mptr) { /* bad cursor? */
mc->mc_flags &= ~(C_INITIALIZED|C_EOF);
txn->mt_flags |= MDB_TXN_ERROR;
- return MDB_CORRUPTED;
+ return MDB_PROBLEM;
}
/* ok, it's ours */
loose = 1;
if (mp != dl[x].mptr) { /* bad cursor? */
mc->mc_flags &= ~(C_INITIALIZED|C_EOF);
txn->mt_flags |= MDB_TXN_ERROR;
- return MDB_CORRUPTED;
+ return MDB_PROBLEM;
}
return 0;
}
j = ++(dl[0].mid);
dl[j] = ix; /* Unsorted. OK when MDB_TXN_ERROR. */
txn->mt_flags |= MDB_TXN_ERROR;
- return MDB_CORRUPTED;
+ return MDB_PROBLEM;
}
}
txn->mt_dirty_room++;
return rc;
bad_sub:
if (rc == MDB_KEYEXIST) /* should not happen, we deleted that item */
- rc = MDB_CORRUPTED;
+ rc = MDB_PROBLEM;
}
mc->mc_txn->mt_flags |= MDB_TXN_ERROR;
return rc;