From 72bc655eceed2e530ecd800ec0644cc7c9b60bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Tue, 15 Feb 2022 18:11:31 +0300 Subject: [PATCH] mdbx++: fix `env::is_empty()` to check leaf-pages instead of branch ones. Seems like an auto-completion mistake. Thanks to https://igor@t.me/libmdbx for reporing. --- src/mdbx.c++ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mdbx.c++ b/src/mdbx.c++ index 49cc5856..56302df2 100644 --- a/src/mdbx.c++ +++ b/src/mdbx.c++ @@ -1248,7 +1248,7 @@ bool env::is_pristine() const { get_info().mi_recent_txnid == INITIAL_TXNID; } -bool env::is_empty() const { return get_stat().ms_branch_pages == 0; } +bool env::is_empty() const { return get_stat().ms_leaf_pages == 0; } #ifdef MDBX_STD_FILESYSTEM_PATH env &env::copy(const ::std::filesystem::path &destination, bool compactify,