|
|
@ -4935,9 +4935,11 @@ fetchm: |
|
|
|
case MDB_NEXT: |
|
|
|
case MDB_NEXT: |
|
|
|
case MDB_NEXT_DUP: |
|
|
|
case MDB_NEXT_DUP: |
|
|
|
case MDB_NEXT_NODUP: |
|
|
|
case MDB_NEXT_NODUP: |
|
|
|
if (!(mc->mc_flags & C_INITIALIZED)) |
|
|
|
if (!(mc->mc_flags & C_INITIALIZED)) { |
|
|
|
rc = mdb_cursor_first(mc, key, data); |
|
|
|
rc = mdb_cursor_first(mc, key, data); |
|
|
|
else |
|
|
|
if (rc) |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} else |
|
|
|
rc = mdb_cursor_next(mc, key, data, op); |
|
|
|
rc = mdb_cursor_next(mc, key, data, op); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case MDB_PREV: |
|
|
|
case MDB_PREV: |
|
|
@ -4945,6 +4947,8 @@ fetchm: |
|
|
|
case MDB_PREV_NODUP: |
|
|
|
case MDB_PREV_NODUP: |
|
|
|
if (!(mc->mc_flags & C_INITIALIZED)) { |
|
|
|
if (!(mc->mc_flags & C_INITIALIZED)) { |
|
|
|
rc = mdb_cursor_last(mc, key, data); |
|
|
|
rc = mdb_cursor_last(mc, key, data); |
|
|
|
|
|
|
|
if (rc) |
|
|
|
|
|
|
|
break; |
|
|
|
mc->mc_flags |= C_INITIALIZED; |
|
|
|
mc->mc_flags |= C_INITIALIZED; |
|
|
|
mc->mc_ki[mc->mc_top]++; |
|
|
|
mc->mc_ki[mc->mc_top]++; |
|
|
|
} |
|
|
|
} |
|
|
|