提交 7349a181 编写于 作者: A Alex Duan

feat: add restore command sets to taos-CLI

上级 0e215134
...@@ -71,7 +71,6 @@ SWords shellCommands[] = { ...@@ -71,7 +71,6 @@ SWords shellCommands[] = {
{"alter all dnodes \"monitor\" \"0\";", 0, 0, NULL}, {"alter all dnodes \"monitor\" \"0\";", 0, 0, NULL},
{"alter all dnodes \"monitor\" \"1\";", 0, 0, NULL}, {"alter all dnodes \"monitor\" \"1\";", 0, 0, NULL},
{"alter table <tb_name> <tb_actions> <anyword> ;", 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 \"resetlog\";", 0, 0, NULL},
{"alter local \"DebugFlag\" \"143\";", 0, 0, NULL}, {"alter local \"DebugFlag\" \"143\";", 0, 0, NULL},
{"alter local \"cDebugFlag\" \"143\";", 0, 0, NULL}, {"alter local \"cDebugFlag\" \"143\";", 0, 0, NULL},
...@@ -120,6 +119,10 @@ SWords shellCommands[] = { ...@@ -120,6 +119,10 @@ SWords shellCommands[] = {
{"kill transaction ", 0, 0, NULL}, {"kill transaction ", 0, 0, NULL},
{"merge vgroup ", 0, 0, NULL}, {"merge vgroup ", 0, 0, NULL},
{"reset query cache;", 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 all on <anyword> from <user_name> ;", 0, 0, NULL},
{"revoke read 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}, {"revoke write on <anyword> from <user_name> ;", 0, 0, NULL},
...@@ -345,12 +348,12 @@ int cntDel = 0; // delete byte count after next press tab ...@@ -345,12 +348,12 @@ int cntDel = 0; // delete byte count after next press tab
// show auto tab introduction // show auto tab introduction
void printfIntroduction() { void printfIntroduction() {
printf(" ****************************** Tab Completion **********************************\n"); printf(" ******************************** Tab Completion ************************************\n");
char secondLine[160] = "\0"; 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); printf("%s", secondLine);
int secondLineLen = strlen(secondLine); int secondLineLen = strlen(secondLine);
while (84 - (secondLineLen++) > 0) { while (87 - (secondLineLen++) > 0) {
printf(" "); printf(" ");
} }
printf("*\n"); printf("*\n");
...@@ -382,7 +385,6 @@ void showHelp() { ...@@ -382,7 +385,6 @@ void showHelp() {
alter all dnodes \"resetlog\";\n\ alter all dnodes \"resetlog\";\n\
alter all dnodes \"debugFlag\" \n\ alter all dnodes \"debugFlag\" \n\
alter table <tb_name> <tb_actions> ;\n\ alter table <tb_name> <tb_actions> ;\n\
alter table modify column\n\
alter local \"resetlog\";\n\ alter local \"resetlog\";\n\
alter local \"DebugFlag\" \"143\";\n\ alter local \"DebugFlag\" \"143\";\n\
alter topic\n\ alter topic\n\
...@@ -434,6 +436,10 @@ void showHelp() { ...@@ -434,6 +436,10 @@ void showHelp() {
merge vgroup ...\n\ merge vgroup ...\n\
----- R ----- \n\ ----- R ----- \n\
reset query cache;\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 all on <priv_level> from <user_name> ;\n\
revoke read 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\ 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.
先完成此消息的编辑!
想要评论请 注册