[TD-9] update show tables’ tableId len
This commit is contained in:
parent
db3bea8f38
commit
1a52be002f
|
@ -176,7 +176,7 @@ void tsDataSwap(void *pLeft, void *pRight, int32_t type, int32_t size);
|
||||||
#define TSDB_MAX_COLUMNS 256
|
#define TSDB_MAX_COLUMNS 256
|
||||||
#define TSDB_MIN_COLUMNS 2 //PRIMARY COLUMN(timestamp) + other columns
|
#define TSDB_MIN_COLUMNS 2 //PRIMARY COLUMN(timestamp) + other columns
|
||||||
|
|
||||||
#define TSDB_DNODE_NAME_LEN 63
|
#define TSDB_DNODE_NAME_LEN 64
|
||||||
#define TSDB_TABLE_NAME_LEN 192
|
#define TSDB_TABLE_NAME_LEN 192
|
||||||
#define TSDB_DB_NAME_LEN 32
|
#define TSDB_DB_NAME_LEN 32
|
||||||
#define TSDB_COL_NAME_LEN 64
|
#define TSDB_COL_NAME_LEN 64
|
||||||
|
|
|
@ -45,7 +45,8 @@ void * mgmtGetSuperTableVgroup(SSuperTableObj *pStable);
|
||||||
int32_t mgmtFindSuperTableTagIndex(SSuperTableObj *pTable, const char *tagName);
|
int32_t mgmtFindSuperTableTagIndex(SSuperTableObj *pTable, const char *tagName);
|
||||||
int32_t mgmtSetSchemaFromSuperTable(SSchema *pSchema, SSuperTableObj *pTable);
|
int32_t mgmtSetSchemaFromSuperTable(SSchema *pSchema, SSuperTableObj *pTable);
|
||||||
|
|
||||||
void mgmtDropAllSuperTables(SDbObj *pDropDb);
|
void mgmtDropAllSuperTables(SDbObj *pDropDb);
|
||||||
|
int32_t mgmtExtractTableName(const char* tableId, char* name);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -624,3 +624,8 @@ int32_t mgmtGetSuperTableMeta(SDbObj *pDb, SSuperTableObj *pTable, STableMetaMsg
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t mgmtExtractTableName(const char* tableId, char* name) {
|
||||||
|
char* r = skipSegments(tableId, TS_PATH_DELIMITER[0], 2);
|
||||||
|
return copy(name, r, TS_PATH_DELIMITER[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -310,7 +310,7 @@ int32_t mgmtRetrieveShowTables(SShowObj *pShow, char *data, int32_t rows, void *
|
||||||
numOfRead++;
|
numOfRead++;
|
||||||
|
|
||||||
// pattern compare for meter name
|
// pattern compare for meter name
|
||||||
extractTableName(tableId, tableName);
|
mgmtExtractTableName(tableId, tableName);
|
||||||
|
|
||||||
if (pShow->payloadLen > 0 &&
|
if (pShow->payloadLen > 0 &&
|
||||||
patternMatch(pShow->payload, tableName, TSDB_TABLE_NAME_LEN, &info) != TSDB_PATTERN_MATCH) {
|
patternMatch(pShow->payload, tableName, TSDB_TABLE_NAME_LEN, &info) != TSDB_PATTERN_MATCH) {
|
||||||
|
@ -333,7 +333,7 @@ int32_t mgmtRetrieveShowTables(SShowObj *pShow, char *data, int32_t rows, void *
|
||||||
|
|
||||||
pWrite = data + pShow->offset[cols] * rows + pShow->bytes[cols] * numOfRows;
|
pWrite = data + pShow->offset[cols] * rows + pShow->bytes[cols] * numOfRows;
|
||||||
if (superTableId != NULL) {
|
if (superTableId != NULL) {
|
||||||
extractTableName(superTableId, pWrite);
|
mgmtExtractTableName(superTableId, pWrite);
|
||||||
}
|
}
|
||||||
cols++;
|
cols++;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue