From bfdd7b2c261182e9499f65739fa0e9988b05aa53 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Wed, 9 Feb 2022 18:55:16 +0800 Subject: [PATCH] create stb --- include/common/tmsg.h | 12 ++++++------ source/libs/parser/src/astToMsg.c | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 04742e547d..611902e8d9 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 0402c5c60f..dbbfc8be2e 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; } -- GitLab