diff --git a/source/common/src/systable.c b/source/common/src/systable.c index da42a955bab381b2929885a68fe0889f12d73986..2b59354d609775c6db7b2b1383aadbce4718d7c6 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -87,7 +87,7 @@ static const SSysDbTableSchema userDBSchema[] = { {.name = "wal", .bytes = 1, .type = TSDB_DATA_TYPE_TINYINT}, {.name = "fsync", .bytes = 4, .type = TSDB_DATA_TYPE_INT}, {.name = "comp", .bytes = 1, .type = TSDB_DATA_TYPE_TINYINT}, - {.name = "cache_model", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, + {.name = "cache_model", .bytes = 1, .type = TSDB_DATA_TYPE_TINYINT}, {.name = "precision", .bytes = 2 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, {.name = "single_stable_model", .bytes = 1, .type = TSDB_DATA_TYPE_BOOL}, {.name = "status", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c index 41f8d741a62a3c5d2578fa622f6fbacb16641aed..c0460ee8bfb62e5f853b891b0c5ecafc9b111739 100644 --- a/source/dnode/mnode/impl/src/mndDb.c +++ b/source/dnode/mnode/impl/src/mndDb.c @@ -1571,14 +1571,19 @@ static void dumpDbInfoData(SSDataBlock *pBlock, SDbObj *pDb, SShowObj *pShow, in pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); STR_WITH_SIZE_TO_VARSTR(strict, src, strlen(src)); - +#if 0 char cacheModel[24] = {0}; + bool null = false; if (pDb->cfg.cacheLastRow == 0) { STR_TO_VARSTR(cacheModel, "no_cache"); + } else if (pDb->cfg.cacheLastRow == 1) { + STR_TO_VARSTR(cacheModel, "last_row_cache") } else { - // + null = true; } - colDataAppend(pColInfo, rows, cacheModel, false); + colDataAppend(pColInfo, rows, cacheModel, null); +#endif + colDataAppend(pColInfo, rows, (const char*) &pDb->cfg.cacheLastRow, false); char *prec = NULL; switch (pDb->cfg.precision) {