提交 6834e624 编写于 作者: H Hongze Cheng

fix another coredump

上级 8b88d1ad
...@@ -93,7 +93,7 @@ static void *vnodeParseCreateTableReq(void *buf, SVCreateTableReq *pReq) { ...@@ -93,7 +93,7 @@ static void *vnodeParseCreateTableReq(void *buf, SVCreateTableReq *pReq) {
break; break;
case META_CHILD_TABLE: case META_CHILD_TABLE:
buf = taosDecodeFixedU64(buf, &(pReq->ctbCfg.suid)); buf = taosDecodeFixedU64(buf, &(pReq->ctbCfg.suid));
buf = tdDecodeKVRow(buf, pReq->ctbCfg.pTag); buf = tdDecodeKVRow(buf, &(pReq->ctbCfg.pTag));
break; break;
case META_NORMAL_TABLE: case META_NORMAL_TABLE:
buf = tdDecodeSchema(buf, &(pReq->ntbCfg.pSchema)); buf = tdDecodeSchema(buf, &(pReq->ntbCfg.pSchema));
......
...@@ -60,6 +60,26 @@ static SKVRow createBasicTag() { ...@@ -60,6 +60,26 @@ static SKVRow createBasicTag() {
return pTag; return pTag;
} }
#if 0
TEST(vnodeApiTest, test_create_table_encode_and_decode_function) {
tb_uid_t suid = 1638166374163;
STSchema *pSchema = createBasicSchema();
STSchema *pTagSchema = createBasicTagSchema();
char tbname[128] = "st";
char * buffer = new char[1024];
void * pBuf = (void *)buffer;
SVnodeReq vCreateSTbReq = VNODE_INIT_CREATE_STB_REQ(tbname, UINT32_MAX, UINT32_MAX, suid, pSchema, pTagSchema);
vnodeBuildReq(&pBuf, &vCreateSTbReq, TSDB_MSG_TYPE_CREATE_TABLE);
SVnodeReq decoded_req;
vnodeParseReq(buffer, &decoded_req, TSDB_MSG_TYPE_CREATE_TABLE);
int k = 10;
}
#endif
TEST(vnodeApiTest, vnodeOpen_vnodeClose_test) { TEST(vnodeApiTest, vnodeOpen_vnodeClose_test) {
GTEST_ASSERT_GE(vnodeInit(), 0); GTEST_ASSERT_GE(vnodeInit(), 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册