summaryrefslogtreecommitdiff
path: root/src/btree/bt_cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/btree/bt_cursor.c')
-rw-r--r--src/btree/bt_cursor.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/btree/bt_cursor.c b/src/btree/bt_cursor.c
index d2aac361ab3..64ff0bd9c69 100644
--- a/src/btree/bt_cursor.c
+++ b/src/btree/bt_cursor.c
@@ -268,7 +268,6 @@ __cursor_row_modify(
int
__wt_btcur_reset(WT_CURSOR_BTREE *cbt)
{
- WT_DECL_RET;
WT_SESSION_IMPL *session;
session = (WT_SESSION_IMPL *)cbt->iface.session;
@@ -276,10 +275,7 @@ __wt_btcur_reset(WT_CURSOR_BTREE *cbt)
WT_STAT_FAST_CONN_INCR(session, cursor_reset);
WT_STAT_FAST_DATA_INCR(session, cursor_reset);
- ret = __curfile_leave(cbt);
- __cursor_search_clear(cbt);
-
- return (ret);
+ return (__cursor_reset(cbt));
}
/*
@@ -325,7 +321,7 @@ __wt_btcur_search(WT_CURSOR_BTREE *cbt)
ret = WT_NOTFOUND;
err: if (ret != 0)
- WT_TRET(__cursor_error_resolve(cbt));
+ WT_TRET(__cursor_reset(cbt));
return (ret);
}
@@ -405,7 +401,7 @@ __wt_btcur_search_near(WT_CURSOR_BTREE *cbt, int *exactp)
}
err: if (ret != 0)
- WT_TRET(__cursor_error_resolve(cbt));
+ WT_TRET(__cursor_reset(cbt));
if (exactp != NULL && (ret == 0 || ret == WT_NOTFOUND))
*exactp = exact;
return (ret);
@@ -501,7 +497,7 @@ err: if (ret == WT_RESTART)
if (ret == 0)
WT_TRET(__curfile_leave(cbt));
if (ret != 0)
- WT_TRET(__cursor_error_resolve(cbt));
+ WT_TRET(__cursor_reset(cbt));
return (ret);
}
@@ -547,7 +543,7 @@ err: if (ret == WT_RESTART)
goto retry;
WT_TRET(__curfile_leave(cbt));
if (ret != 0)
- WT_TRET(__cursor_error_resolve(cbt));
+ WT_TRET(__cursor_reset(cbt));
return (ret);
}
@@ -620,7 +616,7 @@ err: if (ret == WT_RESTART)
ret = 0;
if (ret != 0)
- WT_TRET(__cursor_error_resolve(cbt));
+ WT_TRET(__cursor_reset(cbt));
return (ret);
}
@@ -707,7 +703,7 @@ err: if (ret == WT_RESTART)
WT_TRET(__wt_kv_return(session, cbt, cbt->modify_update));
if (ret != 0)
- WT_TRET(__cursor_error_resolve(cbt));
+ WT_TRET(__cursor_reset(cbt));
return (ret);
}
@@ -745,7 +741,7 @@ __wt_btcur_next_random(WT_CURSOR_BTREE *cbt)
WT_ERR(__wt_btcur_search_near(cbt, 0));
err: if (ret != 0)
- WT_TRET(__cursor_error_resolve(cbt));
+ WT_TRET(__cursor_reset(cbt));
return (ret);
}