Merge pull request #310 from fangpanpan/master
change the range of int data to 0-49
This commit is contained in:
commit
744d31cbb6
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue