diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 1f528bbda3959d5e1f810e0d35fb071a2a252258..5b41b6966ffe55561c6f408acf6b870060a1b2f5 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -1807,7 +1807,7 @@ int tscBuildCreateDbMsg(SSqlObj *pSql) { pMsg += sizeof(SMgmtHead); pCreateDbMsg = (SCreateDbMsg *)pMsg; - strncpy(pCreateDbMsg->db, pMeterMetaInfo->name, tListLen(pCreateDbMsg->db)); + (void)extractDBName(pMeterMetaInfo->name, pCreateDbMsg->db); // only send db name, then recombining db name + acctId on the mgmt pMsg += sizeof(SCreateDbMsg); msgLen = pMsg - pStart; diff --git a/src/system/detail/src/mgmtDb.c b/src/system/detail/src/mgmtDb.c index ba1b966cfb295ce5ea7ad704beb60d2b4a6c37b8..a005b24779efa60c370b4574e20f4eef4bd233c7 100644 --- a/src/system/detail/src/mgmtDb.c +++ b/src/system/detail/src/mgmtDb.c @@ -256,7 +256,7 @@ int mgmtCreateDb(SAcctObj *pAcct, SCreateDbMsg *pCreate) { pDb = malloc(sizeof(SDbObj)); memset(pDb, 0, sizeof(SDbObj)); - strcpy(pDb->name, pCreate->db); + sprintf(pDb->name, "%s.%s", pAcct->acctId, pCreate->db); // set fullname strcpy(pCreate->acct, pAcct->user); pDb->createdTime = taosGetTimestampMs(); pDb->cfg = *pCreate;