Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
36706459
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看板
提交
36706459
编写于
4月 15, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(driver): refactor c driver and remove redundant codes.
上级
d2761b41
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
10 addition
and
9 deletion
+10
-9
include/libs/parser/parser.h
include/libs/parser/parser.h
+1
-0
source/client/inc/clientInt.h
source/client/inc/clientInt.h
+3
-3
source/client/src/client.c
source/client/src/client.c
+0
-0
source/client/src/clientEnv.c
source/client/src/clientEnv.c
+5
-5
source/client/src/clientImpl.c
source/client/src/clientImpl.c
+1
-1
未找到文件。
include/libs/parser/parser.h
浏览文件 @
36706459
...
...
@@ -57,6 +57,7 @@ typedef struct SQuery {
SNode
*
pRoot
;
int32_t
numOfResCols
;
SSchema
*
pResSchema
;
int8_t
precision
;
SCmdMsgInfo
*
pCmdMsg
;
int32_t
msgType
;
SArray
*
pDbList
;
...
...
source/client/inc/clientInt.h
浏览文件 @
36706459
...
...
@@ -204,11 +204,11 @@ typedef struct SRequestObj {
uint64_t
requestId
;
int32_t
type
;
// request type
STscObj
*
pTscObj
;
char
*
pDb
;
char
*
pDb
;
// current database string
char
*
sqlstr
;
// sql string
int32_t
sqlLen
;
int64_t
self
;
char
*
msgBuf
;
char
*
msgBuf
;
// error msg buffer
int32_t
code
;
SArray
*
dbList
;
SArray
*
tableList
;
...
...
@@ -276,8 +276,8 @@ int32_t buildRequest(STscObj* pTscObj, const char* sql, int sqlLen, SRequestObj*
void
*
doFetchRows
(
SRequestObj
*
pRequest
,
bool
setupOneRowPtr
,
bool
convertUcs4
);
void
doSetOneRowPtr
(
SReqResultInfo
*
pResultInfo
);
int32_t
setResultDataPtr
(
SReqResultInfo
*
pResultInfo
,
TAOS_FIELD
*
pFields
,
int32_t
numOfCols
,
int32_t
numOfRows
,
bool
convertUcs4
);
void
setResSchemaInfo
(
SReqResultInfo
*
pResInfo
,
const
SSchema
*
pSchema
,
int32_t
numOfCols
);
void
setResPrecision
(
SReqResultInfo
*
pResInfo
,
int32_t
precision
);
int32_t
setQueryResultFromRsp
(
SReqResultInfo
*
pResultInfo
,
const
SRetrieveTableRsp
*
pRsp
,
bool
convertUcs4
);
// --- heartbeat
...
...
source/client/src/client.c
已删除
100644 → 0
浏览文件 @
d2761b41
source/client/src/clientEnv.c
浏览文件 @
36706459
...
...
@@ -27,10 +27,10 @@
#include "ttime.h"
#define TSC_VAR_NOT_RELEASE 1
#define TSC_VAR_RELEASED 0
#define TSC_VAR_RELEASED
0
SAppInfo
appInfo
;
int32_t
clientReqRefPool
=
-
1
;
int32_t
clientReqRefPool
=
-
1
;
int32_t
clientConnRefPool
=
-
1
;
static
TdThreadOnce
tscinit
=
PTHREAD_ONCE_INIT
;
...
...
@@ -48,8 +48,8 @@ static void registerRequest(SRequestObj *pRequest) {
if
(
pTscObj
->
pAppInfo
)
{
SInstanceSummary
*
pSummary
=
&
pTscObj
->
pAppInfo
->
summary
;
int32_t
total
=
atomic_add_fetch_64
(
&
pSummary
->
totalRequests
,
1
);
int32_t
currentInst
=
atomic_add_fetch_64
(
&
pSummary
->
currentRequests
,
1
);
int32_t
total
=
atomic_add_fetch_64
(
(
int64_t
*
)
&
pSummary
->
totalRequests
,
1
);
int32_t
currentInst
=
atomic_add_fetch_64
(
(
int64_t
*
)
&
pSummary
->
currentRequests
,
1
);
tscDebug
(
"0x%"
PRIx64
" new Request from connObj:0x%"
PRIx64
", current:%d, app current:%d, total:%d, reqId:0x%"
PRIx64
,
pRequest
->
self
,
pRequest
->
pTscObj
->
id
,
num
,
currentInst
,
total
,
pRequest
->
requestId
);
...
...
@@ -62,7 +62,7 @@ static void deregisterRequest(SRequestObj *pRequest) {
STscObj
*
pTscObj
=
pRequest
->
pTscObj
;
SInstanceSummary
*
pActivity
=
&
pTscObj
->
pAppInfo
->
summary
;
int32_t
currentInst
=
atomic_sub_fetch_64
(
&
pActivity
->
currentRequests
,
1
);
int32_t
currentInst
=
atomic_sub_fetch_64
(
(
int64_t
*
)
&
pActivity
->
currentRequests
,
1
);
int32_t
num
=
atomic_sub_fetch_32
(
&
pTscObj
->
numOfReqs
,
1
);
int64_t
duration
=
taosGetTimestampUs
()
-
pRequest
->
metric
.
start
;
...
...
source/client/src/clientImpl.c
浏览文件 @
36706459
...
...
@@ -229,7 +229,7 @@ int32_t getPlan(SRequestObj* pRequest, SQuery* pQuery, SQueryPlan** pPlan, SArra
}
void
setResSchemaInfo
(
SReqResultInfo
*
pResInfo
,
const
SSchema
*
pSchema
,
int32_t
numOfCols
)
{
assert
(
pSchema
!=
NULL
&&
numOfCols
>
0
);
ASSERT
(
pSchema
!=
NULL
&&
numOfCols
>
0
);
pResInfo
->
numOfCols
=
numOfCols
;
pResInfo
->
fields
=
taosMemoryCalloc
(
numOfCols
,
sizeof
(
TAOS_FIELD
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录