From eb9d3f2196581a1c65534766e582e9dbb7d1e121 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 24 Mar 2022 08:40:37 +0000 Subject: [PATCH] more TDB --- source/libs/tdb/src/inc/tdbDb.h | 3 ++- source/libs/tdb/test/tdbTest.cpp | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/libs/tdb/src/inc/tdbDb.h b/source/libs/tdb/src/inc/tdbDb.h index 6a9d653eac..7a65966be3 100644 --- a/source/libs/tdb/src/inc/tdbDb.h +++ b/source/libs/tdb/src/inc/tdbDb.h @@ -20,7 +20,8 @@ extern "C" { #endif -typedef struct STDb STDb; +typedef struct STDb STDb; +typedef struct STDbC STDbC; int tdbDbOpen(const char *fname, int keyLen, int valLen, FKeyComparator keyCmprFn, STEnv *pEnv, STDb **ppDb); int tdbDbClose(STDb *pDb); diff --git a/source/libs/tdb/test/tdbTest.cpp b/source/libs/tdb/test/tdbTest.cpp index 5285a5ee94..79532d07b7 100644 --- a/source/libs/tdb/test/tdbTest.cpp +++ b/source/libs/tdb/test/tdbTest.cpp @@ -6,10 +6,10 @@ TEST(tdb_test, simple_test) { int ret; STEnv *pEnv; STDb *pDb; - int nData = 50000; + int nData = 200000; // Open Env - ret = tdbEnvOpen("tdb", 1024, 2560, &pEnv); + ret = tdbEnvOpen("tdb", 1024, 25600, &pEnv); GTEST_ASSERT_EQ(ret, 0); // Create a database @@ -44,6 +44,9 @@ TEST(tdb_test, simple_test) { GTEST_ASSERT_EQ(memcmp(val, pVal, vLen), 0); } } + + { // Loop to query the data + } } ret = tdbDbDrop(pDb); -- GitLab