Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
3bc95502
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看板
提交
3bc95502
编写于
4月 13, 2022
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feature/qnode
上级
d04c0bc4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
58 addition
and
9 deletion
+58
-9
source/client/src/clientEnv.c
source/client/src/clientEnv.c
+1
-8
source/client/src/clientImpl.c
source/client/src/clientImpl.c
+7
-0
source/client/src/clientStmt.c
source/client/src/clientStmt.c
+49
-0
source/libs/nodes/src/nodesUtilFuncs.c
source/libs/nodes/src/nodesUtilFuncs.c
+1
-1
未找到文件。
source/client/src/clientEnv.c
浏览文件 @
3bc95502
...
...
@@ -189,14 +189,7 @@ void *createRequest(STscObj *pObj, __taos_async_fn_t fp, void *param, int32_t ty
tsem_init
(
&
pRequest
->
body
.
rspSem
,
0
,
0
);
registerRequest
(
pRequest
);
if
(
taosHashPut
(
pObj
->
pRequests
,
&
pRequest
->
self
,
sizeof
(
pRequest
->
self
),
&
pRequest
->
self
,
sizeof
(
pRequest
->
self
)))
{
destroyRequest
(
pRequest
);
releaseTscObj
(
pObj
->
id
);
terrno
=
TSDB_CODE_TSC_OUT_OF_MEMORY
;
return
NULL
;
}
return
pRequest
;
}
...
...
source/client/src/clientImpl.c
浏览文件 @
3bc95502
...
...
@@ -132,6 +132,13 @@ int32_t buildRequest(STscObj* pTscObj, const char* sql, int sqlLen, SRequestObj*
(
*
pRequest
)
->
sqlstr
[
sqlLen
]
=
0
;
(
*
pRequest
)
->
sqlLen
=
sqlLen
;
if
(
taosHashPut
(
pTscObj
->
pRequests
,
&
(
*
pRequest
)
->
self
,
sizeof
((
*
pRequest
)
->
self
),
&
(
*
pRequest
)
->
self
,
sizeof
((
*
pRequest
)
->
self
)))
{
destroyRequest
(
*
pRequest
);
*
pRequest
=
NULL
;
tscError
(
"put request to request hash failed"
);
return
TSDB_CODE_TSC_OUT_OF_MEMORY
;
}
tscDebugL
(
"0x%"
PRIx64
" SQL: %s, reqId:0x%"
PRIx64
,
(
*
pRequest
)
->
self
,
(
*
pRequest
)
->
sqlstr
,
(
*
pRequest
)
->
requestId
);
return
TSDB_CODE_SUCCESS
;
}
...
...
source/client/src/clientStmt.c
0 → 100644
浏览文件 @
3bc95502
#include "clientInt.h"
#include "clientLog.h"
#include "tdef.h"
TAOS_STMT
*
stmtInit
(
TAOS
*
taos
)
{
STscObj
*
pObj
=
(
STscObj
*
)
taos
;
STscStmt
*
pStmt
=
NULL
;
#if 0
pStmt = taosMemoryCalloc(1, sizeof(STscStmt));
if (pStmt == NULL) {
terrno = TSDB_CODE_TSC_OUT_OF_MEMORY;
tscError("failed to allocate memory for statement");
return NULL;
}
pStmt->taos = pObj;
SSqlObj* pSql = calloc(1, sizeof(SSqlObj));
if (pSql == NULL) {
free(pStmt);
terrno = TSDB_CODE_TSC_OUT_OF_MEMORY;
tscError("failed to allocate memory for statement");
return NULL;
}
if (TSDB_CODE_SUCCESS != tscAllocPayload(&pSql->cmd, TSDB_DEFAULT_PAYLOAD_SIZE)) {
free(pSql);
free(pStmt);
terrno = TSDB_CODE_TSC_OUT_OF_MEMORY;
tscError("failed to malloc payload buffer");
return NULL;
}
tsem_init(&pSql->rspSem, 0, 0);
pSql->signature = pSql;
pSql->pTscObj = pObj;
pSql->maxRetry = TSDB_MAX_REPLICA;
pStmt->pSql = pSql;
pStmt->last = STMT_INIT;
pStmt->numOfRows = 0;
registerSqlObj(pSql);
#endif
return
pStmt
;
}
source/libs/nodes/src/nodesUtilFuncs.c
浏览文件 @
3bc95502
...
...
@@ -1202,7 +1202,7 @@ void valueNodeToVariant(const SValueNode* pNode, SVariant* pVal) {
case
TSDB_DATA_TYPE_NCHAR
:
case
TSDB_DATA_TYPE_VARCHAR
:
case
TSDB_DATA_TYPE_VARBINARY
:
pVal
->
pz
=
pNode
->
datum
.
p
;
pVal
->
pz
=
pNode
->
datum
.
p
+
VARSTR_HEADER_SIZE
;
break
;
case
TSDB_DATA_TYPE_JSON
:
case
TSDB_DATA_TYPE_DECIMAL
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录