diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 416402a028..b386b729d4 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1240,6 +1240,31 @@ static FORCE_INLINE void* tDeserializeSVCreateTbReq(void* buf, SVCreateTbReq* pR typedef struct SVCreateTbRsp { } SVCreateTbRsp; +typedef struct SVShowTablesReq { + SMsgHead head; +} SVShowTablesReq; + +typedef struct SVShowTablesRsp { + int64_t id; + STableMetaMsg metaInfo; +} SVShowTablesRsp; + +typedef struct SVShowTablesFetchReq { + SMsgHead head; + int64_t id; +} SVShowTablesFetchReq; + +typedef struct SVShowTablesFetchRsp { + int64_t useconds; + int8_t completed; // all results are returned to client + int8_t precision; + int8_t compressed; + int32_t compLen; + + int32_t numOfRows; + char data[]; +} SVShowTablesFetchRsp; + #pragma pack(pop) #ifdef __cplusplus diff --git a/include/common/tmsgdef.h b/include/common/tmsgdef.h index 9aa4325d58..2ed817fca1 100644 --- a/include/common/tmsgdef.h +++ b/include/common/tmsgdef.h @@ -146,6 +146,8 @@ enum { TD_DEF_MSG_TYPE(TDMT_VND_CREATE_TOPIC, "vnode-create-topic", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_VND_ALTER_TOPIC, "vnode-alter-topic", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_VND_DROP_TOPIC, "vnode-drop-topic", NULL, NULL) + TD_DEF_MSG_TYPE(TDMT_VND_SHOW_TABLES, "vnode-show-tables", SVShowTablesReq, SVShowTablesRsp) + TD_DEF_MSG_TYPE(TDMT_VND_SHOW_TABLES_FETCH, "vnode-show-tables-fetch", SVShowTablesFetchReq, SVShowTablesFetchRsp) // Requests handled by QNODE TD_NEW_MSG_SEG(TDMT_QND_MSG)