diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 04742e547de8c3cbfbf1a4e38f3aa2734176488b..611902e8d921cfc13af70fe49f3fd95b9e9ca72a 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -163,6 +163,12 @@ typedef struct { int32_t vgVersion; } SBuildUseDBInput; +typedef struct SField { + char name[TSDB_COL_NAME_LEN]; + uint8_t type; + int32_t bytes; +} SField; + #pragma pack(push, 1) // null-terminated string instead of char array to avoid too many memory consumption in case of more than 1M tableMeta @@ -249,12 +255,6 @@ typedef struct SSchema { char name[TSDB_COL_NAME_LEN]; } SSchema; -typedef struct SField { - char name[TSDB_COL_NAME_LEN]; - uint8_t type; - int32_t bytes; -} SField; - typedef struct { char name[TSDB_TABLE_FNAME_LEN]; int8_t igExists; diff --git a/source/libs/parser/src/astToMsg.c b/source/libs/parser/src/astToMsg.c index 0402c5c60f5b6bc4ed0e7591e878f5128531427b..dbbfc8be2edeef04f50b59c1be404b05a36d9e84 100644 --- a/source/libs/parser/src/astToMsg.c +++ b/source/libs/parser/src/astToMsg.c @@ -277,6 +277,7 @@ SMCreateStbReq* buildCreateStbMsg(SCreateTableSql* pCreateTableSql, int32_t* len void *buf = req; tSerializeSMCreateStbReq(&buf, &createReq); + *len = tlen; return req; }