未验证 提交 0227bcbf 编写于 作者: H Hui Li 提交者: GitHub

Merge pull request #21354 from taosdata/feat/TD-24254-3.0

feat: add restore command sets to taos-CLI
......@@ -71,7 +71,6 @@ SWords shellCommands[] = {
{"alter all dnodes \"monitor\" \"0\";", 0, 0, NULL},
{"alter all dnodes \"monitor\" \"1\";", 0, 0, NULL},
{"alter table <tb_name> <tb_actions> <anyword> ;", 0, 0, NULL},
{"alter table modify column", 0, 0, NULL},
{"alter local \"resetlog\";", 0, 0, NULL},
{"alter local \"DebugFlag\" \"143\";", 0, 0, NULL},
{"alter local \"cDebugFlag\" \"143\";", 0, 0, NULL},
......@@ -120,6 +119,10 @@ SWords shellCommands[] = {
{"kill transaction ", 0, 0, NULL},
{"merge vgroup ", 0, 0, NULL},
{"reset query cache;", 0, 0, NULL},
{"restore dnode <dnode_id> ;", 0, 0, NULL},
{"restore vnode on dnode <dnode_id> ;", 0, 0, NULL},
{"restore mnode on dnode <dnode_id> ;", 0, 0, NULL},
{"restore qnode on dnode <dnode_id> ;", 0, 0, NULL},
{"revoke all on <anyword> from <user_name> ;", 0, 0, NULL},
{"revoke read on <anyword> from <user_name> ;", 0, 0, NULL},
{"revoke write on <anyword> from <user_name> ;", 0, 0, NULL},
......@@ -326,7 +329,7 @@ TdThreadMutex tiresMutex;
TdThread* threads[WT_FROM_DB_CNT];
// obtain var name with sql from server
char varTypes[WT_VAR_CNT][64] = {
"<db_name>", "<stb_name>", "<tb_name>", "<dnode_id >", "<user_name>", "<topic_name>", "<stream_name>",
"<db_name>", "<stb_name>", "<tb_name>", "<dnode_id>", "<user_name>", "<topic_name>", "<stream_name>",
"<udf_name>", "<all_table>", "<function>", "<keyword>", "<tb_actions>", "<db_options>", "<alter_db_options>",
"<data_types>", "<key_tags>", "<anyword>", "<tb_options>", "<user_actions>", "<key_select>", "<sys_table>", "<udf_language>"};
......@@ -345,12 +348,12 @@ int cntDel = 0; // delete byte count after next press tab
// show auto tab introduction
void printfIntroduction() {
printf(" ****************************** Tab Completion **********************************\n");
printf(" ******************************** Tab Completion ************************************\n");
char secondLine[160] = "\0";
sprintf(secondLine, " * The %s CLI supports tab completion for a variety of items, ", shell.info.cusName);
sprintf(secondLine, " * The %s CLI supports tab completion for a variety of items, ", shell.info.cusName);
printf("%s", secondLine);
int secondLineLen = strlen(secondLine);
while (84 - (secondLineLen++) > 0) {
while (87 - (secondLineLen++) > 0) {
printf(" ");
}
printf("*\n");
......@@ -382,7 +385,6 @@ void showHelp() {
alter all dnodes \"resetlog\";\n\
alter all dnodes \"debugFlag\" \n\
alter table <tb_name> <tb_actions> ;\n\
alter table modify column\n\
alter local \"resetlog\";\n\
alter local \"DebugFlag\" \"143\";\n\
alter topic\n\
......@@ -434,6 +436,10 @@ void showHelp() {
merge vgroup ...\n\
----- R ----- \n\
reset query cache;\n\
restore dnode <dnode_id> ;\n\
restore vnode on dnode <dnode_id> ;\n\
restore mnode on dnode <dnode_id> ;\n\
restore qnode on dnode <dnode_id> ;\n\
revoke all on <priv_level> from <user_name> ;\n\
revoke read on <priv_level> from <user_name> ;\n\
revoke write on <priv_level> from <user_name> ;\n\
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册