enh: drop tables syntax optimization

This commit is contained in:
Xiaoyu Wang 2023-02-22 15:16:16 +08:00
parent 8a925342cc
commit 618c934fb2
6 changed files with 491 additions and 488 deletions

View File

@ -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));
}

View File

@ -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); }

File diff suppressed because it is too large Load Diff

View File

@ -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) {

View File

@ -86,7 +86,7 @@ typedef struct {
const char* promptContinue;
const char* osname;
int32_t promptSize;
char programVersion[32];
char programVersion[256];
} SShellOsDetails;
typedef struct {

View File

@ -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";