From a7efe043a66dbfbd5e86e4364f4fbd828f46e642 Mon Sep 17 00:00:00 2001 From: dapan1121 <89396746@qq.com> Date: Mon, 19 Apr 2021 11:13:36 +0800 Subject: [PATCH] fix bug --- src/client/src/tscStream.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/client/src/tscStream.c b/src/client/src/tscStream.c index d90b5fead1..abfe272a49 100644 --- a/src/client/src/tscStream.c +++ b/src/client/src/tscStream.c @@ -101,11 +101,19 @@ static void doLaunchQuery(void* param, TAOS_RES* tres, int32_t code) { return; } + if (UTIL_TABLE_IS_SUPER_TABLE(pTableMetaInfo) && (pTableMetaInfo->pVgroupTables == NULL) && (pTableMetaInfo->vgroupList == NULL || pTableMetaInfo->vgroupList->numOfVgroups <= 0)) { + tscDebug("%p empty vgroup list", pSql); + pTableMetaInfo->vgroupList = tscVgroupInfoClear(pTableMetaInfo->vgroupList); + code = TSDB_CODE_TSC_APP_ERROR; + } + // failed to get table Meta or vgroup list, retry in 10sec. if (code == TSDB_CODE_SUCCESS) { tscTansformFuncForSTableQuery(pQueryInfo); tscDebug("%p stream:%p, start stream query on:%s", pSql, pStream, tNameGetTableName(&pTableMetaInfo->name)); + pQueryInfo->command = TSDB_SQL_SELECT; + pSql->fp = tscProcessStreamQueryCallback; pSql->fetchFp = tscProcessStreamQueryCallback; tscDoQuery(pSql); -- GitLab