mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-06 22:44:14 +08:00
mdbx-tools: fix mdbx_chk for new limits API.
Change-Id: I67f077296a477ea258b0b0d9e02319f2134a8a74
This commit is contained in:
parent
d80654fa07
commit
4e4a56eda2
@ -89,7 +89,7 @@ MDBX_env *env;
|
|||||||
MDBX_txn *txn;
|
MDBX_txn *txn;
|
||||||
MDBX_envinfo envinfo;
|
MDBX_envinfo envinfo;
|
||||||
MDBX_stat envstat;
|
MDBX_stat envstat;
|
||||||
size_t maxkeysize, userdb_count, skipped_subdb;
|
size_t userdb_count, skipped_subdb;
|
||||||
uint64_t total_unused_bytes, reclaimable_pages, gc_pages, alloc_pages,
|
uint64_t total_unused_bytes, reclaimable_pages, gc_pages, alloc_pages,
|
||||||
unused_pages, backed_pages;
|
unused_pages, backed_pages;
|
||||||
unsigned verbose;
|
unsigned verbose;
|
||||||
@ -648,6 +648,8 @@ static int process_db(MDBX_dbi dbi_handle, char *dbi_name, visitor *handler,
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const size_t maxkeysize = mdbx_env_get_maxkeysize_ex(env, flags);
|
||||||
|
|
||||||
saved_list = problems_push();
|
saved_list = problems_push();
|
||||||
prev_key.iov_base = NULL;
|
prev_key.iov_base = NULL;
|
||||||
prev_key.iov_len = 0;
|
prev_key.iov_len = 0;
|
||||||
@ -1054,14 +1056,6 @@ int main(int argc, char *argv[]) {
|
|||||||
goto bailout;
|
goto bailout;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = mdbx_env_get_maxkeysize(env);
|
|
||||||
if (rc < 0) {
|
|
||||||
error("mdbx_env_get_maxkeysize failed, error %d %s\n", rc,
|
|
||||||
mdbx_strerror(rc));
|
|
||||||
goto bailout;
|
|
||||||
}
|
|
||||||
maxkeysize = rc;
|
|
||||||
|
|
||||||
rc = mdbx_env_info_ex(env, txn, &envinfo, sizeof(envinfo));
|
rc = mdbx_env_info_ex(env, txn, &envinfo, sizeof(envinfo));
|
||||||
if (rc) {
|
if (rc) {
|
||||||
error("mdbx_env_info failed, error %d %s\n", rc, mdbx_strerror(rc));
|
error("mdbx_env_info failed, error %d %s\n", rc, mdbx_strerror(rc));
|
||||||
@ -1160,10 +1154,11 @@ int main(int argc, char *argv[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
print(" - pagesize %u (%u system), max keysize %" PRIuPTR
|
print(" - pagesize %u (%u system), max keysize %d..%d"
|
||||||
", max readers %u\n",
|
", max readers %u\n",
|
||||||
envinfo.mi_dxb_pagesize, envinfo.mi_sys_pagesize, maxkeysize,
|
envinfo.mi_dxb_pagesize, envinfo.mi_sys_pagesize,
|
||||||
envinfo.mi_maxreaders);
|
mdbx_env_get_maxkeysize_ex(env, MDBX_DUPSORT),
|
||||||
|
mdbx_env_get_maxkeysize_ex(env, 0), envinfo.mi_maxreaders);
|
||||||
print_size(" - mapsize ", envinfo.mi_mapsize, "\n");
|
print_size(" - mapsize ", envinfo.mi_mapsize, "\n");
|
||||||
if (envinfo.mi_geo.lower == envinfo.mi_geo.upper)
|
if (envinfo.mi_geo.lower == envinfo.mi_geo.upper)
|
||||||
print_size(" - fixed datafile: ", envinfo.mi_geo.current, "");
|
print_size(" - fixed datafile: ", envinfo.mi_geo.current, "");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user