mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 01:14:13 +08:00
mdbx-chk: use mdbx_env_stat2() and mdbx_env_stat2() to avoid races.
Change-Id: Ib956c19bec0b8bf9999cf1e97b8b630f119a0906
This commit is contained in:
parent
17407c9ecc
commit
bc3d1a84cc
@ -1060,13 +1060,13 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
maxkeysize = rc;
|
||||
|
||||
rc = mdbx_env_info(env, &envinfo, sizeof(envinfo));
|
||||
rc = mdbx_env_info2(env, txn, &envinfo, sizeof(envinfo));
|
||||
if (rc) {
|
||||
error("mdbx_env_info failed, error %d %s\n", rc, mdbx_strerror(rc));
|
||||
goto bailout;
|
||||
}
|
||||
|
||||
rc = mdbx_env_stat(env, &envstat, sizeof(envstat));
|
||||
rc = mdbx_env_stat2(env, txn, &envstat, sizeof(envstat));
|
||||
if (rc) {
|
||||
error("mdbx_env_stat failed, error %d %s\n", rc, mdbx_strerror(rc));
|
||||
goto bailout;
|
||||
|
Loading…
x
Reference in New Issue
Block a user