Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f020e4c3
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
f020e4c3
编写于
3月 11, 2022
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-13981 show databases rewrite
上级
4b2ab16e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
22 addition
and
14 deletion
+22
-14
source/libs/planner/src/planPhysiCreater.c
source/libs/planner/src/planPhysiCreater.c
+19
-12
tests/script/tsim/db/error1.sim
tests/script/tsim/db/error1.sim
+3
-2
未找到文件。
source/libs/planner/src/planPhysiCreater.c
浏览文件 @
f020e4c3
...
...
@@ -199,20 +199,27 @@ static SNodeptr createPrimaryKeyCol(SPhysiPlanContext* pCxt, uint64_t tableId) {
}
static
int32_t
createScanCols
(
SPhysiPlanContext
*
pCxt
,
SScanPhysiNode
*
pScanPhysiNode
,
SNodeList
*
pScanCols
)
{
pScanPhysiNode
->
pScanCols
=
nodesMakeList
();
CHECK_ALLOC
(
pScanPhysiNode
->
pScanCols
,
TSDB_CODE_OUT_OF_MEMORY
);
CHECK_CODE_EXT
(
nodesListStrictAppend
(
pScanPhysiNode
->
pScanCols
,
createPrimaryKeyCol
(
pCxt
,
pScanPhysiNode
->
uid
)));
SNode
*
pNode
;
FOREACH
(
pNode
,
pScanCols
)
{
if
(
PRIMARYKEY_TIMESTAMP_COL_ID
==
((
SColumnNode
*
)
pNode
)
->
colId
)
{
SColumnNode
*
pCol
=
nodesListGetNode
(
pScanPhysiNode
->
pScanCols
,
0
);
strcpy
(
pCol
->
tableAlias
,
((
SColumnNode
*
)
pNode
)
->
tableAlias
);
strcpy
(
pCol
->
colName
,
((
SColumnNode
*
)
pNode
)
->
colName
);
continue
;
if
(
QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN
==
nodeType
(
pScanPhysiNode
)
||
QUERY_NODE_PHYSICAL_PLAN_TABLE_SEQ_SCAN
==
nodeType
(
pScanPhysiNode
))
{
pScanPhysiNode
->
pScanCols
=
nodesMakeList
();
CHECK_ALLOC
(
pScanPhysiNode
->
pScanCols
,
TSDB_CODE_OUT_OF_MEMORY
);
CHECK_CODE_EXT
(
nodesListStrictAppend
(
pScanPhysiNode
->
pScanCols
,
createPrimaryKeyCol
(
pCxt
,
pScanPhysiNode
->
uid
)));
SNode
*
pNode
;
FOREACH
(
pNode
,
pScanCols
)
{
if
(
PRIMARYKEY_TIMESTAMP_COL_ID
==
((
SColumnNode
*
)
pNode
)
->
colId
)
{
SColumnNode
*
pCol
=
nodesListGetNode
(
pScanPhysiNode
->
pScanCols
,
0
);
strcpy
(
pCol
->
tableAlias
,
((
SColumnNode
*
)
pNode
)
->
tableAlias
);
strcpy
(
pCol
->
colName
,
((
SColumnNode
*
)
pNode
)
->
colName
);
continue
;
}
CHECK_CODE_EXT
(
nodesListStrictAppend
(
pScanPhysiNode
->
pScanCols
,
nodesCloneNode
(
pNode
)));
}
CHECK_CODE_EXT
(
nodesListStrictAppend
(
pScanPhysiNode
->
pScanCols
,
nodesCloneNode
(
pNode
)));
}
else
{
pScanPhysiNode
->
pScanCols
=
nodesCloneList
(
pScanCols
);
CHECK_ALLOC
(
pScanPhysiNode
->
pScanCols
,
TSDB_CODE_OUT_OF_MEMORY
);
}
return
TSDB_CODE_SUCCESS
;
}
...
...
tests/script/tsim/db/error1.sim
浏览文件 @
f020e4c3
...
...
@@ -24,8 +24,8 @@ endi
print ========== stop dnode2
system sh/exec.sh -n dnode2 -s stop -x SIGKILL
print =============== create database
sql_error create database d1 vgroups 4
#
print =============== create database
#
sql_error create database d1 vgroups 4
print ========== start dnode2
system sh/exec.sh -n dnode2 -s start
...
...
@@ -66,6 +66,7 @@ sql_error drop database d1
print ========== start dnode2
system sh/exec.sh -n dnode2 -s start
sleep 1000
print =============== re-create database
$x = 0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录