[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: openldap.git branch mdb.master updated. 58e9c3add8c3fbe88f930531f237f070a652249b
On 21/07/14 17:34, openldap-commit2devel@OpenLDAP.org wrote:
commit 58e9c3add8c3fbe88f930531f237f070a652249b
Author: Howard Chu <hyc@symas.com>
Date: Mon Jul 21 08:33:59 2014 -0700
Fix mdb_cursor_count, reject uninit'd cursor
I think EINVAL is wrong, it need not reflect an obvious
programmer error. MDB_NOTFOUND seems better. Consider:
mdb_cursor_put(cursor, &key, &data, 0);
mdb_del(txn, dbi, &key2, NULL));
rc = mdb_cursor_count(cursor, &count);
where key2 happens to match key.
Makes me wonder about the EINVAL for an uninitialized xcursor.
Maybe cursor_count should initialize it in that case.
--
Hallvard