diff --git a/source/dnode/mnode/impl/src/mndInfoSchema.c b/source/dnode/mnode/impl/src/mndInfoSchema.c index dfe7bfdc2579a7ae1b3d40828d16ce088cc52175..7ef4c5e5053ba930c4e2822f938ce61275228015 100644 --- a/source/dnode/mnode/impl/src/mndInfoSchema.c +++ b/source/dnode/mnode/impl/src/mndInfoSchema.c @@ -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}, diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index f3e04352fa40ac296549a214df4db7f4f114087e..3f79c02cb001cd30c56f66944f5b100c9e3e9536 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -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;