Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
936b1562
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看板
提交
936b1562
编写于
1月 31, 2023
作者:
wmmhello
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:remove htonl length in block encode
上级
2ad58696
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
9 deletion
+13
-9
source/client/src/clientImpl.c
source/client/src/clientImpl.c
+7
-4
source/common/src/tdatablock.c
source/common/src/tdatablock.c
+3
-3
source/libs/parser/src/parInsertUtil.c
source/libs/parser/src/parInsertUtil.c
+3
-2
未找到文件。
source/client/src/clientImpl.c
浏览文件 @
936b1562
...
...
@@ -1771,8 +1771,10 @@ static int32_t doConvertJson(SReqResultInfo* pResultInfo, int32_t numOfCols, int
char
*
pStart
=
p
;
char
*
pStart1
=
p1
;
for
(
int32_t
i
=
0
;
i
<
numOfCols
;
++
i
)
{
int32_t
colLen
=
htonl
(
colLength
[
i
]);
int32_t
colLen1
=
htonl
(
colLength1
[
i
]);
// int32_t colLen = htonl(colLength[i]);
// int32_t colLen1 = htonl(colLength1[i]);
int32_t
colLen
=
colLength
[
i
];
int32_t
colLen1
=
colLength1
[
i
];
if
(
ASSERT
(
colLen
<
dataLen
)){
tscError
(
"doConvertJson error: colLen:%d >= dataLen:%d"
,
colLen
,
dataLen
);
return
TSDB_CODE_TSC_INTERNAL_ERROR
;
...
...
@@ -1831,7 +1833,8 @@ static int32_t doConvertJson(SReqResultInfo* pResultInfo, int32_t numOfCols, int
}
colLen1
=
len
;
totalLen
+=
colLen1
;
colLength1
[
i
]
=
htonl
(
len
);
// colLength1[i] = htonl(len);
colLength1
[
i
]
=
len
;
}
else
if
(
IS_VAR_DATA_TYPE
(
pResultInfo
->
fields
[
i
].
type
))
{
len
=
numOfRows
*
sizeof
(
int32_t
);
memcpy
(
pStart1
,
pStart
,
len
);
...
...
@@ -1919,7 +1922,7 @@ int32_t setResultDataPtr(SReqResultInfo* pResultInfo, TAOS_FIELD* pFields, int32
char
*
pStart
=
p
;
for
(
int32_t
i
=
0
;
i
<
numOfCols
;
++
i
)
{
colLength
[
i
]
=
htonl
(
colLength
[
i
]);
//
colLength[i] = htonl(colLength[i]);
if
(
colLength
[
i
]
>=
dataLen
)
{
tscError
(
"invalid colLength %d, dataLen %d"
,
colLength
[
i
],
dataLen
);
return
TSDB_CODE_TSC_INTERNAL_ERROR
;
...
...
source/common/src/tdatablock.c
浏览文件 @
936b1562
...
...
@@ -2482,8 +2482,8 @@ int32_t blockEncode(const SSDataBlock* pBlock, char* data, int32_t numOfCols) {
}
data
+=
colSizes
[
col
];
colSizes
[
col
]
=
htonl
(
colSizes
[
col
]);
uError
(
"blockEncode col bytes:%d, type:%d, size:%d, htonl size:%d"
,
pColRes
->
info
.
bytes
,
pColRes
->
info
.
type
,
htonl
(
colSizes
[
col
]),
colSizes
[
col
]);
//
colSizes[col] = htonl(colSizes[col]);
//
uError("blockEncode col bytes:%d, type:%d, size:%d, htonl size:%d", pColRes->info.bytes, pColRes->info.type, htonl(colSizes[col]), colSizes[col]);
}
*
actualLen
=
dataLen
;
...
...
@@ -2547,7 +2547,7 @@ const char* blockDecode(SSDataBlock* pBlock, const char* pData) {
pStart
+=
sizeof
(
int32_t
)
*
numOfCols
;
for
(
int32_t
i
=
0
;
i
<
numOfCols
;
++
i
)
{
colLen
[
i
]
=
htonl
(
colLen
[
i
]);
//
colLen[i] = htonl(colLen[i]);
ASSERT
(
colLen
[
i
]
>=
0
);
SColumnInfoData
*
pColInfoData
=
taosArrayGet
(
pBlock
->
pDataBlock
,
i
);
...
...
source/libs/parser/src/parInsertUtil.c
浏览文件 @
936b1562
...
...
@@ -678,11 +678,12 @@ int rawBlockBindData(SQuery* query, STableMeta* pTableMeta, void* data, SVCreate
pStart
+=
BitmapLen
(
numOfRows
);
}
char
*
pData
=
pStart
;
uError
(
"rawBlockBindData col bytes:%d, type:%d, size:%d, htonl size:%d"
,
pColSchema
->
bytes
,
pColSchema
->
type
,
colLength
[
c
],
htonl
(
colLength
[
c
]));
//
uError("rawBlockBindData col bytes:%d, type:%d, size:%d, htonl size:%d", pColSchema->bytes, pColSchema->type, colLength[c], htonl(colLength[c]));
tColDataAddValueByDataBlock
(
pCol
,
pColSchema
->
type
,
pColSchema
->
bytes
,
numOfRows
,
offset
,
pData
);
fields
+=
sizeof
(
int8_t
)
+
sizeof
(
int32_t
);
pStart
+=
htonl
(
colLength
[
c
]);
pStart
+=
colLength
[
c
];
// pStart += htonl(colLength[c]);
}
end:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录