summaryrefslogtreecommitdiff
path: root/src/btree/bt_walk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/btree/bt_walk.c')
-rw-r--r--src/btree/bt_walk.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/btree/bt_walk.c b/src/btree/bt_walk.c
index 8e0f4036b79..c7d83d8dfff 100644
--- a/src/btree/bt_walk.c
+++ b/src/btree/bt_walk.c
@@ -244,7 +244,8 @@ ascend: /*
* If we see any child states other than deleted, the
* page isn't empty.
*/
- if (ref->state != WT_REF_DELETED)
+ if (ref->state != WT_REF_DELETED &&
+ !LF_ISSET(WT_READ_TRUNCATE))
empty_internal = false;
if (LF_ISSET(WT_READ_CACHE)) {
@@ -270,6 +271,7 @@ ascend: /*
WT_ERR(__wt_delete_page(session, ref, &skip));
if (skip)
break;
+ empty_internal = false;
} else if (LF_ISSET(WT_READ_COMPACT)) {
/*
* Skip deleted pages, rewriting them doesn't