mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 17:34:14 +08:00
mdbx: fix mdbx_set_attr().
Change-Id: I6628a0629a17f99f39098b8ccb76259cd65dd353
This commit is contained in:
parent
b4e0344de7
commit
58f7674fa5
@ -11279,13 +11279,13 @@ int mdbx_set_attr(MDBX_txn *txn, MDBX_dbi dbi, MDBX_val *key, MDBX_val *data,
|
||||
return rc;
|
||||
}
|
||||
|
||||
mdbx_attr_t old_attr;
|
||||
mdbx_attr_t old_attr = 0;
|
||||
rc = mdbx_attr_peek(&old_data, &old_attr);
|
||||
if (unlikely(rc != MDBX_SUCCESS))
|
||||
return rc;
|
||||
|
||||
if (old_attr == attr && (!data || (data->iov_len == old_data.iov_len &&
|
||||
memcpy(data->iov_base, old_data.iov_base,
|
||||
memcmp(data->iov_base, old_data.iov_base,
|
||||
old_data.iov_len) == 0)))
|
||||
return MDBX_SUCCESS;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user