mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:04:12 +08:00
mdbx: minor simplify mdb_del0().
This commit is contained in:
parent
61e1efeb85
commit
7bf9d381ee
7
mdb.c
7
mdb.c
@ -8779,7 +8779,7 @@ mdb_del0(MDB_txn *txn, MDB_dbi dbi,
|
||||
MDB_cursor mc;
|
||||
MDB_xcursor mx;
|
||||
MDB_cursor_op op;
|
||||
MDB_val rdata, *xdata;
|
||||
MDB_val rdata;
|
||||
int rc, exact = 0;
|
||||
DKBUF;
|
||||
|
||||
@ -8790,13 +8790,12 @@ mdb_del0(MDB_txn *txn, MDB_dbi dbi,
|
||||
if (data) {
|
||||
op = MDB_GET_BOTH;
|
||||
rdata = *data;
|
||||
xdata = &rdata;
|
||||
data = &rdata;
|
||||
} else {
|
||||
op = MDB_SET;
|
||||
xdata = NULL;
|
||||
flags |= MDB_NODUPDATA;
|
||||
}
|
||||
rc = mdb_cursor_set(&mc, key, xdata, op, &exact);
|
||||
rc = mdb_cursor_set(&mc, key, data, op, &exact);
|
||||
if (likely(rc == 0)) {
|
||||
/* let mdb_page_split know about this cursor if needed:
|
||||
* delete will trigger a rebalance; if it needs to move
|
||||
|
Loading…
x
Reference in New Issue
Block a user