summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2015-02-22 15:56:48 -0500
committerKeith Bostic <keith@wiredtiger.com>2015-02-22 15:56:48 -0500
commitff221a4a7818033e7e313a1a9f65274ade3c8693 (patch)
treecc187018814d16d1fdcb2cf0fa129b120318e9a4
parentf72367f97357cf3e77f0d57d39992686b400ebe7 (diff)
downloadmongo-ff221a4a7818033e7e313a1a9f65274ade3c8693.tar.gz
The start/stop cursors may not have been set.
-rw-r--r--src/schema/schema_truncate.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/schema/schema_truncate.c b/src/schema/schema_truncate.c
index 62ca2131ceb..1eb76226aad 100644
--- a/src/schema/schema_truncate.c
+++ b/src/schema/schema_truncate.c
@@ -171,8 +171,10 @@ __wt_schema_range_truncate(
uri = cursor->internal_uri;
if (WT_PREFIX_MATCH(uri, "file:")) {
- WT_CURSOR_NEEDKEY(start);
- WT_CURSOR_NEEDKEY(stop);
+ if (start != NULL)
+ WT_CURSOR_NEEDKEY(start);
+ if (stop != NULL)
+ WT_CURSOR_NEEDKEY(stop);
WT_WITH_BTREE(session, ((WT_CURSOR_BTREE *)cursor)->btree,
ret = __wt_btcur_range_truncate(
(WT_CURSOR_BTREE *)start, (WT_CURSOR_BTREE *)stop));