Merge pull request #756 from taosdata/feature/lihui

[TBASE-1215]
This commit is contained in:
haojun Liao 2019-11-22 10:41:01 +08:00 committed by GitHub
commit 8742300cd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -351,7 +351,7 @@ typedef struct _tsc_obj {
char user[TSDB_USER_LEN]; char user[TSDB_USER_LEN];
char pass[TSDB_KEY_LEN]; char pass[TSDB_KEY_LEN];
char acctId[TSDB_DB_NAME_LEN]; char acctId[TSDB_DB_NAME_LEN];
char db[TSDB_DB_NAME_LEN]; char db[TSDB_METER_ID_LEN];
char sversion[TSDB_VERSION_LEN]; char sversion[TSDB_VERSION_LEN];
char writeAuth : 1; char writeAuth : 1;
char superAuth : 1; char superAuth : 1;

View File

@ -1807,7 +1807,7 @@ int tscBuildCreateDbMsg(SSqlObj *pSql) {
pMsg += sizeof(SMgmtHead); pMsg += sizeof(SMgmtHead);
pCreateDbMsg = (SCreateDbMsg *)pMsg; pCreateDbMsg = (SCreateDbMsg *)pMsg;
strcpy(pCreateDbMsg->db, pMeterMetaInfo->name); strncpy(pCreateDbMsg->db, pMeterMetaInfo->name, tListLen(pCreateDbMsg->db));
pMsg += sizeof(SCreateDbMsg); pMsg += sizeof(SCreateDbMsg);
msgLen = pMsg - pStart; msgLen = pMsg - pStart;
@ -2029,7 +2029,7 @@ int tscBuildDropDbMsg(SSqlObj *pSql) {
pMsg += sizeof(SMgmtHead); pMsg += sizeof(SMgmtHead);
pDropDbMsg = (SDropDbMsg *)pMsg; pDropDbMsg = (SDropDbMsg *)pMsg;
strcpy(pDropDbMsg->db, pMeterMetaInfo->name); strncpy(pDropDbMsg->db, pMeterMetaInfo->name, tListLen(pDropDbMsg->db));
pDropDbMsg->ignoreNotExists = htons(pCmd->existsCheck ? 1 : 0); pDropDbMsg->ignoreNotExists = htons(pCmd->existsCheck ? 1 : 0);

View File

@ -309,7 +309,7 @@ typedef struct {
} SCreateMsg; } SCreateMsg;
typedef struct { typedef struct {
char db[TSDB_DB_NAME_LEN]; char db[TSDB_METER_ID_LEN];
short ignoreNotExists; short ignoreNotExists;
} SDropDbMsg, SUseDbMsg; } SDropDbMsg, SUseDbMsg;
@ -594,7 +594,7 @@ typedef struct {
// NOTE: sizeof(SVnodeCfg) < TSDB_FILE_HEADER_LEN/4 // NOTE: sizeof(SVnodeCfg) < TSDB_FILE_HEADER_LEN/4
typedef struct { typedef struct {
char acct[TSDB_USER_LEN]; char acct[TSDB_USER_LEN];
char db[TSDB_DB_NAME_LEN]; char db[TSDB_METER_ID_LEN+2]; // 8bytes align
uint32_t vgId; uint32_t vgId;
int32_t maxSessions; int32_t maxSessions;
int32_t cacheBlockSize; int32_t cacheBlockSize;

View File

@ -157,7 +157,7 @@ typedef struct _vg_obj {
} SVgObj; } SVgObj;
typedef struct _db_obj { typedef struct _db_obj {
char name[TSDB_DB_NAME_LEN + 1]; char name[TSDB_METER_ID_LEN + 1];
int64_t createdTime; int64_t createdTime;
SDbCfg cfg; SDbCfg cfg;
int32_t numOfVgroups; int32_t numOfVgroups;