Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
4693f795
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看板
提交
4693f795
编写于
3月 27, 2022
作者:
C
Cary Xu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor
上级
c4df3781
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
6 deletion
+6
-6
include/common/tmsg.h
include/common/tmsg.h
+1
-1
include/util/tdef.h
include/util/tdef.h
+1
-1
source/libs/parser/src/parInsert.c
source/libs/parser/src/parInsert.c
+4
-4
未找到文件。
include/common/tmsg.h
浏览文件 @
4693f795
...
@@ -208,11 +208,11 @@ typedef struct {
...
@@ -208,11 +208,11 @@ typedef struct {
typedef
struct
SSubmitBlk
{
typedef
struct
SSubmitBlk
{
int64_t
uid
;
// table unique id
int64_t
uid
;
// table unique id
int64_t
suid
;
// stable id
int64_t
suid
;
// stable id
int32_t
padding
;
// TODO just for padding here
int32_t
sversion
;
// data schema version
int32_t
sversion
;
// data schema version
int32_t
dataLen
;
// data part length, not including the SSubmitBlk head
int32_t
dataLen
;
// data part length, not including the SSubmitBlk head
int32_t
schemaLen
;
// schema length, if length is 0, no schema exists
int32_t
schemaLen
;
// schema length, if length is 0, no schema exists
int16_t
numOfRows
;
// total number of rows in current submit block
int16_t
numOfRows
;
// total number of rows in current submit block
int16_t
padding
;
// TODO just for padding here
char
data
[];
char
data
[];
}
SSubmitBlk
;
}
SSubmitBlk
;
...
...
include/util/tdef.h
浏览文件 @
4693f795
...
@@ -209,7 +209,7 @@ typedef enum ELogicConditionType {
...
@@ -209,7 +209,7 @@ typedef enum ELogicConditionType {
#define TSDB_FUNC_TYPE_AGGREGATE 2
#define TSDB_FUNC_TYPE_AGGREGATE 2
#define TSDB_FUNC_MAX_RETRIEVE 1024
#define TSDB_FUNC_MAX_RETRIEVE 1024
#define TSDB_INDEX_NAME_LEN
33 // 32
+ 1 '\0'
#define TSDB_INDEX_NAME_LEN
65 // 64
+ 1 '\0'
#define TSDB_TYPE_STR_MAX_LEN 32
#define TSDB_TYPE_STR_MAX_LEN 32
#define TSDB_TABLE_FNAME_LEN (TSDB_DB_FNAME_LEN + TSDB_TABLE_NAME_LEN + TSDB_NAME_DELIMITER_LEN)
#define TSDB_TABLE_FNAME_LEN (TSDB_DB_FNAME_LEN + TSDB_TABLE_NAME_LEN + TSDB_NAME_DELIMITER_LEN)
#define TSDB_TOPIC_FNAME_LEN TSDB_TABLE_FNAME_LEN
#define TSDB_TOPIC_FNAME_LEN TSDB_TABLE_FNAME_LEN
...
...
source/libs/parser/src/parInsert.c
浏览文件 @
4693f795
...
@@ -640,7 +640,7 @@ static int32_t parseBoundColumns(SInsertParseContext* pCxt, SParsedDataColInfo*
...
@@ -640,7 +640,7 @@ static int32_t parseBoundColumns(SInsertParseContext* pCxt, SParsedDataColInfo*
pColList
->
numOfBound
=
0
;
pColList
->
numOfBound
=
0
;
pColList
->
boundNullLen
=
0
;
pColList
->
boundNullLen
=
0
;
memset
(
pColList
->
boundColumns
,
0
,
sizeof
(
col_id_t
)
*
nCols
);
memset
(
pColList
->
boundColumns
,
0
,
sizeof
(
col_id_t
)
*
nCols
);
for
(
int32
_t
i
=
0
;
i
<
nCols
;
++
i
)
{
for
(
col_id
_t
i
=
0
;
i
<
nCols
;
++
i
)
{
pColList
->
cols
[
i
].
valStat
=
VAL_STAT_NONE
;
pColList
->
cols
[
i
].
valStat
=
VAL_STAT_NONE
;
}
}
...
@@ -691,19 +691,19 @@ static int32_t parseBoundColumns(SInsertParseContext* pCxt, SParsedDataColInfo*
...
@@ -691,19 +691,19 @@ static int32_t parseBoundColumns(SInsertParseContext* pCxt, SParsedDataColInfo*
return
TSDB_CODE_TSC_OUT_OF_MEMORY
;
return
TSDB_CODE_TSC_OUT_OF_MEMORY
;
}
}
SBoundIdxInfo
*
pColIdx
=
pColList
->
colIdxInfo
;
SBoundIdxInfo
*
pColIdx
=
pColList
->
colIdxInfo
;
for
(
int16
_t
i
=
0
;
i
<
pColList
->
numOfBound
;
++
i
)
{
for
(
col_id
_t
i
=
0
;
i
<
pColList
->
numOfBound
;
++
i
)
{
pColIdx
[
i
].
schemaColIdx
=
pColList
->
boundColumns
[
i
];
pColIdx
[
i
].
schemaColIdx
=
pColList
->
boundColumns
[
i
];
pColIdx
[
i
].
boundIdx
=
i
;
pColIdx
[
i
].
boundIdx
=
i
;
}
}
qsort
(
pColIdx
,
pColList
->
numOfBound
,
sizeof
(
SBoundIdxInfo
),
schemaIdxCompar
);
qsort
(
pColIdx
,
pColList
->
numOfBound
,
sizeof
(
SBoundIdxInfo
),
schemaIdxCompar
);
for
(
int16
_t
i
=
0
;
i
<
pColList
->
numOfBound
;
++
i
)
{
for
(
col_id
_t
i
=
0
;
i
<
pColList
->
numOfBound
;
++
i
)
{
pColIdx
[
i
].
finalIdx
=
i
;
pColIdx
[
i
].
finalIdx
=
i
;
}
}
qsort
(
pColIdx
,
pColList
->
numOfBound
,
sizeof
(
SBoundIdxInfo
),
boundIdxCompar
);
qsort
(
pColIdx
,
pColList
->
numOfBound
,
sizeof
(
SBoundIdxInfo
),
boundIdxCompar
);
}
}
memset
(
&
pColList
->
boundColumns
[
pColList
->
numOfBound
],
0
,
memset
(
&
pColList
->
boundColumns
[
pColList
->
numOfBound
],
0
,
sizeof
(
int16
_t
)
*
(
pColList
->
numOfCols
-
pColList
->
numOfBound
));
sizeof
(
col_id
_t
)
*
(
pColList
->
numOfCols
-
pColList
->
numOfBound
));
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录