diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2013-08-08 20:05:38 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2013-08-08 20:05:38 +1000 |
commit | 112c757e38c74428a386bb92a433255c213a3ff6 (patch) | |
tree | b204307af233925509d3fa87c86c88f9da2f9e3a /src/cursor/cur_std.c | |
parent | 131f70a4c033a416df30e3e24487560a3bea80af (diff) | |
download | mongo-112c757e38c74428a386bb92a433255c213a3ff6.tar.gz |
Move data source truncate method into WT_DATA_SOURCE.
Diffstat (limited to 'src/cursor/cur_std.c')
-rw-r--r-- | src/cursor/cur_std.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/cursor/cur_std.c b/src/cursor/cur_std.c index 22b812726ad..7851472bdfe 100644 --- a/src/cursor/cur_std.c +++ b/src/cursor/cur_std.c @@ -364,39 +364,6 @@ __cursor_search(WT_CURSOR *cursor) } /* - * __wt_cursor_range_truncate -- - * WT_SESSION->truncate of a cursor range, default implementation. - */ -int -__wt_cursor_range_truncate( - WT_SESSION *wt_session, WT_CURSOR *start, WT_CURSOR *stop) -{ - WT_DECL_RET; - int cmp; - - WT_UNUSED(wt_session); - - if (start == NULL) { - do { - WT_RET(stop->remove(stop)); - } while ((ret = stop->prev(stop)) == 0); - WT_RET_NOTFOUND_OK(ret); - } else if (stop == NULL) { - do { - WT_RET(start->remove(start)); - } while ((ret = start->next(start)) == 0); - WT_RET_NOTFOUND_OK(ret); - } else { - do { - WT_RET(start->compare(start, stop, &cmp)); - WT_RET(start->remove(start)); - } while (cmp < 0 && (ret = start->next(start)) == 0); - WT_RET_NOTFOUND_OK(ret); - } - return (0); -} - -/* * __wt_cursor_close -- * WT_CURSOR->close default implementation. */ @@ -543,9 +510,6 @@ __wt_cursor_init(WT_CURSOR *cursor, cursor->remove = __wt_cursor_notsup; if (cursor->close == NULL) WT_RET_MSG(session, EINVAL, "cursor lacks a close method"); - if (cursor->range_truncate == NULL) - cursor->range_truncate = (int (*) - (WT_SESSION *, WT_CURSOR *, WT_CURSOR *))__wt_cursor_notsup; if (cursor->uri == NULL) WT_RET(__wt_strdup(session, uri, &cursor->uri)); |