Skip to content

Commit

Permalink
Merge pull request #2278 from taosdata/bugfix/td-320
Browse files Browse the repository at this point in the history
fix td-320
  • Loading branch information
guanshengliang committed Jun 15, 2020
2 parents eb3bf38 + e258f1a commit 352cb28
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/client/inc/tsclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ typedef struct STscObj {
char user[TSDB_USER_LEN];
char pass[TSDB_KEY_LEN];
char acctId[TSDB_ACCT_LEN];
char db[TSDB_DB_NAME_LEN];
char db[TSDB_ACCT_LEN + TSDB_DB_NAME_LEN];
char sversion[TSDB_VERSION_LEN];
char writeAuth : 1;
char superAuth : 1;
Expand Down
2 changes: 1 addition & 1 deletion src/client/src/tscSQLParser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ int32_t setObjFullName(char* fullName, const char* account, SSQLToken* pDB, SSQL

/* db name is not specified, the tableName dose not include db name */
if (pDB != NULL) {
if (pDB->n >= TSDB_DB_NAME_LEN) {
if (pDB->n >= TSDB_ACCT_LEN + TSDB_DB_NAME_LEN) {
return TSDB_CODE_TSC_INVALID_SQL;
}

Expand Down
6 changes: 3 additions & 3 deletions src/inc/taosmsg.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ typedef struct {

typedef struct {
char tableId[TSDB_TABLE_ID_LEN];
char db[TSDB_DB_NAME_LEN];
char db[TSDB_ACCT_LEN + TSDB_DB_NAME_LEN];
int8_t igExists;
int8_t getMeta;
int16_t numOfTags;
Expand All @@ -268,7 +268,7 @@ typedef struct {

typedef struct {
char tableId[TSDB_TABLE_ID_LEN];
char db[TSDB_DB_NAME_LEN];
char db[TSDB_ACCT_LEN + TSDB_DB_NAME_LEN];
int16_t type; /* operation type */
int16_t numOfCols; /* number of schema */
int32_t tagValLen;
Expand Down Expand Up @@ -670,7 +670,7 @@ typedef struct {
*/
typedef struct {
int8_t type;
char db[TSDB_DB_NAME_LEN];
char db[TSDB_ACCT_LEN + TSDB_DB_NAME_LEN];
uint16_t payloadLen;
char payload[];
} SCMShowMsg;
Expand Down

0 comments on commit 352cb28

Please sign in to comment.