[TBASE-1215]

This commit is contained in:
lihui 2019-11-21 19:24:06 +08:00
parent 8715de7fa2
commit aeb19d1eb0
4 changed files with 6 additions and 6 deletions

View File

@ -346,7 +346,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

@ -1795,7 +1795,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;
@ -2017,7 +2017,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;