Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
efd6b578
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
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,发现更多精彩内容 >>
提交
efd6b578
编写于
5月 11, 2023
作者:
K
kailixu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: more code
上级
f444b7ac
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
18 addition
and
13 deletion
+18
-13
include/util/tdef.h
include/util/tdef.h
+2
-2
source/common/src/systable.c
source/common/src/systable.c
+4
-2
source/dnode/mnode/impl/src/mndDnode.c
source/dnode/mnode/impl/src/mndDnode.c
+11
-9
tests/system-test/2-query/odbc.py
tests/system-test/2-query/odbc.py
+1
-0
未找到文件。
include/util/tdef.h
浏览文件 @
efd6b578
...
...
@@ -267,8 +267,8 @@ typedef enum ELogicConditionType {
#define TSDB_DNODE_CONFIG_LEN 128
#define TSDB_DNODE_VALUE_LEN 256
#define TSDB_ACTIVE_KEY_LEN 109
#define TSDB_CONN_ACTIVE_KEY_LEN
109
#define TSDB_ACTIVE_KEY_LEN 109
// history 109:?
#define TSDB_CONN_ACTIVE_KEY_LEN
257 // history 257:?
#define TSDB_DEFAULT_PKT_SIZE 65480 // same as RPC_MAX_UDP_SIZE
...
...
source/common/src/systable.c
浏览文件 @
efd6b578
...
...
@@ -35,8 +35,10 @@ static const SSysDbTableSchema dnodesSchema[] = {
{.
name
=
"create_time"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_TIMESTAMP
,
.
sysInfo
=
true
},
{.
name
=
"reboot_time"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_TIMESTAMP
,
.
sysInfo
=
true
},
{.
name
=
"note"
,
.
bytes
=
256
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
,
.
sysInfo
=
true
},
{.
name
=
"active_code"
,
.
bytes
=
108
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
,
.
sysInfo
=
true
},
{.
name
=
"c_active_code"
,
.
bytes
=
256
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
,
.
sysInfo
=
true
},
#ifdef TD_ENTERPRISE
{.
name
=
"active_code"
,
.
bytes
=
TSDB_ACTIVE_KEY_LEN
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
,
.
sysInfo
=
true
},
{.
name
=
"c_active_code"
,
.
bytes
=
TSDB_CONN_ACTIVE_KEY_LEN
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
,
.
sysInfo
=
true
},
#endif
};
static
const
SSysDbTableSchema
mnodesSchema
[]
=
{
...
...
source/dnode/mnode/impl/src/mndDnode.c
浏览文件 @
efd6b578
...
...
@@ -181,7 +181,8 @@ static SSdbRow *mndDnodeActionDecode(SSdbRaw *pRaw) {
SDB_GET_INT16
(
pRaw
,
dataPos
,
&
pDnode
->
port
,
_OVER
)
SDB_GET_BINARY
(
pRaw
,
dataPos
,
pDnode
->
fqdn
,
TSDB_FQDN_LEN
,
_OVER
)
SDB_GET_RESERVE
(
pRaw
,
dataPos
,
TSDB_DNODE_RESERVE_SIZE
,
_OVER
)
if
(
sver
>
1
)
{
if
(
sver
>
1
)
{
// update the sver to process upgrade compatibility if increase the active_key len
SDB_GET_BINARY
(
pRaw
,
dataPos
,
pDnode
->
active
,
TSDB_ACTIVE_KEY_LEN
,
_OVER
)
SDB_GET_BINARY
(
pRaw
,
dataPos
,
pDnode
->
connActive
,
TSDB_CONN_ACTIVE_KEY_LEN
,
_OVER
)
}
...
...
@@ -1075,6 +1076,7 @@ static int32_t mndRetrieveDnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
ESdbStatus
objStatus
=
0
;
SDnodeObj
*
pDnode
=
NULL
;
int64_t
curMs
=
taosGetTimestampMs
();
char
buf
[
TSDB_CONN_ACTIVE_KEY_LEN
+
VARSTR_HEADER_SIZE
];
// make sure TSDB_CONN_ACTIVE_KEY_LEN >= TSDB_EP_LEN
while
(
numOfRows
<
rows
)
{
pShow
->
pIter
=
sdbFetchAll
(
pSdb
,
SDB_DNODE
,
pShow
->
pIter
,
(
void
**
)
&
pDnode
,
&
objStatus
,
true
);
...
...
@@ -1086,7 +1088,6 @@ static int32_t mndRetrieveDnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
SColumnInfoData
*
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataSetVal
(
pColInfo
,
numOfRows
,
(
const
char
*
)
&
pDnode
->
id
,
false
);
char
buf
[
tListLen
(
pDnode
->
ep
)
+
VARSTR_HEADER_SIZE
]
=
{
0
};
STR_WITH_MAXSIZE_TO_VARSTR
(
buf
,
pDnode
->
ep
,
pShow
->
pMeta
->
pSchemas
[
cols
].
bytes
);
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
...
...
@@ -1111,10 +1112,9 @@ static int32_t mndRetrieveDnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
status
=
"offline"
;
}
char
b1
[
TSDB_CONN_ACTIVE_KEY_LEN
+
2
]
=
{
0
};
STR_TO_VARSTR
(
b1
,
status
);
STR_TO_VARSTR
(
buf
,
status
);
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataSetVal
(
pColInfo
,
numOfRows
,
b
1
,
false
);
colDataSetVal
(
pColInfo
,
numOfRows
,
b
uf
,
false
);
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataSetVal
(
pColInfo
,
numOfRows
,
(
const
char
*
)
&
pDnode
->
createdTime
,
false
);
...
...
@@ -1129,13 +1129,15 @@ static int32_t mndRetrieveDnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
colDataSetVal
(
pColInfo
,
numOfRows
,
b
,
false
);
taosMemoryFreeClear
(
b
);
STR_TO_VARSTR
(
b1
,
pDnode
->
active
);
#ifdef TD_ENTERPRISE
STR_TO_VARSTR
(
buf
,
pDnode
->
active
);
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataSetVal
(
pColInfo
,
numOfRows
,
b
1
,
false
);
colDataSetVal
(
pColInfo
,
numOfRows
,
b
uf
,
false
);
STR_TO_VARSTR
(
b
1
,
pDnode
->
connActive
);
STR_TO_VARSTR
(
b
uf
,
pDnode
->
connActive
);
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataSetVal
(
pColInfo
,
numOfRows
,
b1
,
false
);
colDataSetVal
(
pColInfo
,
numOfRows
,
buf
,
false
);
#endif
numOfRows
++
;
sdbRelease
(
pSdb
,
pDnode
);
...
...
tests/system-test/2-query/odbc.py
浏览文件 @
efd6b578
...
...
@@ -22,6 +22,7 @@ class TDTestCase:
tdSql
.
execute
(
"insert into db.ctb using db.stb tags(1) (ts, c1) values (now, 1)"
)
tdSql
.
query
(
"select count(*) from information_schema.ins_columns"
)
# enterprise version: 285, community version: 277
tdSql
.
checkData
(
0
,
0
,
285
)
tdSql
.
query
(
"select * from information_schema.ins_columns where table_name = 'ntb'"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录