summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2012-09-22 10:24:54 +0000
committerKeith Bostic <keith@wiredtiger.com>2012-09-22 10:24:54 +0000
commit01a251cdfc63b2bfa17e9bbb88eceabd1a9d4b76 (patch)
tree2489aa84a6ecbfc2352d8fd9d282cbc3da7ac039
parent8f720a23a5180ba33dd7ce1cc944ef6f35a2394f (diff)
parent37e8afaa1ae37d3796d1434092405c9b0c374294 (diff)
downloadmongo-01a251cdfc63b2bfa17e9bbb88eceabd1a9d4b76.tar.gz
Merge branch 'develop' into skips
-rw-r--r--src/block/block_vrfy.c6
-rw-r--r--src/btree/bt_cursor.c7
-rw-r--r--src/btree/col_modify.c7
3 files changed, 11 insertions, 9 deletions
diff --git a/src/block/block_vrfy.c b/src/block/block_vrfy.c
index 0f68f1be50c..cef7c9b3a2b 100644
--- a/src/block/block_vrfy.c
+++ b/src/block/block_vrfy.c
@@ -498,9 +498,9 @@ __verify_ckptfrag_add(
for (f = frag, i = 0; i < frags; ++f, ++i)
if (!__bit_test(block->fragckpt, f))
WT_RET_MSG(session, WT_ERROR,
- "checkpoint fragment at %" PRIuMAX " referenced "
- "multiple times in a single checkpoint or found in "
- "the checkpoint but not listed in the checkpoint's "
+ "fragment at %" PRIuMAX " referenced multiple "
+ "times in a single checkpoint or found in the "
+ "checkpoint but not listed in the checkpoint's "
"allocation list",
(uintmax_t)offset);
diff --git a/src/btree/bt_cursor.c b/src/btree/bt_cursor.c
index 380ba8253e7..b72c4a12fd0 100644
--- a/src/btree/bt_cursor.c
+++ b/src/btree/bt_cursor.c
@@ -552,6 +552,7 @@ __cursor_truncate(WT_SESSION_IMPL *session,
for (;;) {
if ((ret = __wt_btcur_prev(stop, 1)) != 0)
break;
+ stop->compare = 0; /* Exact match */
if ((ret = rmfunc(session, stop, 2)) != 0)
break;
}
@@ -562,11 +563,13 @@ __cursor_truncate(WT_SESSION_IMPL *session,
for (;;) {
if ((ret = __wt_btcur_next(start, 1)) != 0)
break;
+ start->compare = 0; /* Exact match */
if ((ret = rmfunc(session, start, 2)) != 0)
break;
}
} while (ret == WT_RESTART);
} else {
+
do {
WT_RET(__wt_btcur_remove(start));
for (;;) {
@@ -574,6 +577,7 @@ __cursor_truncate(WT_SESSION_IMPL *session,
break;
if ((ret = __wt_btcur_next(start, 1)) != 0)
break;
+ start->compare = 0; /* Exact match */
if ((ret = rmfunc(session, start, 2)) != 0)
break;
}
@@ -618,6 +622,7 @@ __cursor_truncate_fix(WT_SESSION_IMPL *session,
for (;;) {
if ((ret = __wt_btcur_prev(stop, 1)) != 0)
break;
+ stop->compare = 0; /* Exact match */
value = (uint8_t *)stop->iface.value.data;
if (*value != 0 &&
(ret = rmfunc(session, stop, 2)) != 0)
@@ -631,6 +636,7 @@ __cursor_truncate_fix(WT_SESSION_IMPL *session,
for (;;) {
if ((ret = __wt_btcur_next(start, 1)) != 0)
break;
+ start->compare = 0; /* Exact match */
value = (uint8_t *)start->iface.value.data;
if (*value != 0 &&
(ret = rmfunc(session, start, 2)) != 0)
@@ -646,6 +652,7 @@ __cursor_truncate_fix(WT_SESSION_IMPL *session,
break;
if ((ret = __wt_btcur_next(start, 1)) != 0)
break;
+ start->compare = 0; /* Exact match */
value = (uint8_t *)start->iface.value.data;
if (*value != 0 &&
(ret = rmfunc(session, start, 2)) != 0)
diff --git a/src/btree/col_modify.c b/src/btree/col_modify.c
index bc5091a4981..1fe5253d29d 100644
--- a/src/btree/col_modify.c
+++ b/src/btree/col_modify.c
@@ -78,13 +78,8 @@ __wt_col_modify(WT_SESSION_IMPL *session, WT_CURSOR_BTREE *cbt, int op)
* Else, allocate an insert array as necessary, build a WT_INSERT and
* WT_UPDATE structure pair, and call a serialized function to insert
* the WT_INSERT structure.
- *
- * The test is slight tricky: we're either coming here after a search
- * (in which case we check the search's comparison and the WT_INSERT
- * structure), or a truncation (in which case we check the WT_INSERT
- * structure, it's a match by definition).
*/
- if (cbt->ins != NULL && (cbt->compare == 0 || op == 2)) {
+ if (cbt->compare == 0 && cbt->ins != NULL) {
/* Make sure the update can proceed. */
WT_ERR(__wt_update_check(session, page, cbt->ins->upd));