Merge pull request #766 from taosdata/feature/lihui

[TBASE-1215 ROLLBACK]
This commit is contained in:
slguan 2019-11-23 15:28:10 +08:00 committed by GitHub
commit 00a8a0bd35
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;
(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); 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));
sprintf(pDb->name, "%d.%s", pAcct->acctId, pCreate->db); // set fullname strcpy(pDb->name, pCreate->db);
strcpy(pCreate->acct, pAcct->user); strcpy(pCreate->acct, pAcct->user);
pDb->createdTime = taosGetTimestampMs(); pDb->createdTime = taosGetTimestampMs();
pDb->cfg = *pCreate; pDb->cfg = *pCreate;