diff --git a/src/inc/taosmsg.h b/src/inc/taosmsg.h index 78255a45d5432fffe3ea0d2daf87d94dff041e42..c8bd2c60769ca80eec1d6ac1f2fd390719e367bf 100644 --- a/src/inc/taosmsg.h +++ b/src/inc/taosmsg.h @@ -618,7 +618,7 @@ typedef struct { } SMDVnodeDesc; typedef struct { - char db[TSDB_DB_NAME_LEN]; + char db[TSDB_ACCT_LEN + TSDB_DB_NAME_LEN]; SMDVnodeCfg cfg; SMDVnodeDesc nodes[TSDB_MAX_REPLICA]; } SMDCreateVnodeMsg; diff --git a/src/mnode/inc/mnodeDef.h b/src/mnode/inc/mnodeDef.h index ae1ba98a0f4a15d37824de71e5db81c73effa89c..46d2675705e5b7dc0ee53ba8db8f62a9ad5046df 100644 --- a/src/mnode/inc/mnodeDef.h +++ b/src/mnode/inc/mnodeDef.h @@ -132,7 +132,7 @@ typedef struct SVgObj { int64_t createdTime; int32_t lbDnodeId; int32_t lbTime; - char dbName[TSDB_DB_NAME_LEN]; + char dbName[TSDB_ACCT_LEN + TSDB_DB_NAME_LEN]; int8_t inUse; int8_t accessState; int8_t reserved0[5]; diff --git a/src/mnode/src/mnodeVgroup.c b/src/mnode/src/mnodeVgroup.c index 36fa306c9f5180e1a7fac51424740ab5b6b30cd0..b314bfc8d03689842e33bdbbe9f5197a3bd9f6ca 100644 --- a/src/mnode/src/mnodeVgroup.c +++ b/src/mnode/src/mnodeVgroup.c @@ -358,7 +358,7 @@ int32_t mnodeCreateVgroup(SMnodeMsg *pMsg, SDbObj *pDb) { if (pMsg == NULL) return TSDB_CODE_MND_APP_ERROR; SVgObj *pVgroup = (SVgObj *)calloc(1, sizeof(SVgObj)); - tstrncpy(pVgroup->dbName, pDb->name, TSDB_DB_NAME_LEN); + tstrncpy(pVgroup->dbName, pDb->name, TSDB_ACCT_LEN + TSDB_DB_NAME_LEN); pVgroup->numOfVnodes = pDb->cfg.replications; pVgroup->createdTime = taosGetTimestampMs(); pVgroup->accessState = TSDB_VN_ALL_ACCCESS;