Merge pull request #310 from fangpanpan/master

change the range of int data to 0-49
This commit is contained in:
hzcheng 2019-08-09 13:26:02 +08:00 committed by GitHub
commit 744d31cbb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -808,7 +808,7 @@ void generateData(char *res, char **data_type, int num_of_cols, long timestamp,
} else if (strcasecmp(data_type[i % c], "smallint") == 0) { } else if (strcasecmp(data_type[i % c], "smallint") == 0) {
pstr += sprintf(pstr, ", %d", (int)(rand() % 32767)); pstr += sprintf(pstr, ", %d", (int)(rand() % 32767));
} else if (strcasecmp(data_type[i % c], "int") == 0) { } else if (strcasecmp(data_type[i % c], "int") == 0) {
pstr += sprintf(pstr, ", %d", (int)(rand() % 2147483648)); pstr += sprintf(pstr, ", %d", (int)(rand() % 50));
} else if (strcasecmp(data_type[i % c], "bigint") == 0) { } else if (strcasecmp(data_type[i % c], "bigint") == 0) {
pstr += sprintf(pstr, ", %ld", rand() % 2147483648); pstr += sprintf(pstr, ", %ld", rand() % 2147483648);
} else if (strcasecmp(data_type[i % c], "float") == 0) { } else if (strcasecmp(data_type[i % c], "float") == 0) {