Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b88327d7
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看板
提交
b88327d7
编写于
1月 18, 2023
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'main' of
https://github.com/taosdata/TDengine
into fix/TD-21761
上级
516306b5
13003626
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
63 addition
and
14 deletion
+63
-14
cmake/cmake.version
cmake/cmake.version
+1
-1
source/dnode/vnode/inc/vnode.h
source/dnode/vnode/inc/vnode.h
+2
-0
source/dnode/vnode/src/meta/metaQuery.c
source/dnode/vnode/src/meta/metaQuery.c
+26
-1
source/dnode/vnode/src/tsdb/tsdbFS.c
source/dnode/vnode/src/tsdb/tsdbFS.c
+4
-9
source/libs/executor/src/sysscanoperator.c
source/libs/executor/src/sysscanoperator.c
+11
-3
tests/script/tsim/query/sys_tbname.sim
tests/script/tsim/query/sys_tbname.sim
+19
-0
未找到文件。
cmake/cmake.version
浏览文件 @
b88327d7
...
...
@@ -2,7 +2,7 @@
IF (DEFINED VERNUMBER)
SET(TD_VER_NUMBER ${VERNUMBER})
ELSE ()
SET(TD_VER_NUMBER "3.0.2.
2
")
SET(TD_VER_NUMBER "3.0.2.
4
")
ENDIF ()
IF (DEFINED VERCOMPATIBLE)
...
...
source/dnode/vnode/inc/vnode.h
浏览文件 @
b88327d7
...
...
@@ -153,6 +153,8 @@ typedef struct SMTbCursor SMTbCursor;
SMTbCursor
*
metaOpenTbCursor
(
SMeta
*
pMeta
);
void
metaCloseTbCursor
(
SMTbCursor
*
pTbCur
);
int32_t
metaTbCursorNext
(
SMTbCursor
*
pTbCur
);
int32_t
metaTbCursorPrev
(
SMTbCursor
*
pTbCur
);
#endif
// tsdb
...
...
source/dnode/vnode/src/meta/metaQuery.c
浏览文件 @
b88327d7
...
...
@@ -311,7 +311,7 @@ void metaCloseTbCursor(SMTbCursor *pTbCur) {
}
}
int
metaTbCursorNext
(
SMTbCursor
*
pTbCur
)
{
int
32_t
metaTbCursorNext
(
SMTbCursor
*
pTbCur
)
{
int
ret
;
void
*
pBuf
;
STbCfg
tbCfg
;
...
...
@@ -335,6 +335,31 @@ int metaTbCursorNext(SMTbCursor *pTbCur) {
return
0
;
}
int32_t
metaTbCursorPrev
(
SMTbCursor
*
pTbCur
)
{
int
ret
;
void
*
pBuf
;
STbCfg
tbCfg
;
for
(;;)
{
ret
=
tdbTbcPrev
(
pTbCur
->
pDbc
,
&
pTbCur
->
pKey
,
&
pTbCur
->
kLen
,
&
pTbCur
->
pVal
,
&
pTbCur
->
vLen
);
if
(
ret
<
0
)
{
return
-
1
;
}
tDecoderClear
(
&
pTbCur
->
mr
.
coder
);
metaGetTableEntryByVersion
(
&
pTbCur
->
mr
,
((
SUidIdxVal
*
)
pTbCur
->
pVal
)[
0
].
version
,
*
(
tb_uid_t
*
)
pTbCur
->
pKey
);
if
(
pTbCur
->
mr
.
me
.
type
==
TSDB_SUPER_TABLE
)
{
continue
;
}
break
;
}
return
0
;
}
SSchemaWrapper
*
metaGetTableSchema
(
SMeta
*
pMeta
,
tb_uid_t
uid
,
int32_t
sver
,
int
lock
)
{
void
*
pData
=
NULL
;
int
nData
=
0
;
...
...
source/dnode/vnode/src/tsdb/tsdbFS.c
浏览文件 @
b88327d7
...
...
@@ -458,9 +458,8 @@ static int32_t tsdbMergeFileSet(STsdb *pTsdb, SDFileSet *pSetOld, SDFileSet *pSe
taosMemoryFree
(
pHeadF
);
}
}
else
{
nRef
=
pHeadF
->
nRef
;
*
pHeadF
=
*
pSetNew
->
pHeadF
;
pHeadF
->
nRef
=
nRef
;
ASSERT
(
pHeadF
->
offset
==
pSetNew
->
pHeadF
->
offset
);
ASSERT
(
pHeadF
->
size
==
pSetNew
->
pHeadF
->
size
);
}
// data
...
...
@@ -481,9 +480,7 @@ static int32_t tsdbMergeFileSet(STsdb *pTsdb, SDFileSet *pSetOld, SDFileSet *pSe
taosMemoryFree
(
pDataF
);
}
}
else
{
nRef
=
pDataF
->
nRef
;
*
pDataF
=
*
pSetNew
->
pDataF
;
pDataF
->
nRef
=
nRef
;
pDataF
->
size
=
pSetNew
->
pDataF
->
size
;
}
// sma
...
...
@@ -504,9 +501,7 @@ static int32_t tsdbMergeFileSet(STsdb *pTsdb, SDFileSet *pSetOld, SDFileSet *pSe
taosMemoryFree
(
pSmaF
);
}
}
else
{
nRef
=
pSmaF
->
nRef
;
*
pSmaF
=
*
pSetNew
->
pSmaF
;
pSmaF
->
nRef
=
nRef
;
pSmaF
->
size
=
pSetNew
->
pSmaF
->
size
;
}
// stt
...
...
source/libs/executor/src/sysscanoperator.c
浏览文件 @
b88327d7
...
...
@@ -491,6 +491,7 @@ static SSDataBlock* sysTableScanUserTags(SOperatorInfo* pOperator) {
pInfo
->
pCur
=
metaOpenTbCursor
(
pInfo
->
readHandle
.
meta
);
}
bool
blockFull
=
false
;
while
((
ret
=
metaTbCursorNext
(
pInfo
->
pCur
))
==
0
)
{
if
(
pInfo
->
pCur
->
mr
.
me
.
type
!=
TSDB_CHILD_TABLE
)
{
continue
;
...
...
@@ -512,17 +513,24 @@ static SSDataBlock* sysTableScanUserTags(SOperatorInfo* pOperator) {
T_LONG_JMP
(
pTaskInfo
->
env
,
terrno
);
}
sysTableUserTagsFillOneTableTags
(
pInfo
,
&
smrSuperTable
,
&
pInfo
->
pCur
->
mr
,
dbname
,
tableName
,
&
numOfRows
,
dataBlock
);
if
((
smrSuperTable
.
me
.
stbEntry
.
schemaTag
.
nCols
+
numOfRows
)
>
pOperator
->
resultInfo
.
capacity
)
{
metaTbCursorPrev
(
pInfo
->
pCur
);
blockFull
=
true
;
}
else
{
sysTableUserTagsFillOneTableTags
(
pInfo
,
&
smrSuperTable
,
&
pInfo
->
pCur
->
mr
,
dbname
,
tableName
,
&
numOfRows
,
dataBlock
);
}
metaReaderClear
(
&
smrSuperTable
);
if
(
numOfRows
>=
pOperator
->
resultInfo
.
capacity
)
{
if
(
blockFull
||
numOfRows
>=
pOperator
->
resultInfo
.
capacity
)
{
relocateAndFilterSysTagsScanResult
(
pInfo
,
numOfRows
,
dataBlock
,
pOperator
->
exprSupp
.
pFilterInfo
);
numOfRows
=
0
;
if
(
pInfo
->
pRes
->
info
.
rows
>
0
)
{
break
;
}
blockFull
=
false
;
}
}
...
...
tests/script/tsim/query/sys_tbname.sim
浏览文件 @
b88327d7
...
...
@@ -86,4 +86,23 @@ if $data00 != @ins_tags@ then
return -1
endi
sql create stable stb(ts timestamp, f int) tags(t1 int, t2 int, t3 int, t4 int, t5 int);
$i = 0
$tbNum = 1000
$tbPrefix = stb_tb
while $i < $tbNum
$tb = $tbPrefix . $i
sql create table $tb using stb tags( $i , $i , $i , $i , $i )
$i = $i + 1
endw
sql select tag_value from information_schema.ins_tags where stable_name='stb';
if $rows != 5000 then
print $rows
return -1
endi
#system sh/exec.sh -n dnode1 -s stop -x SIGINT
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录