From d69c99d1e395457c82a592c3a43fd24b0e7b9b17 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Fri, 15 May 2020 08:23:26 +0000 Subject: [PATCH] fix coredump due to table delete --- src/tsdb/src/tsdbMain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tsdb/src/tsdbMain.c b/src/tsdb/src/tsdbMain.c index 673cd6003c..c63de165d3 100644 --- a/src/tsdb/src/tsdbMain.c +++ b/src/tsdb/src/tsdbMain.c @@ -169,6 +169,7 @@ static int tsdbRestoreInfo(STsdbRepo *pRepo) { if (tsdbSetAndOpenHelperFile(&rhelper, pFGroup) < 0) goto _err; for (int i = 1; i < pRepo->config.maxTables; i++) { STable * pTable = pMeta->tables[i]; + if (pTable == NULL) continue; SCompIdx *pIdx = &rhelper.pCompIdx[i]; if (pIdx->offset > 0 && pTable->lastKey < pIdx->maxKey) pTable->lastKey = pIdx->maxKey; -- GitLab