mdbx: refine mdbx.h and API description, etc (5 of 5).

Change-Id: I851736cccb4d0271d6f351e1358cc5c4e1257bb4
This commit is contained in:
Leonid Yuriev
2019-09-26 20:00:22 +03:00
parent 1ab33333bc
commit 20447c877d
7 changed files with 304 additions and 92 deletions

View File

@@ -16,7 +16,7 @@ case ${UNAME} in
Linux)
MAKE=make
if [[ ! -v TESTDB_DIR || -z "$TESTDB_DIR" ]]; then
for old_test_dir in $(ls -d /tmp/mdbx-test.[0-9]*); do
for old_test_dir in $(ls -d /dev/shm/mdbx-test.[0-9]*); do
rm -rf $old_test_dir
done
TESTDB_DIR="/dev/shm/mdbx-test.$$"

View File

@@ -76,8 +76,8 @@ const char *keygencase2str(const keygen_case keycase) {
//-----------------------------------------------------------------------------
int testcase::oom_callback(MDBX_env *env, int pid, mdbx_tid_t tid, uint64_t txn,
unsigned gap, int retry) {
int testcase::oom_callback(MDBX_env *env, mdbx_pid_t pid, mdbx_tid_t tid,
uint64_t txn, unsigned gap, int retry) {
testcase *self = (testcase *)mdbx_env_get_userctx(env);
@@ -510,7 +510,7 @@ void testcase::db_table_close(MDBX_dbi handle) {
void testcase::checkdata(const char *step, MDBX_dbi handle, MDBX_val key2check,
MDBX_val expected_valued) {
MDBX_val actual_value = expected_valued;
int rc = mdbx_get2(txn_guard.get(), handle, &key2check, &actual_value);
int rc = mdbx_get_nearest(txn_guard.get(), handle, &key2check, &actual_value);
if (unlikely(rc != MDBX_SUCCESS))
failure_perror(step, rc);
if (!is_samedata(&actual_value, &expected_valued))

View File

@@ -98,8 +98,8 @@ protected:
mutable chrono::time progress_timestamp;
} last;
static int oom_callback(MDBX_env *env, int pid, mdbx_tid_t tid, uint64_t txn,
unsigned gap, int retry);
static int oom_callback(MDBX_env *env, mdbx_pid_t pid, mdbx_tid_t tid,
uint64_t txn, unsigned gap, int retry);
void db_prepare();
void db_open();