Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
2a8c5640
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2a8c5640
编写于
8月 27, 2021
作者:
W
wpan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix nchar duplicated converted issue
上级
4e96d804
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
13 addition
and
6 deletion
+13
-6
src/client/inc/tsclient.h
src/client/inc/tsclient.h
+2
-1
src/client/src/tscServer.c
src/client/src/tscServer.c
+2
-2
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+3
-1
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+6
-2
未找到文件。
src/client/inc/tsclient.h
浏览文件 @
2a8c5640
...
@@ -307,6 +307,7 @@ typedef struct {
...
@@ -307,6 +307,7 @@ typedef struct {
char
*
data
;
char
*
data
;
TAOS_ROW
tsrow
;
TAOS_ROW
tsrow
;
TAOS_ROW
urow
;
TAOS_ROW
urow
;
bool
dataConverted
;
int32_t
*
length
;
// length for each field for current row
int32_t
*
length
;
// length for each field for current row
char
**
buffer
;
// Buffer used to put multibytes encoded using unicode (wchar_t)
char
**
buffer
;
// Buffer used to put multibytes encoded using unicode (wchar_t)
SColumnIndex
*
pColumnIndex
;
SColumnIndex
*
pColumnIndex
;
...
@@ -439,7 +440,7 @@ int32_t tscTansformFuncForSTableQuery(SQueryInfo *pQueryInfo);
...
@@ -439,7 +440,7 @@ int32_t tscTansformFuncForSTableQuery(SQueryInfo *pQueryInfo);
void
tscRestoreFuncForSTableQuery
(
SQueryInfo
*
pQueryInfo
);
void
tscRestoreFuncForSTableQuery
(
SQueryInfo
*
pQueryInfo
);
int32_t
tscCreateResPointerInfo
(
SSqlRes
*
pRes
,
SQueryInfo
*
pQueryInfo
);
int32_t
tscCreateResPointerInfo
(
SSqlRes
*
pRes
,
SQueryInfo
*
pQueryInfo
);
void
tscSetResRawPtr
(
SSqlRes
*
pRes
,
SQueryInfo
*
pQueryInfo
);
void
tscSetResRawPtr
(
SSqlRes
*
pRes
,
SQueryInfo
*
pQueryInfo
,
bool
converted
);
void
tscSetResRawPtrRv
(
SSqlRes
*
pRes
,
SQueryInfo
*
pQueryInfo
,
SSDataBlock
*
pBlock
,
bool
convertNchar
);
void
tscSetResRawPtrRv
(
SSqlRes
*
pRes
,
SQueryInfo
*
pQueryInfo
,
SSDataBlock
*
pBlock
,
bool
convertNchar
);
void
handleDownstreamOperator
(
SSqlObj
**
pSqlList
,
int32_t
numOfUpstream
,
SQueryInfo
*
px
,
SSqlObj
*
pParent
);
void
handleDownstreamOperator
(
SSqlObj
**
pSqlList
,
int32_t
numOfUpstream
,
SQueryInfo
*
px
,
SSqlObj
*
pParent
);
...
...
src/client/src/tscServer.c
浏览文件 @
2a8c5640
...
@@ -1892,7 +1892,7 @@ static int tscLocalResultCommonBuilder(SSqlObj *pSql, int32_t numOfRes) {
...
@@ -1892,7 +1892,7 @@ static int tscLocalResultCommonBuilder(SSqlObj *pSql, int32_t numOfRes) {
return
pRes
->
code
;
return
pRes
->
code
;
}
}
tscSetResRawPtr
(
pRes
,
pQueryInfo
);
tscSetResRawPtr
(
pRes
,
pQueryInfo
,
pRes
->
dataConverted
);
}
else
{
}
else
{
tscResetForNextRetrieve
(
pRes
);
tscResetForNextRetrieve
(
pRes
);
}
}
...
@@ -2807,7 +2807,7 @@ int tscProcessRetrieveRspFromNode(SSqlObj *pSql) {
...
@@ -2807,7 +2807,7 @@ int tscProcessRetrieveRspFromNode(SSqlObj *pSql) {
(
tscNonOrderedProjectionQueryOnSTable
(
pQueryInfo
,
0
)
&&
(
tscNonOrderedProjectionQueryOnSTable
(
pQueryInfo
,
0
)
&&
!
TSDB_QUERY_HAS_TYPE
(
pQueryInfo
->
type
,
TSDB_QUERY_TYPE_JOIN_QUERY
)
&&
!
TSDB_QUERY_HAS_TYPE
(
pQueryInfo
->
type
,
TSDB_QUERY_TYPE_JOIN_QUERY
)
&&
!
TSDB_QUERY_HAS_TYPE
(
pQueryInfo
->
type
,
TSDB_QUERY_TYPE_JOIN_SEC_STAGE
)))
{
!
TSDB_QUERY_HAS_TYPE
(
pQueryInfo
->
type
,
TSDB_QUERY_TYPE_JOIN_SEC_STAGE
)))
{
tscSetResRawPtr
(
pRes
,
pQueryInfo
);
tscSetResRawPtr
(
pRes
,
pQueryInfo
,
pRes
->
dataConverted
);
}
}
if
(
pSql
->
pSubscription
!=
NULL
)
{
if
(
pSql
->
pSubscription
!=
NULL
)
{
...
...
src/client/src/tscSubquery.c
浏览文件 @
2a8c5640
...
@@ -3448,6 +3448,8 @@ static void doBuildResFromSubqueries(SSqlObj* pSql) {
...
@@ -3448,6 +3448,8 @@ static void doBuildResFromSubqueries(SSqlObj* pSql) {
char
*
pData
=
getResultBlockPosition
(
pCmd1
,
pRes1
,
pIndex
->
columnIndex
,
&
bytes
);
char
*
pData
=
getResultBlockPosition
(
pCmd1
,
pRes1
,
pIndex
->
columnIndex
,
&
bytes
);
memcpy
(
data
,
pData
,
bytes
*
numOfRes
);
memcpy
(
data
,
pData
,
bytes
*
numOfRes
);
pRes
->
dataConverted
=
pRes1
->
dataConverted
;
data
+=
bytes
*
numOfRes
;
data
+=
bytes
*
numOfRes
;
}
}
...
@@ -3473,7 +3475,7 @@ static void doBuildResFromSubqueries(SSqlObj* pSql) {
...
@@ -3473,7 +3475,7 @@ static void doBuildResFromSubqueries(SSqlObj* pSql) {
doArithmeticCalculate
(
pQueryInfo
,
pFilePage
,
rowSize
,
finalRowSize
);
doArithmeticCalculate
(
pQueryInfo
,
pFilePage
,
rowSize
,
finalRowSize
);
pRes
->
data
=
pFilePage
->
data
;
pRes
->
data
=
pFilePage
->
data
;
tscSetResRawPtr
(
pRes
,
pQueryInfo
);
tscSetResRawPtr
(
pRes
,
pQueryInfo
,
pRes
->
dataConverted
);
}
}
void
tscBuildResFromSubqueries
(
SSqlObj
*
pSql
)
{
void
tscBuildResFromSubqueries
(
SSqlObj
*
pSql
)
{
...
...
src/client/src/tscUtil.c
浏览文件 @
2a8c5640
...
@@ -690,9 +690,13 @@ static void setResRawPtrImpl(SSqlRes* pRes, SInternalField* pInfo, int32_t i, bo
...
@@ -690,9 +690,13 @@ static void setResRawPtrImpl(SSqlRes* pRes, SInternalField* pInfo, int32_t i, bo
memcpy
(
pRes
->
urow
[
i
],
pRes
->
buffer
[
i
],
pInfo
->
field
.
bytes
*
pRes
->
numOfRows
);
memcpy
(
pRes
->
urow
[
i
],
pRes
->
buffer
[
i
],
pInfo
->
field
.
bytes
*
pRes
->
numOfRows
);
}
}
if
(
convertNchar
)
{
pRes
->
dataConverted
=
true
;
}
}
}
void
tscSetResRawPtr
(
SSqlRes
*
pRes
,
SQueryInfo
*
pQueryInfo
)
{
void
tscSetResRawPtr
(
SSqlRes
*
pRes
,
SQueryInfo
*
pQueryInfo
,
bool
converted
)
{
assert
(
pRes
->
numOfCols
>
0
);
assert
(
pRes
->
numOfCols
>
0
);
if
(
pRes
->
numOfRows
==
0
)
{
if
(
pRes
->
numOfRows
==
0
)
{
return
;
return
;
...
@@ -705,7 +709,7 @@ void tscSetResRawPtr(SSqlRes* pRes, SQueryInfo* pQueryInfo) {
...
@@ -705,7 +709,7 @@ void tscSetResRawPtr(SSqlRes* pRes, SQueryInfo* pQueryInfo) {
pRes
->
length
[
i
]
=
pInfo
->
field
.
bytes
;
pRes
->
length
[
i
]
=
pInfo
->
field
.
bytes
;
offset
+=
pInfo
->
field
.
bytes
;
offset
+=
pInfo
->
field
.
bytes
;
setResRawPtrImpl
(
pRes
,
pInfo
,
i
,
true
);
setResRawPtrImpl
(
pRes
,
pInfo
,
i
,
converted
?
false
:
true
);
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录