From d9ce8e3fcdf6e260671268b0e059ed28cc45f1b9 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Tue, 13 Sep 2022 14:42:51 +0800 Subject: [PATCH] fix: c is uninitialized for empty btree --- source/dnode/vnode/src/meta/metaTable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/meta/metaTable.c b/source/dnode/vnode/src/meta/metaTable.c index 92cf90d328..2d516c18e5 100644 --- a/source/dnode/vnode/src/meta/metaTable.c +++ b/source/dnode/vnode/src/meta/metaTable.c @@ -309,7 +309,7 @@ int metaAlterSTable(SMeta *pMeta, int64_t version, SVCreateStbReq *pReq) { int64_t oversion; SDecoder dc = {0}; int32_t ret; - int32_t c; + int32_t c = -2; tdbTbcOpen(pMeta->pUidIdx, &pUidIdxc, &pMeta->txn); ret = tdbTbcMoveTo(pUidIdxc, &pReq->suid, sizeof(tb_uid_t), &c); -- GitLab