From b3a6fa9c129a48ccaeeed0da4d65c7b71ecc18c6 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Sun, 18 Feb 2024 19:36:35 +0800 Subject: [PATCH] coverage: add explain.c --- source/dnode/mnode/impl/src/mndConsumer.c | 2 ++ source/dnode/vnode/src/vnd/vnodeAsync.c | 2 ++ tests/system-test/2-query/explain.py | 3 +++ 3 files changed, 7 insertions(+) diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 753076f1f3..c7f3da767d 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -540,12 +540,14 @@ int32_t mndSetConsumerCommitLogs(SMnode *pMnode, STrans *pTrans, SMqConsumerObj static void *topicNameDup(void *p) { return taosStrdup((char *)p); } +#ifdef BUILD_NO_CALL static void freeItem(void *param) { void *pItem = *(void **)param; if (pItem != NULL) { taosMemoryFree(pItem); } } +#endif int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) { SMnode *pMnode = pMsg->info.node; diff --git a/source/dnode/vnode/src/vnd/vnodeAsync.c b/source/dnode/vnode/src/vnd/vnodeAsync.c index 66668b60df..313603b19f 100644 --- a/source/dnode/vnode/src/vnd/vnodeAsync.c +++ b/source/dnode/vnode/src/vnd/vnodeAsync.c @@ -433,10 +433,12 @@ static int32_t vnodeAsyncLaunchWorker(SVAsync *async) { return 0; } +#ifdef BUILD_NO_CALL int32_t vnodeAsync(SVAsync *async, EVAPriority priority, int32_t (*execute)(void *), void (*complete)(void *), void *arg, int64_t *taskId) { return vnodeAsyncC(async, 0, priority, execute, complete, arg, taskId); } +#endif int32_t vnodeAsyncC(SVAsync *async, int64_t channelId, EVAPriority priority, int32_t (*execute)(void *), void (*complete)(void *), void *arg, int64_t *taskId) { diff --git a/tests/system-test/2-query/explain.py b/tests/system-test/2-query/explain.py index f164d3aedf..92cd28a929 100644 --- a/tests/system-test/2-query/explain.py +++ b/tests/system-test/2-query/explain.py @@ -400,6 +400,9 @@ class TDTestCase: self.explain_check() + # coverage explain.c add + tdSql.query(f"explain verbose true select * from {dbname}.stb1 partition by c1 order by c2") + def __test_error(self, dbname=DBNAME): ratio = random.uniform(0.001,1)