From 486fb3c36def3a1431c720a09ad838e53fa792b4 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Mon, 7 Oct 2024 23:03:44 +0300 Subject: [PATCH] =?UTF-8?q?mdbx-testing:=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BC=D0=B0=D0=BA=D1=81?= =?UTF-8?q?=D0=B8=D0=BC=D0=B0=D0=BB=D1=8C=D0=BD=D0=BE=D0=B9=20=D0=B4=D0=BB?= =?UTF-8?q?=D0=B8=D0=BD=D1=8B=20=D0=B7=D0=BD=D0=B0=D1=87=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B9=20=D0=B2=20`extra/crunched-delete`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/extra/crunched_delete.c++ | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/extra/crunched_delete.c++ b/test/extra/crunched_delete.c++ index 89952ddf..e47a0c35 100644 --- a/test/extra/crunched_delete.c++ +++ b/test/extra/crunched_delete.c++ @@ -380,11 +380,18 @@ int main(int argc, const char *argv[]) { mdbx::path db_filename = "test-crunched-del"; mdbx::env::remove(db_filename); + mdbx::env_managed env(db_filename, mdbx::env_managed::create_parameters(), + mdbx::env::operate_parameters(42)); + if (!simple(env) || !next_prev_current(env) || !outofrange_prev(env)) + return EXIT_FAILURE; + std::vector testset; // Там ключи разной длины - от 1 до 64 байт. // Значения разной длины от 100 до 1000 байт. testset.emplace_back(/* keylen_min */ 1, /* keylen_max */ 64, - /* datalen_min */ 100, /* datalen_max */ 4000, + /* datalen_min */ 100, /* datalen_max */ + mdbx_env_get_valsize4page_max( + env, MDBX_db_flags_t(mdbx::value_mode::multi)), /* dups_log2 */ 6); // В одной таблице DupSort: path -> version_u64+data // path - это префикс в дереве. Самые частые длины: 1-5 байт и 32-36 байт. @@ -394,11 +401,6 @@ int main(int argc, const char *argv[]) { testset.emplace_back(8, 8, 1, 5, 10); testset.emplace_back(8, 8, 32, 36, 9); - mdbx::env_managed env(db_filename, mdbx::env_managed::create_parameters(), - mdbx::env::operate_parameters(42)); - if (!simple(env) || !next_prev_current(env) || !outofrange_prev(env)) - return EXIT_FAILURE; - auto txn = env.start_write(); for (unsigned i = 0; i < testset.size(); ++i) create_and_fill(txn, testset[i], i);