提交 1bfe1466 编写于 作者: T Tao Liu

[TD-1063] fixbugs

上级 a5f89a1d
...@@ -43,7 +43,7 @@ extern char configDir[]; ...@@ -43,7 +43,7 @@ extern char configDir[];
#define MAX_DB_NAME_SIZE 64 #define MAX_DB_NAME_SIZE 64
#define MAX_TB_NAME_SIZE 64 #define MAX_TB_NAME_SIZE 64
#define MAX_DATA_SIZE 1024 #define MAX_DATA_SIZE 1024
#define MAX_NUM_DATATYPE 8 #define MAX_NUM_DATATYPE 30
#define OPT_ABORT 1 /* –abort */ #define OPT_ABORT 1 /* –abort */
#define STRING_LEN 512 #define STRING_LEN 512
#define MAX_PREPARED_RAND 1000000 #define MAX_PREPARED_RAND 1000000
...@@ -176,6 +176,7 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) { ...@@ -176,6 +176,7 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) {
} }
sptr[index++] = token; sptr[index++] = token;
token = strsep(&running, ", "); token = strsep(&running, ", ");
if (index >= MAX_NUM_DATATYPE) break;
} }
} }
break; break;
...@@ -364,7 +365,7 @@ int main(int argc, char *argv[]) { ...@@ -364,7 +365,7 @@ int main(int argc, char *argv[]) {
arguments.num_of_DPT = 100000; arguments.num_of_DPT = 100000;
arguments.num_of_RPR = 1000; arguments.num_of_RPR = 1000;
arguments.use_metric = true; arguments.use_metric = true;
arguments.insert_only = false; arguments.insert_only = true;
// end change // end change
argp_parse(&argp, argc, argv, 0, 0, &arguments); argp_parse(&argp, argc, argv, 0, 0, &arguments);
...@@ -415,7 +416,7 @@ int main(int argc, char *argv[]) { ...@@ -415,7 +416,7 @@ int main(int argc, char *argv[]) {
do_aggreFunc = false; do_aggreFunc = false;
} }
for (; count_data_type <= MAX_NUM_DATATYPE; count_data_type++) { for (; count_data_type <= MAX_NUM_DATATYPE; count_data_type++) {
if (strcasecmp(data_type[count_data_type], "") == 0) { if (data_type[count_data_type] == NULL) {
break; break;
} }
...@@ -1240,7 +1241,7 @@ int32_t generateData(char *res, char **data_type, int num_of_cols, int64_t times ...@@ -1240,7 +1241,7 @@ int32_t generateData(char *res, char **data_type, int num_of_cols, int64_t times
int c = 0; int c = 0;
for (; c < MAX_NUM_DATATYPE; c++) { for (; c < MAX_NUM_DATATYPE; c++) {
if (strcasecmp(data_type[c], "") == 0) { if (data_type[c] == NULL) {
break; break;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册