enh: drop tables syntax optimization
This commit is contained in:
parent
8a925342cc
commit
618c934fb2
|
@ -714,7 +714,7 @@ int32_t mndProcessRpcMsg(SRpcMsg *pMsg) {
|
||||||
} else if (code == 0) {
|
} else if (code == 0) {
|
||||||
mGTrace("msg:%p, successfully processed", pMsg);
|
mGTrace("msg:%p, successfully processed", pMsg);
|
||||||
} else {
|
} else {
|
||||||
mGError("msg:%p, failed to process since %s, app:%p type:%s", pMsg, terrstr(), pMsg->info.ahandle,
|
mGError("msg:%p, failed to process since %s, app:%p type:%s", pMsg, tstrerror(code), pMsg->info.ahandle,
|
||||||
TMSG_INFO(pMsg->msgType));
|
TMSG_INFO(pMsg->msgType));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -301,7 +301,7 @@ create_subtable_clause(A) ::=
|
||||||
%type multi_drop_clause { SNodeList* }
|
%type multi_drop_clause { SNodeList* }
|
||||||
%destructor multi_drop_clause { nodesDestroyList($$); }
|
%destructor multi_drop_clause { nodesDestroyList($$); }
|
||||||
multi_drop_clause(A) ::= drop_table_clause(B). { A = createNodeList(pCxt, B); }
|
multi_drop_clause(A) ::= drop_table_clause(B). { A = createNodeList(pCxt, B); }
|
||||||
multi_drop_clause(A) ::= multi_drop_clause(B) drop_table_clause(C). { A = addNodeToList(pCxt, B, C); }
|
multi_drop_clause(A) ::= multi_drop_clause(B) NK_COMMA drop_table_clause(C). { A = addNodeToList(pCxt, B, C); }
|
||||||
|
|
||||||
drop_table_clause(A) ::= exists_opt(B) full_table_name(C). { A = createDropTableClause(pCxt, B, C); }
|
drop_table_clause(A) ::= exists_opt(B) full_table_name(C). { A = createDropTableClause(pCxt, B, C); }
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -245,6 +245,7 @@ TEST_F(ParserInitialDTest, dropTable) {
|
||||||
useDb("root", "test");
|
useDb("root", "test");
|
||||||
|
|
||||||
run("DROP TABLE t1");
|
run("DROP TABLE t1");
|
||||||
|
run("DROP TABLE t1, st1s1, st1s2");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(ParserInitialDTest, dropTopic) {
|
TEST_F(ParserInitialDTest, dropTopic) {
|
||||||
|
|
|
@ -86,7 +86,7 @@ typedef struct {
|
||||||
const char* promptContinue;
|
const char* promptContinue;
|
||||||
const char* osname;
|
const char* osname;
|
||||||
int32_t promptSize;
|
int32_t promptSize;
|
||||||
char programVersion[32];
|
char programVersion[256];
|
||||||
} SShellOsDetails;
|
} SShellOsDetails;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -413,7 +413,9 @@ int32_t shellParseArgs(int32_t argc, char *argv[]) {
|
||||||
sprintf(shell.info.promptHeader, "%s> ", cusPrompt);
|
sprintf(shell.info.promptHeader, "%s> ", cusPrompt);
|
||||||
shell.info.promptContinue = TAOS_CONSOLE_PROMPT_CONTINUE;
|
shell.info.promptContinue = TAOS_CONSOLE_PROMPT_CONTINUE;
|
||||||
shell.info.promptSize = strlen(shell.info.promptHeader);
|
shell.info.promptSize = strlen(shell.info.promptHeader);
|
||||||
snprintf(shell.info.programVersion, sizeof(shell.info.programVersion), "version: %s", version);
|
snprintf(shell.info.programVersion, sizeof(shell.info.programVersion),
|
||||||
|
"version: %s compatible_version: %s\ngitinfo: %s\nbuildInfo: %s", version, compatible_version, gitinfo,
|
||||||
|
buildinfo);
|
||||||
|
|
||||||
#if defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32)
|
#if defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32)
|
||||||
shell.info.osname = "Windows";
|
shell.info.osname = "Windows";
|
||||||
|
|
Loading…
Reference in New Issue