diff options
Diffstat (limited to 'src/third_party/wiredtiger/src/utilities/util_dump.c')
-rwxr-xr-x | src/third_party/wiredtiger/src/utilities/util_dump.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/third_party/wiredtiger/src/utilities/util_dump.c b/src/third_party/wiredtiger/src/utilities/util_dump.c index 9ea4e10e7aa..44897ddf044 100755 --- a/src/third_party/wiredtiger/src/utilities/util_dump.c +++ b/src/third_party/wiredtiger/src/utilities/util_dump.c @@ -51,6 +51,7 @@ int util_dump(WT_SESSION *session, int argc, char *argv[]) { WT_CURSOR *cursor; + WT_CURSOR_DUMP *hs_dump_cursor; WT_DECL_ITEM(tmp); WT_DECL_RET; WT_SESSION_IMPL *session_impl; @@ -61,6 +62,7 @@ util_dump(WT_SESSION *session, int argc, char *argv[]) session_impl = (WT_SESSION_IMPL *)session; cursor = NULL; + hs_dump_cursor = NULL; checkpoint = ofile = simpleuri = uri = timestamp = NULL; hex = json = reverse = false; while ((ch = __wt_getopt(progname, argc, argv, "c:f:t:jrx")) != EOF) @@ -154,8 +156,11 @@ util_dump(WT_SESSION *session, int argc, char *argv[]) * nothing will be visible. The only exception is if we've supplied a timestamp in which * case, we're specifically interested in what is visible at a given read timestamp. */ - if (WT_STREQ(simpleuri, WT_HS_URI) && timestamp == NULL) - F_SET(cursor, WT_CURSTD_IGNORE_TOMBSTONE); + if (WT_STREQ(simpleuri, WT_HS_URI) && timestamp == NULL) { + hs_dump_cursor = (WT_CURSOR_DUMP *)cursor; + /* Set the "ignore tombstone" flag on the underlying cursor. */ + F_SET(hs_dump_cursor->child, WT_CURSTD_IGNORE_TOMBSTONE); + } if (dump_config(session, simpleuri, cursor, hex, json) != 0) goto err; @@ -164,9 +169,11 @@ util_dump(WT_SESSION *session, int argc, char *argv[]) if (json && dump_json_table_end(session) != 0) goto err; - F_CLR(cursor, WT_CURSTD_IGNORE_TOMBSTONE); + if (hs_dump_cursor != NULL) + F_CLR(hs_dump_cursor->child, WT_CURSTD_IGNORE_TOMBSTONE); ret = cursor->close(cursor); cursor = NULL; + hs_dump_cursor = NULL; if (ret != 0) { (void)util_err(session, ret, NULL); goto err; @@ -181,7 +188,8 @@ err: } if (cursor != NULL) { - F_CLR(cursor, WT_CURSTD_IGNORE_TOMBSTONE); + if (hs_dump_cursor != NULL) + F_CLR(hs_dump_cursor->child, WT_CURSTD_IGNORE_TOMBSTONE); if ((ret = cursor->close(cursor)) != 0) ret = util_err(session, ret, NULL); } |