提交 618c934f 编写于 作者: X Xiaoyu Wang

enh: drop tables syntax optimization

上级 8a925342
......@@ -714,7 +714,7 @@ int32_t mndProcessRpcMsg(SRpcMsg *pMsg) {
} else if (code == 0) {
mGTrace("msg:%p, successfully processed", pMsg);
} 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));
}
......
......@@ -301,7 +301,7 @@ create_subtable_clause(A) ::=
%type multi_drop_clause { SNodeList* }
%destructor multi_drop_clause { nodesDestroyList($$); }
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); }
......
此差异已折叠。
......@@ -245,6 +245,7 @@ TEST_F(ParserInitialDTest, dropTable) {
useDb("root", "test");
run("DROP TABLE t1");
run("DROP TABLE t1, st1s1, st1s2");
}
TEST_F(ParserInitialDTest, dropTopic) {
......
......@@ -86,7 +86,7 @@ typedef struct {
const char* promptContinue;
const char* osname;
int32_t promptSize;
char programVersion[32];
char programVersion[256];
} SShellOsDetails;
typedef struct {
......
......@@ -413,7 +413,9 @@ int32_t shellParseArgs(int32_t argc, char *argv[]) {
sprintf(shell.info.promptHeader, "%s> ", cusPrompt);
shell.info.promptContinue = TAOS_CONSOLE_PROMPT_CONTINUE;
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)
shell.info.osname = "Windows";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册