Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
fdf7d778
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
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看板
提交
fdf7d778
编写于
5月 29, 2022
作者:
C
Cary Xu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: bug fix for tag refactor
上级
174eb2d8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
17 addition
and
28 deletion
+17
-28
source/common/src/tdataformat.c
source/common/src/tdataformat.c
+4
-2
source/common/src/tmsg.c
source/common/src/tmsg.c
+0
-2
source/dnode/vnode/src/meta/metaTable.c
source/dnode/vnode/src/meta/metaTable.c
+13
-11
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+0
-13
未找到文件。
source/common/src/tdataformat.c
浏览文件 @
fdf7d778
...
...
@@ -638,7 +638,6 @@ static int32_t tPutTagVal(uint8_t *p, STagVal *pTagVal, int8_t isJson) {
// type
n
+=
tPutI8
(
p
?
p
+
n
:
p
,
pTagVal
->
type
);
debugPrintTagVal
(
pTagVal
->
type
,
pTagVal
->
pData
,
pTagVal
->
nData
,
__func__
,
__LINE__
);
// value
if
(
IS_VAR_DATA_TYPE
(
pTagVal
->
type
))
{
n
+=
tPutBinary
(
p
?
p
+
n
:
p
,
pTagVal
->
pData
,
pTagVal
->
nData
);
...
...
@@ -799,7 +798,10 @@ int32_t tEncodeTag(SEncoder *pEncoder, const STag *pTag) {
return
tEncodeBinary
(
pEncoder
,
(
const
uint8_t
*
)
pTag
,
pTag
->
len
);
}
int32_t
tDecodeTag
(
SDecoder
*
pDecoder
,
STag
**
ppTag
)
{
return
tDecodeBinary
(
pDecoder
,
(
uint8_t
**
)
ppTag
,
NULL
);
}
int32_t
tDecodeTag
(
SDecoder
*
pDecoder
,
STag
**
ppTag
)
{
uint32_t
len
=
0
;
return
tDecodeBinary
(
pDecoder
,
(
uint8_t
**
)
ppTag
,
&
len
);
}
int32_t
tTagToValArray
(
const
STag
*
pTag
,
SArray
**
ppArray
)
{
int32_t
code
=
0
;
...
...
source/common/src/tmsg.c
浏览文件 @
fdf7d778
...
...
@@ -3847,7 +3847,6 @@ int tEncodeSVCreateTbReq(SEncoder *pCoder, const SVCreateTbReq *pReq) {
if
(
pReq
->
type
==
TSDB_CHILD_TABLE
)
{
if
(
tEncodeI64
(
pCoder
,
pReq
->
ctb
.
suid
)
<
0
)
return
-
1
;
if
(
tEncodeTag
(
pCoder
,
(
const
STag
*
)
pReq
->
ctb
.
pTag
)
<
0
)
return
-
1
;
debugPrintSTag
((
STag
*
)
pReq
->
ctb
.
pTag
,
__func__
,
__LINE__
);
}
else
if
(
pReq
->
type
==
TSDB_NORMAL_TABLE
)
{
if
(
tEncodeSSchemaWrapper
(
pCoder
,
&
pReq
->
ntb
.
schemaRow
)
<
0
)
return
-
1
;
}
else
{
...
...
@@ -3871,7 +3870,6 @@ int tDecodeSVCreateTbReq(SDecoder *pCoder, SVCreateTbReq *pReq) {
if
(
pReq
->
type
==
TSDB_CHILD_TABLE
)
{
if
(
tDecodeI64
(
pCoder
,
&
pReq
->
ctb
.
suid
)
<
0
)
return
-
1
;
if
(
tDecodeTag
(
pCoder
,
(
STag
**
)
&
pReq
->
ctb
.
pTag
)
<
0
)
return
-
1
;
debugPrintSTag
((
STag
*
)
pReq
->
ctb
.
pTag
,
__func__
,
__LINE__
);
}
else
if
(
pReq
->
type
==
TSDB_NORMAL_TABLE
)
{
if
(
tDecodeSSchemaWrapper
(
pCoder
,
&
pReq
->
ntb
.
schemaRow
)
<
0
)
return
-
1
;
}
else
{
...
...
source/dnode/vnode/src/meta/metaTable.c
浏览文件 @
fdf7d778
...
...
@@ -726,17 +726,17 @@ static int metaUpdateCtbIdx(SMeta *pMeta, const SMetaEntry *pME) {
return
tdbTbInsert
(
pMeta
->
pCtbIdx
,
&
ctbIdxKey
,
sizeof
(
ctbIdxKey
),
NULL
,
0
,
&
pMeta
->
txn
);
}
static
int
metaCreateTagIdxKey
(
tb_uid_t
suid
,
int32_t
cid
,
const
void
*
pTagData
,
int8_t
type
,
tb_uid_t
uid
,
static
int
metaCreateTagIdxKey
(
tb_uid_t
suid
,
int32_t
cid
,
const
void
*
pTagData
,
int
32_t
nTagData
,
int
8_t
type
,
tb_uid_t
uid
,
STagIdxKey
**
ppTagIdxKey
,
int32_t
*
nTagIdxKey
)
{
int32_t
nTagData
=
0
;
if
(
pTagData
)
{
if
(
IS_VAR_DATA_TYPE
(
type
))
{
nTagData
=
varDataTLen
(
pTagData
);
}
else
{
nTagData
=
tDataTypes
[
type
].
bytes
;
}
}
//
int32_t nTagData = 0;
//
if (pTagData) {
//
if (IS_VAR_DATA_TYPE(type)) {
//
nTagData = varDataTLen(pTagData);
//
} else {
//
nTagData = tDataTypes[type].bytes;
//
}
//
}
*
nTagIdxKey
=
sizeof
(
STagIdxKey
)
+
nTagData
+
sizeof
(
tb_uid_t
);
*
ppTagIdxKey
=
(
STagIdxKey
*
)
taosMemoryMalloc
(
*
nTagIdxKey
);
...
...
@@ -768,6 +768,7 @@ static int metaUpdateTagIdx(SMeta *pMeta, const SMetaEntry *pCtbEntry) {
int32_t
nTagIdxKey
;
const
SSchema
*
pTagColumn
;
// = &stbEntry.stbEntry.schema.pSchema[0];
const
void
*
pTagData
=
NULL
;
//
int32_t
nTagData
=
0
;
SDecoder
dc
=
{
0
};
// get super table
...
...
@@ -784,6 +785,7 @@ static int metaUpdateTagIdx(SMeta *pMeta, const SMetaEntry *pCtbEntry) {
STagVal
tagVal
=
{.
cid
=
pTagColumn
->
colId
};
tTagGet
((
const
STag
*
)
pCtbEntry
->
ctbEntry
.
pTags
,
&
tagVal
);
pTagData
=
tagVal
.
pData
;
nTagData
=
(
int32_t
)
tagVal
.
nData
;
// update tag index
#ifdef USE_INVERTED_INDEX
...
...
@@ -798,7 +800,7 @@ static int metaUpdateTagIdx(SMeta *pMeta, const SMetaEntry *pCtbEntry) {
int
ret
=
indexPut
((
SIndex
*
)
pMeta
->
pTagIvtIdx
,
tmGroup
,
tuid
);
indexMultiTermDestroy
(
tmGroup
);
#else
if
(
metaCreateTagIdxKey
(
pCtbEntry
->
ctbEntry
.
suid
,
pTagColumn
->
colId
,
pTagData
,
pTagColumn
->
type
,
pCtbEntry
->
uid
,
if
(
metaCreateTagIdxKey
(
pCtbEntry
->
ctbEntry
.
suid
,
pTagColumn
->
colId
,
pTagData
,
nTagData
,
pTagColumn
->
type
,
pCtbEntry
->
uid
,
&
pTagIdxKey
,
&
nTagIdxKey
)
<
0
)
{
return
-
1
;
}
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
fdf7d778
...
...
@@ -4030,19 +4030,6 @@ static int32_t serializeVgroupCreateTableBatch(SVgroupCreateTableBatch* pTbBatch
pVgData
->
numOfTables
=
(
int32_t
)
taosArrayGetSize
(
pTbBatch
->
req
.
pArray
);
taosArrayPush
(
pBufArray
,
&
pVgData
);
#if 1 // debug print
SDecoder
decoder
=
{
0
};
SVCreateTbBatchReq
req
=
{
0
};
// decode
tDecoderInit
(
&
decoder
,
pBuf
,
tlen
-
sizeof
(
SMsgHead
));
if
(
tDecodeSVCreateTbBatchReq
(
&
decoder
,
&
req
)
<
0
)
{
ASSERT
(
0
);
}
tDecoderClear
(
&
decoder
);
#endif
printf
(
"%s:%d: OK in send
\n
"
,
__func__
,
__LINE__
);
ASSERT
(
0
);
return
TSDB_CODE_SUCCESS
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录