From fa8b68af1fc8f15229afc2802a3833697685d647 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Thu, 21 Nov 2019 14:25:27 +0300 Subject: [PATCH] mdbx-test: fix speculum_verify(). Change-Id: I5bdcf771dd5d6117230c964616b4f4ed81f084f7 --- test/test.cc | 5 ++++- test/test.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/test.cc b/test/test.cc index d955f25c..f32befd7 100644 --- a/test/test.cc +++ b/test/test.cc @@ -654,10 +654,13 @@ int testcase::remove(const keygen::buffer &akey, const keygen::buffer &adata) { return mdbx_del(txn_guard.get(), dbi, &akey->value, &adata->value); } -bool testcase::speculum_verify() const { +bool testcase::speculum_verify() { if (!config.params.speculum) return true; + if (!txn_guard) + txn_begin(true); + char dump_key[128], dump_value[128]; char dump_mkey[128], dump_mvalue[128]; diff --git a/test/test.h b/test/test.h index 178100e1..3be05c11 100644 --- a/test/test.h +++ b/test/test.h @@ -153,7 +153,7 @@ protected: } last; SET speculum; - bool speculum_verify() const; + bool speculum_verify(); int insert(const keygen::buffer &akey, const keygen::buffer &adata, unsigned flags); int replace(const keygen::buffer &akey, const keygen::buffer &new_value,