summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2013-12-10 16:54:10 -0500
committerKeith Bostic <keith@wiredtiger.com>2013-12-10 16:54:10 -0500
commit316982d8c60fc491d4863d75cbb02c8b858568b9 (patch)
treeb577c65e7e973ffffd6c9a7824fc5d2ca3238d7f
parentee6e36335686a9519878fd74ad2b869433b376e2 (diff)
downloadmongo-316982d8c60fc491d4863d75cbb02c8b858568b9.tar.gz
Turns out truncation does delete without instantiating keys -- put
the code back and update the comment for clarity.
-rw-r--r--src/btree/rec_write.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/btree/rec_write.c b/src/btree/rec_write.c
index 4840e863eb0..93f50ced337 100644
--- a/src/btree/rec_write.c
+++ b/src/btree/rec_write.c
@@ -3458,15 +3458,21 @@ __rec_row_leaf(WT_SESSION_IMPL *session,
* blocks. Don't worry about reuse, reusing
* keys from a row-store page reconciliation
* seems unlikely enough to ignore.
- *
- * Keys are part of the name-space though, we
- * can't remove them from the in-memory tree;
- * assert the key was instantiated, otherwise
- * we might try and look it up.
*/
__wt_cell_unpack(cell, unpack);
if (unpack->ovfl) {
- WT_ASSERT(session, ikey != NULL);
+ /*
+ * Keys are part of the name-space, we
+ * can't remove them from the in-memory
+ * tree; if an overflow key was deleted
+ * without being instantiated (for
+ * example, cursor-based trunction, do
+ * it now.
+ */
+ if (ikey == NULL)
+ WT_ERR(__wt_row_leaf_key_work(
+ session,
+ page, rip, NULL, 1));
/*
* Acquire the overflow lock to avoid