now TDB can write 1M records

This commit is contained in:
Hongze Cheng 2022-03-24 09:53:34 +00:00
parent 347d1e6f99
commit 61b2f52dca
2 changed files with 8 additions and 7 deletions

View File

@ -817,11 +817,12 @@ static int tdbBtreeBalanceNonRoot(SBTree *pBt, SPage *pParent, int idx) {
}
}
for (int i = 0; i < 3; i++) {
if (pDivCell[i]) {
free(pDivCell[i]);
}
}
// TODO: here has memory leak
// for (int i = 0; i < 3; i++) {
// if (pDivCell[i]) {
// free(pDivCell[i]);
// }
// }
return 0;
}

View File

@ -6,10 +6,10 @@ TEST(tdb_test, simple_test) {
int ret;
STEnv *pEnv;
STDb *pDb;
int nData = 160511;
int nData = 1000000;
// Open Env
ret = tdbEnvOpen("tdb", 1024, 25600, &pEnv);
ret = tdbEnvOpen("tdb", 4096, 25600, &pEnv);
GTEST_ASSERT_EQ(ret, 0);
// Create a database