Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
98feeefd
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
98feeefd
编写于
5月 11, 2021
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix compile error
上级
420a8343
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
9 deletion
+9
-9
src/client/src/tscPrepare.c
src/client/src/tscPrepare.c
+5
-5
src/query/src/qTokenizer.c
src/query/src/qTokenizer.c
+4
-4
未找到文件。
src/client/src/tscPrepare.c
浏览文件 @
98feeefd
...
...
@@ -745,7 +745,7 @@ static int doBindBatchParam(STableDataBlocks* pBlock, SParamInfo* param, TAOS_MU
}
if
(
!
IS_VAR_DATA_TYPE
(
param
->
type
))
{
memcpy
(
data
+
param
->
offset
,
bind
->
buffer
+
bind
->
buffer_length
*
i
,
tDataTypes
[
param
->
type
].
bytes
);
memcpy
(
data
+
param
->
offset
,
(
char
*
)
bind
->
buffer
+
bind
->
buffer_length
*
i
,
tDataTypes
[
param
->
type
].
bytes
);
if
(
param
->
offset
==
0
)
{
if
(
tsCheckTimestamp
(
pBlock
,
data
+
param
->
offset
)
!=
TSDB_CODE_SUCCESS
)
{
...
...
@@ -759,7 +759,7 @@ static int doBindBatchParam(STableDataBlocks* pBlock, SParamInfo* param, TAOS_MU
return
TSDB_CODE_TSC_INVALID_VALUE
;
}
int16_t
bsize
=
(
short
)
bind
->
length
[
i
];
STR_WITH_SIZE_TO_VARSTR
(
data
+
param
->
offset
,
bind
->
buffer
+
bind
->
buffer_length
*
i
,
bsize
);
STR_WITH_SIZE_TO_VARSTR
(
data
+
param
->
offset
,
(
char
*
)
bind
->
buffer
+
bind
->
buffer_length
*
i
,
bsize
);
}
else
if
(
param
->
type
==
TSDB_DATA_TYPE_NCHAR
)
{
if
(
bind
->
length
[
i
]
>
(
uintptr_t
)
param
->
bytes
)
{
tscError
(
"nchar string length too long, ignore it, max:%d, actual:%d"
,
param
->
bytes
,
(
int32_t
)
bind
->
length
[
i
]);
...
...
@@ -767,8 +767,8 @@ static int doBindBatchParam(STableDataBlocks* pBlock, SParamInfo* param, TAOS_MU
}
int32_t
output
=
0
;
if
(
!
taosMbsToUcs4
(
bind
->
buffer
+
bind
->
buffer_length
*
i
,
bind
->
length
[
i
],
varDataVal
(
data
+
param
->
offset
),
param
->
bytes
-
VARSTR_HEADER_SIZE
,
&
output
))
{
tscError
(
"convert nchar string to UCS4_LE failed:%s"
,
(
char
*
)(
bind
->
buffer
+
bind
->
buffer_length
*
i
));
if
(
!
taosMbsToUcs4
(
(
char
*
)
bind
->
buffer
+
bind
->
buffer_length
*
i
,
bind
->
length
[
i
],
varDataVal
(
data
+
param
->
offset
),
param
->
bytes
-
VARSTR_HEADER_SIZE
,
&
output
))
{
tscError
(
"convert nchar string to UCS4_LE failed:%s"
,
(
char
*
)(
(
char
*
)
bind
->
buffer
+
bind
->
buffer_length
*
i
));
return
TSDB_CODE_TSC_INVALID_VALUE
;
}
...
...
@@ -1293,7 +1293,7 @@ int taos_stmt_set_tbname(TAOS_STMT* stmt, const char* name) {
return
TSDB_CODE_TSC_APP_ERROR
;
}
if
(
pStmt
->
last
==
STMT_INIT
&&
pStmt
->
last
==
STMT_BIND
&&
pStmt
->
last
==
STMT_BIND_COL
)
{
if
(
pStmt
->
last
==
STMT_INIT
||
pStmt
->
last
==
STMT_BIND
||
pStmt
->
last
==
STMT_BIND_COL
)
{
tscError
(
"0x%"
PRIx64
" settbname status error, last:%d"
,
pSql
->
self
,
pStmt
->
last
);
return
TSDB_CODE_TSC_APP_ERROR
;
}
...
...
src/query/src/qTokenizer.c
浏览文件 @
98feeefd
...
...
@@ -562,9 +562,9 @@ uint32_t tSQLGetToken(char* z, uint32_t* tokenId) {
SStrToken
tscReplaceStrToken
(
char
**
str
,
SStrToken
*
token
,
const
char
*
newToken
)
{
char
*
src
=
*
str
;
int32
_t
nsize
=
strlen
(
newToken
);
int32_t
size
=
strlen
(
*
str
)
-
token
->
n
+
nsize
+
1
;
int32_t
bsize
=
(
uint64_t
)
token
->
z
-
(
uint64_t
)
src
;
size
_t
nsize
=
strlen
(
newToken
);
int32_t
size
=
(
int32_t
)
strlen
(
*
str
)
-
token
->
n
+
(
int32_t
)
nsize
+
1
;
int32_t
bsize
=
(
int32_t
)((
uint64_t
)
token
->
z
-
(
uint64_t
)
src
)
;
SStrToken
ntoken
;
*
str
=
calloc
(
1
,
size
);
...
...
@@ -573,7 +573,7 @@ SStrToken tscReplaceStrToken(char **str, SStrToken *token, const char* newToken)
strcat
(
*
str
,
newToken
);
strcat
(
*
str
,
token
->
z
+
token
->
n
);
ntoken
.
n
=
nsize
;
ntoken
.
n
=
(
uint32_t
)
nsize
;
ntoken
.
z
=
*
str
+
bsize
;
tfree
(
src
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录