From 8e5681f1b004cb8b5d3982fb36f0ffd4d712e2ca Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Tue, 18 May 2021 21:36:35 +0800 Subject: [PATCH] [TD-4240]: taosdemo subscribe more than max query sql count. (#6154) Co-authored-by: Shuduo Sang --- src/kit/taosdemo/taosdemo.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index 08c1142070..92b5f6abff 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -6575,6 +6575,15 @@ static void *superSubscribe(void *sarg) { if (g_queryInfo.superQueryInfo.sqlCount == 0) return NULL; + if (g_queryInfo.superQueryInfo.sqlCount * pThreadInfo->ntables > MAX_QUERY_SQL_COUNT) { + errorPrint("The number %"PRId64" of sql count(%"PRIu64") multiple the table number(%"PRId64") of the thread is more than max query sql count: %d\n", + g_queryInfo.superQueryInfo.sqlCount * pThreadInfo->ntables, + g_queryInfo.superQueryInfo.sqlCount, + pThreadInfo->ntables, + MAX_QUERY_SQL_COUNT); + exit(-1); + } + if (pThreadInfo->taos == NULL) { TAOS * taos = NULL; taos = taos_connect(g_queryInfo.host, -- GitLab