summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/btree/bt_random.c
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2018-03-14 16:52:29 +1100
committerLuke Chen <luke.chen@mongodb.com>2018-03-14 16:52:29 +1100
commitc5bfa9391f364ad1f36334d95c487a077aa76cea (patch)
tree52e1df6a798ba881bedc2f10d1dbf2dcfe0d90cf /src/third_party/wiredtiger/src/btree/bt_random.c
parent1481f7068376b464eb6dff954f004b023d3bbbd5 (diff)
downloadmongo-c5bfa9391f364ad1f36334d95c487a077aa76cea.tar.gz
Import wiredtiger: b33708d7d9b2971cda05e71fcba6067b230b97cc from branch mongodb-3.8
ref: 60a06941b8..b33708d7d9 for: 3.7.4 WT-3913 Enhance cursor operations to account for prepare state WT-3950 Add some rollback_to_stable statistics WT-3958 Add query API to get most recent checkpoint's stable timestamp WT-3969 enhance format tester to account for prepare state WT-3972 Allow more than 64K cursors to be open on a data source simultaneously WT-3975 arg format mismatch after rwlock changes
Diffstat (limited to 'src/third_party/wiredtiger/src/btree/bt_random.c')
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_random.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/third_party/wiredtiger/src/btree/bt_random.c b/src/third_party/wiredtiger/src/btree/bt_random.c
index 03b5039b00b..8eb120f06ec 100644
--- a/src/third_party/wiredtiger/src/btree/bt_random.c
+++ b/src/third_party/wiredtiger/src/btree/bt_random.c
@@ -302,6 +302,7 @@ __wt_btcur_next_random(WT_CURSOR_BTREE *cbt)
WT_UPDATE *upd;
wt_off_t size;
uint64_t n, skip;
+ bool valid;
btree = cbt->btree;
cursor = &cbt->iface;
@@ -421,7 +422,8 @@ random_page_entry:
* the next entry, if that doesn't work, move to the previous entry.
*/
WT_ERR(__wt_row_random_leaf(session, cbt));
- if (__wt_cursor_valid(cbt, &upd)) {
+ WT_ERR(__wt_cursor_valid(cbt, &upd, &valid));
+ if (valid) {
WT_ERR(__wt_key_return(session, cbt));
WT_ERR(__wt_value_return(session, cbt, upd));
} else {