Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
acdc22ee
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看板
提交
acdc22ee
编写于
10月 09, 2020
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-1613]
上级
b120f8ce
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
45 addition
and
11 deletion
+45
-11
src/mnode/src/mnodeTable.c
src/mnode/src/mnodeTable.c
+45
-11
未找到文件。
src/mnode/src/mnodeTable.c
浏览文件 @
acdc22ee
...
...
@@ -63,27 +63,27 @@ static int32_t mnodeRetrieveShowSuperTables(SShowObj *pShow, char *data, int32_t
static
int32_t
mnodeGetStreamTableMeta
(
STableMetaMsg
*
pMeta
,
SShowObj
*
pShow
,
void
*
pConn
);
static
int32_t
mnodeRetrieveStreamTables
(
SShowObj
*
pShow
,
char
*
data
,
int32_t
rows
,
void
*
pConn
);
static
int32_t
mnodeProcessCreateTableMsg
(
SMnodeMsg
*
mnode
Msg
);
static
int32_t
mnodeProcessCreateTableMsg
(
SMnodeMsg
*
p
Msg
);
static
int32_t
mnodeProcessCreateSuperTableMsg
(
SMnodeMsg
*
pMsg
);
static
int32_t
mnodeProcessCreateChildTableMsg
(
SMnodeMsg
*
pMsg
);
static
void
mnodeProcessCreateChildTableRsp
(
SRpcMsg
*
rpcMsg
);
static
int32_t
mnodeProcessDropTableMsg
(
SMnodeMsg
*
mnode
Msg
);
static
int32_t
mnodeProcessDropTableMsg
(
SMnodeMsg
*
p
Msg
);
static
int32_t
mnodeProcessDropSuperTableMsg
(
SMnodeMsg
*
pMsg
);
static
void
mnodeProcessDropSuperTableRsp
(
SRpcMsg
*
rpcMsg
);
static
int32_t
mnodeProcessDropChildTableMsg
(
SMnodeMsg
*
pMsg
);
static
void
mnodeProcessDropChildTableRsp
(
SRpcMsg
*
rpcMsg
);
static
int32_t
mnodeProcessSuperTableVgroupMsg
(
SMnodeMsg
*
mnode
Msg
);
static
int32_t
mnodeProcessMultiTableMetaMsg
(
SMnodeMsg
*
mnode
Msg
);
static
int32_t
mnodeProcessTableCfgMsg
(
SMnodeMsg
*
mnode
Msg
);
static
int32_t
mnodeProcessSuperTableVgroupMsg
(
SMnodeMsg
*
p
Msg
);
static
int32_t
mnodeProcessMultiTableMetaMsg
(
SMnodeMsg
*
p
Msg
);
static
int32_t
mnodeProcessTableCfgMsg
(
SMnodeMsg
*
p
Msg
);
static
int32_t
mnodeProcessTableMetaMsg
(
SMnodeMsg
*
mnode
Msg
);
static
int32_t
mnodeProcessTableMetaMsg
(
SMnodeMsg
*
p
Msg
);
static
int32_t
mnodeGetSuperTableMeta
(
SMnodeMsg
*
pMsg
);
static
int32_t
mnodeGetChildTableMeta
(
SMnodeMsg
*
pMsg
);
static
int32_t
mnodeAutoCreateChildTable
(
SMnodeMsg
*
pMsg
);
static
int32_t
mnodeProcessAlterTableMsg
(
SMnodeMsg
*
mnode
Msg
);
static
int32_t
mnodeProcessAlterTableMsg
(
SMnodeMsg
*
p
Msg
);
static
void
mnodeProcessAlterTableRsp
(
SRpcMsg
*
rpcMsg
);
static
int32_t
mnodeFindSuperTableColumnIndex
(
SSuperTableObj
*
pStable
,
char
*
colName
);
...
...
@@ -2543,6 +2543,25 @@ static int32_t mnodeGetShowTableMeta(STableMetaMsg *pMeta, SShowObj *pShow, void
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
pShow
->
bytes
[
cols
]
=
8
;
// table uid
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_BIGINT
;
strcpy
(
pSchema
[
cols
].
name
,
"uid"
);
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
pShow
->
bytes
[
cols
]
=
4
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_INT
;
strcpy
(
pSchema
[
cols
].
name
,
"tid"
);
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
pShow
->
bytes
[
cols
]
=
4
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_INT
;
strcpy
(
pSchema
[
cols
].
name
,
"vgId"
);
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
pMeta
->
numOfColumns
=
htons
(
cols
);
pShow
->
numOfColumns
=
cols
;
...
...
@@ -2568,6 +2587,7 @@ static int32_t mnodeRetrieveShowTables(SShowObj *pShow, char *data, int32_t rows
return
0
;
}
int32_t
cols
=
0
;
int32_t
numOfRows
=
0
;
SChildTableObj
*
pTable
=
NULL
;
SPatternCompareInfo
info
=
PATTERN_COMPARE_INFO_INITIALIZER
;
...
...
@@ -2608,8 +2628,7 @@ static int32_t mnodeRetrieveShowTables(SShowObj *pShow, char *data, int32_t rows
continue
;
}
int32_t
cols
=
0
;
cols
=
0
;
char
*
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
tableName
,
pShow
->
bytes
[
cols
]);
...
...
@@ -2638,14 +2657,29 @@ static int32_t mnodeRetrieveShowTables(SShowObj *pShow, char *data, int32_t rows
cols
++
;
// uid
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
*
(
int64_t
*
)
pWrite
=
pTable
->
uid
;
cols
++
;
// tid
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
*
(
int32_t
*
)
pWrite
=
pTable
->
sid
;
cols
++
;
//vgid
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
*
(
int32_t
*
)
pWrite
=
pTable
->
vgId
;
cols
++
;
numOfRows
++
;
mnodeDecTableRef
(
pTable
);
}
pShow
->
numOfReads
+=
numOfRows
;
const
int32_t
NUM_OF_COLUMNS
=
4
;
mnodeVacuumResult
(
data
,
NUM_OF_COLUMNS
,
numOfRows
,
rows
,
pShow
);
mnodeVacuumResult
(
data
,
cols
,
numOfRows
,
rows
,
pShow
);
mnodeDecDbRef
(
pDb
);
free
(
pattern
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录