From 20c4491974ae503af8af4ddc97a9ace181c9bdf8 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Mon, 15 Jun 2020 15:21:24 +0000 Subject: [PATCH] TD-649 --- src/tsdb/src/tsdbMeta.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tsdb/src/tsdbMeta.c b/src/tsdb/src/tsdbMeta.c index 8eb259d38c..7795f25b71 100644 --- a/src/tsdb/src/tsdbMeta.c +++ b/src/tsdb/src/tsdbMeta.c @@ -424,6 +424,11 @@ int tsdbUpdateTable(STsdbMeta *pMeta, STable *pTable, STableCfg *pCfg) { pTable->schema[pTable->numOfSchemas-1] = tSchema; } + STSchema *lSchema = pTable->schema[pTable->numOfSchemas - 1]; + if (schemaNCols(lSchema) > pMeta->maxCols) pMeta->maxCols = schemaNCols(lSchema); + int bytes = dataRowMaxBytesFromSchema(lSchema); + if (bytes > pMeta->maxRowBytes) pMeta->maxRowBytes = bytes; + isChanged = true; } -- GitLab