change gen first tag name
This commit is contained in:
parent
e2250b0150
commit
9f6dd2b405
|
@ -868,6 +868,9 @@ static int32_t mndGenIdxNameForFirstTag(char *fullname, char *dbname, char *tagn
|
|||
int8_t end = left >= 24 ? 24 : left - 1;
|
||||
// gen rand str len [base:end]
|
||||
// note: ignore rand performance issues
|
||||
|
||||
taosSeedRand(taosSafeRand());
|
||||
|
||||
int64_t len = taosRand() % (end - start + 1) + start;
|
||||
taosRandStr2(randStr, len);
|
||||
sprintf(fullname, "%s.%s_%s", dbname, tagname, randStr);
|
||||
|
|
|
@ -86,8 +86,7 @@ void taosRandStr(char* str, int32_t size) {
|
|||
}
|
||||
|
||||
void taosRandStr2(char* str, int32_t size) {
|
||||
|
||||
const char* set = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ@";
|
||||
const char* set = "abcdefghijklmnopqrstuvwxyz0123456789@";
|
||||
int32_t len = strlen(set);
|
||||
|
||||
for (int32_t i = 0; i < size; ++i) {
|
||||
|
|
Loading…
Reference in New Issue