Merge pull request #5268 from taosdata/hotfix/TD-3072

[TD-3072]jdbc subscribe crash issue
This commit is contained in:
haojun Liao 2021-02-26 10:07:24 +08:00 committed by GitHub
commit 507331a38b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -683,10 +683,14 @@ void tscBuildVgroupTableInfo(SSqlObj* pSql, STableMetaInfo* pTableMetaInfo, SArr
prev = tt;
}
pTableMetaInfo->pVgroupTables = result;
pTableMetaInfo->vgroupIndex = 0;
if (taosArrayGetSize(result) <= 0) {
pTableMetaInfo->pVgroupTables = NULL;
taosArrayDestroy(result);
} else {
pTableMetaInfo->pVgroupTables = result;
if (taosArrayGetSize(result) > 0) {
SVgroupTableInfo* g = taosArrayGet(result, taosArrayGetSize(result) - 1);
tscDebug("%p vgId:%d, tables:%"PRIzu, pSql, g->vgInfo.vgId, taosArrayGetSize(g->itemList));
}