diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 5b41b6966ffe55561c6f408acf6b870060a1b2f5..1f528bbda3959d5e1f810e0d35fb071a2a252258 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; - (void)extractDBName(pMeterMetaInfo->name, pCreateDbMsg->db); // only send db name, then recombining db name + acctId on the mgmt + strncpy(pCreateDbMsg->db, pMeterMetaInfo->name, tListLen(pCreateDbMsg->db)); pMsg += sizeof(SCreateDbMsg); msgLen = pMsg - pStart; diff --git a/src/system/detail/src/mgmtDb.c b/src/system/detail/src/mgmtDb.c index 100c353a62bc150a1ad60ce45f96a0fe3e90fd4d..ba1b966cfb295ce5ea7ad704beb60d2b4a6c37b8 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)); - sprintf(pDb->name, "%d.%s", pAcct->acctId, pCreate->db); // set fullname + strcpy(pDb->name, pCreate->db); strcpy(pCreate->acct, pAcct->user); pDb->createdTime = taosGetTimestampMs(); pDb->cfg = *pCreate;