[td-13039] fix bug in show tables;
This commit is contained in:
parent
b0bc243413
commit
3e1b750312
|
@ -86,8 +86,9 @@ static const SInfosTableSchema userStreamsSchema[] = {{.name = "stream_name", .
|
|||
{.name = "create_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP},
|
||||
{.name = "sql", .bytes = 1024, .type = TSDB_DATA_TYPE_BINARY},
|
||||
};
|
||||
static const SInfosTableSchema userTblsSchema[] = {{.name = "db_name", .bytes = 32, .type = TSDB_DATA_TYPE_BINARY},
|
||||
static const SInfosTableSchema userTblsSchema[] = {
|
||||
{.name = "table_name", .bytes = 192, .type = TSDB_DATA_TYPE_BINARY},
|
||||
{.name = "db_name", .bytes = 32, .type = TSDB_DATA_TYPE_BINARY},
|
||||
{.name = "create_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP},
|
||||
{.name = "columns", .bytes = 4, .type = TSDB_DATA_TYPE_INT},
|
||||
{.name = "stable_name", .bytes = 192, .type = TSDB_DATA_TYPE_BINARY},
|
||||
|
|
|
@ -5482,7 +5482,7 @@ static SSDataBlock* doSysTableScan(void* param, bool* newgroup) {
|
|||
|
||||
blockDataClearup(pInfo->pRes, true);
|
||||
|
||||
SColumnInfoData* pTableNameCol = taosArrayGet(pInfo->pRes->pDataBlock, 0);
|
||||
SColumnInfoData* pTableNameCol = taosArrayGet(pInfo->pRes->pDataBlock, 1);
|
||||
|
||||
char * name = NULL;
|
||||
int32_t numOfRows = 0;
|
||||
|
@ -5495,6 +5495,22 @@ static SSDataBlock* doSysTableScan(void* param, bool* newgroup) {
|
|||
if (numOfRows >= pInfo->capacity) {
|
||||
break;
|
||||
}
|
||||
|
||||
for(int32_t i = 0; i < pInfo->pRes->info.numOfCols; ++i) {
|
||||
if (i == 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
SColumnInfoData* pColInfoData = taosArrayGet(pInfo->pRes->pDataBlock, i);
|
||||
int64_t tmp = 0;
|
||||
char t[10] = {0};
|
||||
STR_TO_VARSTR(t, "_");
|
||||
if (IS_VAR_DATA_TYPE(pColInfoData->info.type)) {
|
||||
colDataAppend(pColInfoData, numOfRows, t, false);
|
||||
} else {
|
||||
colDataAppend(pColInfoData, numOfRows, (char*) &tmp, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pInfo->loadInfo.totalRows += numOfRows;
|
||||
|
|
Loading…
Reference in New Issue