未验证 提交 8d53eae1 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

Hotfix/sangshuduo/td 6294 taosdemo long arg for master (#7681)

* [TD-6294]<fix>: taosdemo support long arg

fix conflict with develop branch.

* fix few words.

* declare default child tables number.

* add support email prompt.

* support the way no space between param and value

* fix -PP arg.

* fix uncatched status.

* fix total child tables bug.
Co-authored-by: NShuduo Sang <sdsang@taosdata.com>
上级 29526b2b
...@@ -1381,6 +1381,8 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) { ...@@ -1381,6 +1381,8 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
errorUnreconized(argv[0], argv[i]); errorUnreconized(argv[0], argv[i]);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
g_totalChildTables = arguments->num_of_tables;
} else if ((0 == strncmp(argv[i], "-n", strlen("-n"))) } else if ((0 == strncmp(argv[i], "-n", strlen("-n")))
|| (0 == strncmp(argv[i], "--records", strlen("--records")))) { || (0 == strncmp(argv[i], "--records", strlen("--records")))) {
if (2 == strlen(argv[i])) { if (2 == strlen(argv[i])) {
...@@ -1399,11 +1401,11 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) { ...@@ -1399,11 +1401,11 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
errorPrintReqArg2(argv[0], "--records"); errorPrintReqArg2(argv[0], "--records");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
} else if (0 == strncmp(argv[i], "-r", strlen("-r"))) { } else if (0 == strncmp(argv[i], "-n", strlen("-n"))) {
if (isStringNumber((char *)(argv[i] + strlen("-r")))) { if (isStringNumber((char *)(argv[i] + strlen("-n")))) {
arguments->num_of_DPT = atoi((char *)(argv[i]+strlen("-r"))); arguments->num_of_DPT = atoi((char *)(argv[i]+strlen("-n")));
} else { } else {
errorPrintReqArg2(argv[0], "-r"); errorPrintReqArg2(argv[0], "-n");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
} else if (strlen("--records") == strlen(argv[i])) { } else if (strlen("--records") == strlen(argv[i])) {
...@@ -1419,8 +1421,6 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) { ...@@ -1419,8 +1421,6 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
errorUnreconized(argv[0], argv[i]); errorUnreconized(argv[0], argv[i]);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
g_totalChildTables = arguments->num_of_DPT;
} else if ((0 == strncmp(argv[i], "-d", strlen("-d"))) } else if ((0 == strncmp(argv[i], "-d", strlen("-d")))
|| (0 == strncmp(argv[i], "--database", strlen("--database")))) { || (0 == strncmp(argv[i], "--database", strlen("--database")))) {
if (2 == strlen(argv[i])) { if (2 == strlen(argv[i])) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册