summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cursor/cur_log.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/cursor/cur_log.c b/src/cursor/cur_log.c
index b7f11576425..5084c0d0fe4 100644
--- a/src/cursor/cur_log.c
+++ b/src/cursor/cur_log.c
@@ -237,8 +237,11 @@ __curlog_next(WT_CURSOR *cursor)
*/
if (cl->stepp == NULL || cl->stepp >= cl->stepp_end || !*cl->stepp) {
cl->txnid = 0;
- WT_ERR(__wt_log_scan(session, cl->next_lsn, WT_LOGSCAN_ONE,
- __curlog_logrec, cl));
+ ret = __wt_log_scan(session, cl->next_lsn, WT_LOGSCAN_ONE,
+ __curlog_logrec, cl);
+ if (ret == ENOENT)
+ ret = WT_NOTFOUND;
+ WT_ERR(ret);
}
WT_ASSERT(session, cl->logrec->data != NULL);
WT_ERR(__curlog_kv(session, cursor));
@@ -271,8 +274,11 @@ __curlog_search(WT_CURSOR *cursor)
*/
WT_ERR(__wt_cursor_get_key((WT_CURSOR *)cl,
&key.file, &key.offset, &counter));
- WT_ERR(__wt_log_scan(session, &key, WT_LOGSCAN_ONE,
- __curlog_logrec, cl));
+ ret = __wt_log_scan(session, &key, WT_LOGSCAN_ONE,
+ __curlog_logrec, cl);
+ if (ret == ENOENT)
+ ret = WT_NOTFOUND;
+ WT_ERR(ret);
WT_ERR(__curlog_kv(session, cursor));
WT_STAT_FAST_CONN_INCR(session, cursor_search);
WT_STAT_FAST_DATA_INCR(session, cursor_search);