mdbx: backport - Tweak MDB_PREV_MULTIPLE for uninit'd cursor.

Change-Id: I1f07e7c4d80631a1a0b2c70a936ef7b458baa11a
This commit is contained in:
Howard Chu 2016-02-16 23:34:27 +00:00 committed by Leo Yuriev
parent 9d775b0a36
commit ded1ada9eb

6
mdb.c
View File

@ -6420,8 +6420,10 @@ fetchm:
break;
}
if (!(mc->mc_flags & C_INITIALIZED))
rc = mdb_cursor_first(mc, key, data);
else {
rc = mdb_cursor_last(mc, key, data);
else
rc = MDB_SUCCESS;
if (rc == MDB_SUCCESS) {
MDB_cursor *mx = &mc->mc_xcursor->mx_cursor;
if (mx->mc_flags & C_INITIALIZED) {
rc = mdb_cursor_sibling(mx, 0);