Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
67a94707
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
67a94707
编写于
2月 24, 2023
作者:
X
Xiaoyu Wang
提交者:
GitHub
2月 24, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #20104 from taosdata/feat/3.0_wxy
enh: drop tables syntax optimization
上级
62936f22
a94fd9ec
变更
9
展开全部
显示空白变更内容
内联
并排
Showing
9 changed file
with
700 addition
and
598 deletion
+700
-598
source/dnode/mnode/impl/src/mndMain.c
source/dnode/mnode/impl/src/mndMain.c
+1
-1
source/dnode/mnode/impl/src/mndStb.c
source/dnode/mnode/impl/src/mndStb.c
+2
-2
source/libs/parser/inc/sql.y
source/libs/parser/inc/sql.y
+1
-1
source/libs/parser/src/sql.c
source/libs/parser/src/sql.c
+484
-484
source/libs/parser/test/parInitialDTest.cpp
source/libs/parser/test/parInitialDTest.cpp
+1
-0
tests/system-test/0-others/taosShell.py
tests/system-test/0-others/taosShell.py
+1
-1
tools/shell/inc/shellInt.h
tools/shell/inc/shellInt.h
+1
-1
tools/shell/src/shellArguments.c
tools/shell/src/shellArguments.c
+3
-1
utils/test/c/tmq_taosx_ci.c
utils/test/c/tmq_taosx_ci.c
+206
-107
未找到文件。
source/dnode/mnode/impl/src/mndMain.c
浏览文件 @
67a94707
...
@@ -716,7 +716,7 @@ int32_t mndProcessRpcMsg(SRpcMsg *pMsg) {
...
@@ -716,7 +716,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
,
t
errstr
(
),
pMsg
->
info
.
ahandle
,
mGError
(
"msg:%p, failed to process since %s, app:%p type:%s"
,
pMsg
,
t
strerror
(
code
),
pMsg
->
info
.
ahandle
,
TMSG_INFO
(
pMsg
->
msgType
));
TMSG_INFO
(
pMsg
->
msgType
));
}
}
...
...
source/dnode/mnode/impl/src/mndStb.c
浏览文件 @
67a94707
...
@@ -893,7 +893,7 @@ static int32_t mndProcessTtlTimer(SRpcMsg *pReq) {
...
@@ -893,7 +893,7 @@ static int32_t mndProcessTtlTimer(SRpcMsg *pReq) {
static
int32_t
mndFindSuperTableTagIndex
(
const
SStbObj
*
pStb
,
const
char
*
tagName
)
{
static
int32_t
mndFindSuperTableTagIndex
(
const
SStbObj
*
pStb
,
const
char
*
tagName
)
{
for
(
int32_t
tag
=
0
;
tag
<
pStb
->
numOfTags
;
tag
++
)
{
for
(
int32_t
tag
=
0
;
tag
<
pStb
->
numOfTags
;
tag
++
)
{
if
(
strc
asec
mp
(
pStb
->
pTags
[
tag
].
name
,
tagName
)
==
0
)
{
if
(
strcmp
(
pStb
->
pTags
[
tag
].
name
,
tagName
)
==
0
)
{
return
tag
;
return
tag
;
}
}
}
}
...
@@ -903,7 +903,7 @@ static int32_t mndFindSuperTableTagIndex(const SStbObj *pStb, const char *tagNam
...
@@ -903,7 +903,7 @@ static int32_t mndFindSuperTableTagIndex(const SStbObj *pStb, const char *tagNam
static
int32_t
mndFindSuperTableColumnIndex
(
const
SStbObj
*
pStb
,
const
char
*
colName
)
{
static
int32_t
mndFindSuperTableColumnIndex
(
const
SStbObj
*
pStb
,
const
char
*
colName
)
{
for
(
int32_t
col
=
0
;
col
<
pStb
->
numOfColumns
;
col
++
)
{
for
(
int32_t
col
=
0
;
col
<
pStb
->
numOfColumns
;
col
++
)
{
if
(
strc
asec
mp
(
pStb
->
pColumns
[
col
].
name
,
colName
)
==
0
)
{
if
(
strcmp
(
pStb
->
pColumns
[
col
].
name
,
colName
)
==
0
)
{
return
col
;
return
col
;
}
}
}
}
...
...
source/libs/parser/inc/sql.y
浏览文件 @
67a94707
...
@@ -301,7 +301,7 @@ create_subtable_clause(A) ::=
...
@@ -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); }
...
...
source/libs/parser/src/sql.c
浏览文件 @
67a94707
此差异已折叠。
点击以展开。
source/libs/parser/test/parInitialDTest.cpp
浏览文件 @
67a94707
...
@@ -245,6 +245,7 @@ TEST_F(ParserInitialDTest, dropTable) {
...
@@ -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
)
{
...
...
tests/system-test/0-others/taosShell.py
浏览文件 @
67a94707
...
@@ -373,7 +373,7 @@ class TDTestCase:
...
@@ -373,7 +373,7 @@ class TDTestCase:
version
=
'version: '
+
version
version
=
'version: '
+
version
retVal
=
retVal
.
replace
(
"
\n
"
,
""
)
retVal
=
retVal
.
replace
(
"
\n
"
,
""
)
retVal
=
retVal
.
replace
(
"
\r
"
,
""
)
retVal
=
retVal
.
replace
(
"
\r
"
,
""
)
if
retVal
!=
version
:
if
retVal
.
startswith
(
version
)
==
False
:
print
(
"return version: [%s]"
%
retVal
)
print
(
"return version: [%s]"
%
retVal
)
print
(
"dict version: [%s]"
%
version
)
print
(
"dict version: [%s]"
%
version
)
tdLog
.
exit
(
"taos -V version not match"
)
tdLog
.
exit
(
"taos -V version not match"
)
...
...
tools/shell/inc/shellInt.h
浏览文件 @
67a94707
...
@@ -86,7 +86,7 @@ typedef struct {
...
@@ -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
{
...
...
tools/shell/src/shellArguments.c
浏览文件 @
67a94707
...
@@ -413,7 +413,9 @@ int32_t shellParseArgs(int32_t argc, char *argv[]) {
...
@@ -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
\n
gitinfo: %s
\n
buildInfo: %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"
;
...
...
utils/test/c/tmq_taosx_ci.c
浏览文件 @
67a94707
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录