mirror of
https://github.com/isar/libmdbx.git
synced 2025-02-04 02:39:36 +08:00
mdbx-tools: use mdbx_cursor_bind()
inside the mdbx_load
.
Change-Id: I632841817331dfd493125c95350ec79e26147171
This commit is contained in:
parent
0f64d0ee95
commit
d9ceb84445
@ -742,9 +742,7 @@ int main(int argc, char *argv[]) {
|
||||
goto txn_abort;
|
||||
}
|
||||
|
||||
if (batch == 10000 || txn_info.txn_space_dirty > MEGABYTE * 16) {
|
||||
mdbx_cursor_close(mc);
|
||||
mc = nullptr;
|
||||
if (batch == 10000 || txn_info.txn_space_dirty > MEGABYTE * 256) {
|
||||
rc = mdbx_txn_commit(txn);
|
||||
if (unlikely(rc != MDBX_SUCCESS)) {
|
||||
error("mdbx_txn_commit", rc);
|
||||
@ -757,9 +755,9 @@ int main(int argc, char *argv[]) {
|
||||
error("mdbx_txn_begin", rc);
|
||||
goto env_close;
|
||||
}
|
||||
rc = mdbx_cursor_open(txn, dbi, &mc);
|
||||
rc = mdbx_cursor_bind(txn, mc, dbi);
|
||||
if (unlikely(rc != MDBX_SUCCESS)) {
|
||||
error("mdbx_cursor_open", rc);
|
||||
error("mdbx_cursor_bind", rc);
|
||||
goto txn_abort;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user