From 30773c4ed29c3b5105fbe01ace2ad704200a4fd6 Mon Sep 17 00:00:00 2001 From: lihui Date: Sat, 23 Nov 2019 11:30:11 +0800 Subject: [PATCH] [TBASE-1215] --- src/client/src/tscServer.c | 2 +- src/system/detail/src/mgmtDb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 1f528bbda3..5b41b6966f 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 ba1b966cfb..a005b24779 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; -- GitLab