fix: create stream error

This commit is contained in:
Xiaoyu Wang 2022-12-12 17:14:08 +08:00
parent 903804883d
commit 6d28232189
1 changed files with 4 additions and 1 deletions

View File

@ -5516,7 +5516,10 @@ static void getStreamQueryFirstProjectAliasName(SHashObj* pUserAliasSet, char* a
snprintf(aliasName, len, "%s", "ts");
return;
}
taosRandStr(aliasName, len);
do {
taosRandStr(aliasName, len - 1);
aliasName[len - 1] = '\0';
} while (NULL != taosHashGet(pUserAliasSet, aliasName, strlen(aliasName)));
return;
}