提交 212e24dd 编写于 作者: H Hongze Cheng

more TDB

上级 6276f2c3
...@@ -914,6 +914,7 @@ static int tdbBtreeEncodePayload(SPage *pPage, u8 *pPayload, const void *pKey, i ...@@ -914,6 +914,7 @@ static int tdbBtreeEncodePayload(SPage *pPage, u8 *pPayload, const void *pKey, i
return 0; return 0;
} }
// TODO: allow vLen = 0
static int tdbBtreeEncodeCell(SPage *pPage, const void *pKey, int kLen, const void *pVal, int vLen, SCell *pCell, static int tdbBtreeEncodeCell(SPage *pPage, const void *pKey, int kLen, const void *pVal, int vLen, SCell *pCell,
int *szCell) { int *szCell) {
u8 flags; u8 flags;
......
...@@ -17,10 +17,8 @@ TEST(tdb_test, simple_test) { ...@@ -17,10 +17,8 @@ TEST(tdb_test, simple_test) {
GTEST_ASSERT_EQ(ret, 0); GTEST_ASSERT_EQ(ret, 0);
{ {
char key[64]; char key[64];
char val[64]; char val[64];
void *pVal = NULL;
int vLen;
{ // Insert some data { // Insert some data
...@@ -33,6 +31,9 @@ TEST(tdb_test, simple_test) { ...@@ -33,6 +31,9 @@ TEST(tdb_test, simple_test) {
} }
{ // Query the data { // Query the data
void *pVal = NULL;
int vLen;
for (int i = 1; i <= nData; i++) { for (int i = 1; i <= nData; i++) {
sprintf(key, "key%d", i); sprintf(key, "key%d", i);
sprintf(val, "value%d", i); sprintf(val, "value%d", i);
...@@ -46,6 +47,8 @@ TEST(tdb_test, simple_test) { ...@@ -46,6 +47,8 @@ TEST(tdb_test, simple_test) {
} }
{ // Loop to query the data { // Loop to query the data
// STDbC *pDBC;
// tdbDBNext(pDBC, p)
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册