Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
5e40ac37
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看板
提交
5e40ac37
编写于
6月 05, 2021
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add error msg
上级
61b39d7e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
17 deletion
+17
-17
src/client/src/tscPrepare.c
src/client/src/tscPrepare.c
+12
-12
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+5
-5
未找到文件。
src/client/src/tscPrepare.c
浏览文件 @
5e40ac37
...
...
@@ -1667,12 +1667,12 @@ int taos_stmt_bind_param(TAOS_STMT* stmt, TAOS_BIND* bind) {
if
(
pStmt
->
multiTbInsert
)
{
if
(
pStmt
->
last
!=
STMT_SETTBNAME
&&
pStmt
->
last
!=
STMT_ADD_BATCH
)
{
tscError
(
"0x%"
PRIx64
" bind param status error, last:%d"
,
pStmt
->
pSql
->
self
,
pStmt
->
last
);
return
TSDB_CODE_TSC_APP_ERROR
;
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
&
pStmt
->
pSql
->
cmd
),
"bind param status error"
)
;
}
}
else
{
if
(
pStmt
->
last
!=
STMT_PREPARE
&&
pStmt
->
last
!=
STMT_ADD_BATCH
&&
pStmt
->
last
!=
STMT_EXECUTE
)
{
tscError
(
"0x%"
PRIx64
" bind param status error, last:%d"
,
pStmt
->
pSql
->
self
,
pStmt
->
last
);
return
TSDB_CODE_TSC_APP_ERROR
;
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
&
pStmt
->
pSql
->
cmd
),
"bind param status error"
)
;
}
}
...
...
@@ -1695,23 +1695,23 @@ int taos_stmt_bind_param_batch(TAOS_STMT* stmt, TAOS_MULTI_BIND* bind) {
if
(
bind
==
NULL
||
bind
->
num
<=
0
||
bind
->
num
>
INT16_MAX
)
{
tscError
(
"0x%"
PRIx64
" invalid parameter"
,
pStmt
->
pSql
->
self
);
return
TSDB_CODE_TSC_APP_ERROR
;
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
&
pStmt
->
pSql
->
cmd
),
"invalid bind param"
)
;
}
if
(
!
pStmt
->
isInsert
)
{
tscError
(
"0x%"
PRIx64
" not or invalid batch insert"
,
pStmt
->
pSql
->
self
);
return
TSDB_CODE_TSC_APP_ERROR
;
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
&
pStmt
->
pSql
->
cmd
),
"not or invalid batch insert"
)
;
}
if
(
pStmt
->
multiTbInsert
)
{
if
(
pStmt
->
last
!=
STMT_SETTBNAME
&&
pStmt
->
last
!=
STMT_ADD_BATCH
)
{
tscError
(
"0x%"
PRIx64
" bind param status error, last:%d"
,
pStmt
->
pSql
->
self
,
pStmt
->
last
);
return
TSDB_CODE_TSC_APP_ERROR
;
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
&
pStmt
->
pSql
->
cmd
),
"bind param status error"
)
;
}
}
else
{
if
(
pStmt
->
last
!=
STMT_PREPARE
&&
pStmt
->
last
!=
STMT_ADD_BATCH
&&
pStmt
->
last
!=
STMT_EXECUTE
)
{
tscError
(
"0x%"
PRIx64
" bind param status error, last:%d"
,
pStmt
->
pSql
->
self
,
pStmt
->
last
);
return
TSDB_CODE_TSC_APP_ERROR
;
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
&
pStmt
->
pSql
->
cmd
),
"bind param status error"
)
;
}
}
...
...
@@ -1729,23 +1729,23 @@ int taos_stmt_bind_single_param_batch(TAOS_STMT* stmt, TAOS_MULTI_BIND* bind, in
if
(
bind
==
NULL
||
bind
->
num
<=
0
||
bind
->
num
>
INT16_MAX
)
{
tscError
(
"0x%"
PRIx64
" invalid parameter"
,
pStmt
->
pSql
->
self
);
return
TSDB_CODE_TSC_APP_ERROR
;
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
&
pStmt
->
pSql
->
cmd
),
"invalid bind param"
)
;
}
if
(
!
pStmt
->
isInsert
)
{
tscError
(
"0x%"
PRIx64
" not or invalid batch insert"
,
pStmt
->
pSql
->
self
);
return
TSDB_CODE_TSC_APP_ERROR
;
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
&
pStmt
->
pSql
->
cmd
),
"not or invalid batch insert"
)
;
}
if
(
pStmt
->
multiTbInsert
)
{
if
(
pStmt
->
last
!=
STMT_SETTBNAME
&&
pStmt
->
last
!=
STMT_ADD_BATCH
&&
pStmt
->
last
!=
STMT_BIND_COL
)
{
tscError
(
"0x%"
PRIx64
" bind param status error, last:%d"
,
pStmt
->
pSql
->
self
,
pStmt
->
last
);
return
TSDB_CODE_TSC_APP_ERROR
;
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
&
pStmt
->
pSql
->
cmd
),
"bind param status error"
)
;
}
}
else
{
if
(
pStmt
->
last
!=
STMT_PREPARE
&&
pStmt
->
last
!=
STMT_ADD_BATCH
&&
pStmt
->
last
!=
STMT_BIND_COL
&&
pStmt
->
last
!=
STMT_EXECUTE
)
{
tscError
(
"0x%"
PRIx64
" bind param status error, last:%d"
,
pStmt
->
pSql
->
self
,
pStmt
->
last
);
return
TSDB_CODE_TSC_APP_ERROR
;
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
&
pStmt
->
pSql
->
cmd
),
"bind param status error"
)
;
}
}
...
...
@@ -1766,7 +1766,7 @@ int taos_stmt_add_batch(TAOS_STMT* stmt) {
if
(
pStmt
->
isInsert
)
{
if
(
pStmt
->
last
!=
STMT_BIND
&&
pStmt
->
last
!=
STMT_BIND_COL
)
{
tscError
(
"0x%"
PRIx64
" add batch status error, last:%d"
,
pStmt
->
pSql
->
self
,
pStmt
->
last
);
return
TSDB_CODE_TSC_APP_ERROR
;
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
&
pStmt
->
pSql
->
cmd
),
"add batch status error"
)
;
}
pStmt
->
last
=
STMT_ADD_BATCH
;
...
...
@@ -1796,7 +1796,7 @@ int taos_stmt_execute(TAOS_STMT* stmt) {
if
(
pStmt
->
isInsert
)
{
if
(
pStmt
->
last
!=
STMT_ADD_BATCH
)
{
tscError
(
"0x%"
PRIx64
" exec status error, last:%d"
,
pStmt
->
pSql
->
self
,
pStmt
->
last
);
return
TSDB_CODE_TSC_APP_ERROR
;
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
&
pStmt
->
pSql
->
cmd
),
"exec status error"
)
;
}
pStmt
->
last
=
STMT_EXECUTE
;
...
...
src/query/src/qExecutor.c
浏览文件 @
5e40ac37
...
...
@@ -4096,15 +4096,13 @@ static SFillColInfo* createFillColInfo(SExprInfo* pExpr, int32_t numOfOutput, in
return
pFillCol
;
}
int32_t
doInitQInfo
(
SQInfo
*
pQInfo
,
STSBuf
*
pTsBuf
,
SArray
*
prevResult
,
void
*
tsdb
,
void
*
sourceOptr
,
int32_t
tbScanner
,
int32_t
doInitQInfo
(
SQInfo
*
pQInfo
,
STSBuf
*
pTsBuf
,
void
*
tsdb
,
void
*
sourceOptr
,
int32_t
tbScanner
,
SArray
*
pOperator
,
void
*
param
)
{
SQueryRuntimeEnv
*
pRuntimeEnv
=
&
pQInfo
->
runtimeEnv
;
SQueryAttr
*
pQueryAttr
=
pQInfo
->
runtimeEnv
.
pQueryAttr
;
pQueryAttr
->
tsdb
=
tsdb
;
pRuntimeEnv
->
prevResult
=
prevResult
;
if
(
tsdb
!=
NULL
)
{
int32_t
code
=
setupQueryHandle
(
tsdb
,
pRuntimeEnv
,
pQInfo
->
qId
,
pQueryAttr
->
stableQuery
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
...
...
@@ -7254,7 +7252,9 @@ int32_t initQInfo(STsBufInfo* pTsBufInfo, void* tsdb, void* sourceOptr, SQInfo*
SArray
*
prevResult
=
NULL
;
if
(
prevResultLen
>
0
)
{
prevResult
=
interResFromBinary
(
param
->
prevResult
,
prevResultLen
);
prevResult
=
interResFromBinary
(
param
->
prevResult
,
prevResultLen
);
pRuntimeEnv
->
prevResult
=
prevResult
;
}
if
(
tsdb
!=
NULL
)
{
...
...
@@ -7278,7 +7278,7 @@ int32_t initQInfo(STsBufInfo* pTsBufInfo, void* tsdb, void* sourceOptr, SQInfo*
}
// filter the qualified
if
((
code
=
doInitQInfo
(
pQInfo
,
pTsBuf
,
prevResult
,
tsdb
,
sourceOptr
,
param
->
tableScanOperator
,
param
->
pOperator
,
merger
))
!=
TSDB_CODE_SUCCESS
)
{
if
((
code
=
doInitQInfo
(
pQInfo
,
pTsBuf
,
tsdb
,
sourceOptr
,
param
->
tableScanOperator
,
param
->
pOperator
,
merger
))
!=
TSDB_CODE_SUCCESS
)
{
goto
_error
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录