Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
820bf89a
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
820bf89a
编写于
10月 21, 2020
作者:
B
Bomin Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-1471: use new error code when qhandle is null
上级
e491a890
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
6 deletion
+8
-6
src/client/src/tscSql.c
src/client/src/tscSql.c
+2
-5
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+3
-0
src/vnode/src/vnodeRead.c
src/vnode/src/vnodeRead.c
+3
-1
未找到文件。
src/client/src/tscSql.c
浏览文件 @
820bf89a
...
@@ -479,11 +479,8 @@ TAOS_ROW taos_fetch_row(TAOS_RES *res) {
...
@@ -479,11 +479,8 @@ TAOS_ROW taos_fetch_row(TAOS_RES *res) {
SSqlCmd
*
pCmd
=
&
pSql
->
cmd
;
SSqlCmd
*
pCmd
=
&
pSql
->
cmd
;
SSqlRes
*
pRes
=
&
pSql
->
res
;
SSqlRes
*
pRes
=
&
pSql
->
res
;
if
(
pRes
->
qhandle
==
0
)
{
if
(
pRes
->
qhandle
==
0
||
pRes
->
code
=
TSDB_CODE_TSC_INVALID_QHANDLE
;
pRes
->
code
==
TSDB_CODE_TSC_QUERY_CANCELLED
||
return
NULL
;
}
if
(
pRes
->
code
==
TSDB_CODE_TSC_QUERY_CANCELLED
||
pCmd
->
command
==
TSDB_SQL_RETRIEVE_EMPTY_RESULT
||
pCmd
->
command
==
TSDB_SQL_RETRIEVE_EMPTY_RESULT
||
pCmd
->
command
==
TSDB_SQL_INSERT
)
{
pCmd
->
command
==
TSDB_SQL_INSERT
)
{
return
NULL
;
return
NULL
;
...
...
src/query/src/qExecutor.c
浏览文件 @
820bf89a
...
@@ -7101,6 +7101,7 @@ void qCleanupQueryMgmt(void* pQMgmt) {
...
@@ -7101,6 +7101,7 @@ void qCleanupQueryMgmt(void* pQMgmt) {
void
**
qRegisterQInfo
(
void
*
pMgmt
,
uint64_t
qInfo
)
{
void
**
qRegisterQInfo
(
void
*
pMgmt
,
uint64_t
qInfo
)
{
if
(
pMgmt
==
NULL
)
{
if
(
pMgmt
==
NULL
)
{
terrno
=
TSDB_CODE_VND_INVALID_VGROUP_ID
;
return
NULL
;
return
NULL
;
}
}
...
@@ -7109,6 +7110,7 @@ void** qRegisterQInfo(void* pMgmt, uint64_t qInfo) {
...
@@ -7109,6 +7110,7 @@ void** qRegisterQInfo(void* pMgmt, uint64_t qInfo) {
SQueryMgmt
*
pQueryMgmt
=
pMgmt
;
SQueryMgmt
*
pQueryMgmt
=
pMgmt
;
if
(
pQueryMgmt
->
qinfoPool
==
NULL
)
{
if
(
pQueryMgmt
->
qinfoPool
==
NULL
)
{
qError
(
"QInfo:%p failed to add qhandle into qMgmt, since qMgmt is closed"
,
(
void
*
)
qInfo
);
qError
(
"QInfo:%p failed to add qhandle into qMgmt, since qMgmt is closed"
,
(
void
*
)
qInfo
);
terrno
=
TSDB_CODE_VND_INVALID_VGROUP_ID
;
return
NULL
;
return
NULL
;
}
}
...
@@ -7116,6 +7118,7 @@ void** qRegisterQInfo(void* pMgmt, uint64_t qInfo) {
...
@@ -7116,6 +7118,7 @@ void** qRegisterQInfo(void* pMgmt, uint64_t qInfo) {
if
(
pQueryMgmt
->
closed
)
{
if
(
pQueryMgmt
->
closed
)
{
// pthread_mutex_unlock(&pQueryMgmt->lock);
// pthread_mutex_unlock(&pQueryMgmt->lock);
qError
(
"QInfo:%p failed to add qhandle into cache, since qMgmt is colsing"
,
(
void
*
)
qInfo
);
qError
(
"QInfo:%p failed to add qhandle into cache, since qMgmt is colsing"
,
(
void
*
)
qInfo
);
terrno
=
TSDB_CODE_VND_INVALID_VGROUP_ID
;
return
NULL
;
return
NULL
;
}
else
{
}
else
{
TSDB_CACHE_PTR_TYPE
handleVal
=
(
TSDB_CACHE_PTR_TYPE
)
qInfo
;
TSDB_CACHE_PTR_TYPE
handleVal
=
(
TSDB_CACHE_PTR_TYPE
)
qInfo
;
...
...
src/vnode/src/vnodeRead.c
浏览文件 @
820bf89a
...
@@ -166,10 +166,12 @@ static int32_t vnodeProcessQueryMsg(SVnodeObj *pVnode, SReadMsg *pReadMsg) {
...
@@ -166,10 +166,12 @@ static int32_t vnodeProcessQueryMsg(SVnodeObj *pVnode, SReadMsg *pReadMsg) {
if
(
code
==
TSDB_CODE_SUCCESS
)
{
if
(
code
==
TSDB_CODE_SUCCESS
)
{
handle
=
qRegisterQInfo
(
pVnode
->
qMgmt
,
(
uint64_t
)
pQInfo
);
handle
=
qRegisterQInfo
(
pVnode
->
qMgmt
,
(
uint64_t
)
pQInfo
);
if
(
handle
==
NULL
)
{
// failed to register qhandle, todo add error test case
if
(
handle
==
NULL
)
{
// failed to register qhandle, todo add error test case
pRsp
->
code
=
terrno
;
terrno
=
0
;
vError
(
"vgId:%d QInfo:%p register qhandle failed, return to app, code:%s"
,
pVnode
->
vgId
,
(
void
*
)
pQInfo
,
vError
(
"vgId:%d QInfo:%p register qhandle failed, return to app, code:%s"
,
pVnode
->
vgId
,
(
void
*
)
pQInfo
,
tstrerror
(
pRsp
->
code
));
tstrerror
(
pRsp
->
code
));
pRsp
->
code
=
TSDB_CODE_QRY_INVALID_QHANDLE
;
qDestroyQueryInfo
(
pQInfo
);
// destroy it directly
qDestroyQueryInfo
(
pQInfo
);
// destroy it directly
return
pRsp
->
code
;
}
else
{
}
else
{
assert
(
*
handle
==
pQInfo
);
assert
(
*
handle
==
pQInfo
);
pRsp
->
qhandle
=
htobe64
((
uint64_t
)
pQInfo
);
pRsp
->
qhandle
=
htobe64
((
uint64_t
)
pQInfo
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录