diff --git a/src/mnode/src/mnodeVgroup.c b/src/mnode/src/mnodeVgroup.c index aa6631ff837010e9fffb3663b5b50a57c61b557c..9345bdae2c30e67129ac43bb817db3e8a9a93403 100644 --- a/src/mnode/src/mnodeVgroup.c +++ b/src/mnode/src/mnodeVgroup.c @@ -660,13 +660,13 @@ static int32_t mnodeGetVgroupMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *p for (int32_t i = 0; i < pShow->maxReplica; ++i) { pShow->bytes[cols] = 2; pSchema[cols].type = TSDB_DATA_TYPE_SMALLINT; - strcpy(pSchema[cols].name, "dnode"); + snprintf(pSchema[cols].name, TSDB_COL_NAME_LEN, "dnode%d", i + 1); pSchema[cols].bytes = htons(pShow->bytes[cols]); cols++; pShow->bytes[cols] = 9 + VARSTR_HEADER_SIZE; pSchema[cols].type = TSDB_DATA_TYPE_BINARY; - strcpy(pSchema[cols].name, "vstatus"); + snprintf(pSchema[cols].name, TSDB_COL_NAME_LEN, "v%dstatus", i + 1); pSchema[cols].bytes = htons(pShow->bytes[cols]); cols++; }