mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-06 23:34:13 +08:00
mdbx-test: fix update_flags for non-MDBX_DUPSORT.
This commit is contained in:
parent
0ecc5226d6
commit
f4cd7b5418
@ -65,7 +65,9 @@ bool testcase_hill::run() {
|
|||||||
? MDBX_NODUPDATA
|
? MDBX_NODUPDATA
|
||||||
: MDBX_NODUPDATA | MDBX_NOOVERWRITE;
|
: MDBX_NODUPDATA | MDBX_NOOVERWRITE;
|
||||||
const unsigned update_flags =
|
const unsigned update_flags =
|
||||||
MDBX_CURRENT | MDBX_NODUPDATA | MDBX_NOOVERWRITE;
|
(config.params.table_flags & MDBX_DUPSORT)
|
||||||
|
? MDBX_CURRENT | MDBX_NODUPDATA | MDBX_NOOVERWRITE
|
||||||
|
: MDBX_NODUPDATA;
|
||||||
|
|
||||||
uint64_t serial_count = 0;
|
uint64_t serial_count = 0;
|
||||||
unsigned txn_nops = 0;
|
unsigned txn_nops = 0;
|
||||||
@ -115,7 +117,7 @@ bool testcase_hill::run() {
|
|||||||
rc = mdbx_replace(txn_guard.get(), dbi, &a_key->value, &a_data_0->value,
|
rc = mdbx_replace(txn_guard.get(), dbi, &a_key->value, &a_data_0->value,
|
||||||
&a_data_1->value, update_flags);
|
&a_data_1->value, update_flags);
|
||||||
if (unlikely(rc != MDBX_SUCCESS))
|
if (unlikely(rc != MDBX_SUCCESS))
|
||||||
failure_perror("mdbx_put(update-a: 1->0)", rc);
|
failure_perror("mdbx_replace(update-a: 1->0)", rc);
|
||||||
|
|
||||||
if (++txn_nops >= config.params.batch_write) {
|
if (++txn_nops >= config.params.batch_write) {
|
||||||
txn_restart(false, false);
|
txn_restart(false, false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user