Merge pull request #764 from taosdata/feature/lihui

Feature/lihui
This commit is contained in:
haojun Liao 2019-11-23 13:55:20 +08:00 committed by GitHub
commit be99073f3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1807,7 +1807,7 @@ int tscBuildCreateDbMsg(SSqlObj *pSql) {
pMsg += sizeof(SMgmtHead); pMsg += sizeof(SMgmtHead);
pCreateDbMsg = (SCreateDbMsg *)pMsg; 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); pMsg += sizeof(SCreateDbMsg);
msgLen = pMsg - pStart; msgLen = pMsg - pStart;

View File

@ -256,7 +256,7 @@ int mgmtCreateDb(SAcctObj *pAcct, SCreateDbMsg *pCreate) {
pDb = malloc(sizeof(SDbObj)); pDb = malloc(sizeof(SDbObj));
memset(pDb, 0, sizeof(SDbObj)); memset(pDb, 0, sizeof(SDbObj));
strcpy(pDb->name, pCreate->db); sprintf(pDb->name, "%d.%s", pAcct->acctId, pCreate->db); // set fullname
strcpy(pCreate->acct, pAcct->user); strcpy(pCreate->acct, pAcct->user);
pDb->createdTime = taosGetTimestampMs(); pDb->createdTime = taosGetTimestampMs();
pDb->cfg = *pCreate; pDb->cfg = *pCreate;