Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
ecd07ad9
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看板
提交
ecd07ad9
编写于
1月 10, 2020
作者:
L
lihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[modify for solving warn]
上级
d021d78a
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
35 addition
and
22 deletion
+35
-22
src/client/src/tscAst.c
src/client/src/tscAst.c
+1
-1
src/client/src/tscJoinProcess.c
src/client/src/tscJoinProcess.c
+3
-1
src/client/src/tscProfile.c
src/client/src/tscProfile.c
+3
-2
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+1
-1
src/client/src/tscSQLParserImpl.c
src/client/src/tscSQLParserImpl.c
+2
-2
src/client/src/tscSecondaryMerge.c
src/client/src/tscSecondaryMerge.c
+3
-1
src/client/src/tscServer.c
src/client/src/tscServer.c
+7
-2
src/client/src/tscStream.c
src/client/src/tscStream.c
+3
-3
src/os/linux/src/tsystem.c
src/os/linux/src/tsystem.c
+2
-1
src/rpc/src/tudp.c
src/rpc/src/tudp.c
+1
-1
src/system/detail/src/vnodeFile.c
src/system/detail/src/vnodeFile.c
+1
-1
src/util/src/tbase64.c
src/util/src/tbase64.c
+1
-1
src/util/src/textbuffer.c
src/util/src/textbuffer.c
+6
-4
src/util/src/ttypes.c
src/util/src/ttypes.c
+1
-1
未找到文件。
src/client/src/tscAst.c
浏览文件 @
ecd07ad9
...
@@ -833,7 +833,7 @@ void tSQLBinaryExprCalcTraverse(tSQLBinaryExpr *pExprs, int32_t numOfRows, char
...
@@ -833,7 +833,7 @@ void tSQLBinaryExprCalcTraverse(tSQLBinaryExpr *pExprs, int32_t numOfRows, char
tSQLSyntaxNode
*
pRight
=
pExprs
->
pRight
;
tSQLSyntaxNode
*
pRight
=
pExprs
->
pRight
;
/* the left output has result from the left child syntax tree */
/* the left output has result from the left child syntax tree */
char
*
pLeftOutput
=
malloc
(
sizeof
(
int64_t
)
*
numOfRows
);
char
*
pLeftOutput
=
(
char
*
)
malloc
(
sizeof
(
int64_t
)
*
numOfRows
);
if
(
pLeft
->
nodeType
==
TSQL_NODE_EXPR
)
{
if
(
pLeft
->
nodeType
==
TSQL_NODE_EXPR
)
{
tSQLBinaryExprCalcTraverse
(
pLeft
->
pExpr
,
numOfRows
,
pLeftOutput
,
param
,
order
,
getSourceDataBlock
);
tSQLBinaryExprCalcTraverse
(
pLeft
->
pExpr
,
numOfRows
,
pLeftOutput
,
param
,
order
,
getSourceDataBlock
);
}
}
...
...
src/client/src/tscJoinProcess.c
浏览文件 @
ecd07ad9
...
@@ -793,7 +793,9 @@ STSBuf* tsBufCreate(bool autoDelete) {
...
@@ -793,7 +793,9 @@ STSBuf* tsBufCreate(bool autoDelete) {
return
NULL
;
return
NULL
;
}
}
allocResForTSBuf
(
pTSBuf
);
if
(
NULL
==
allocResForTSBuf
(
pTSBuf
))
{
return
NULL
;
}
// update the header info
// update the header info
STSBufFileHeader
header
=
{.
magic
=
TS_COMP_FILE_MAGIC
,
.
numOfVnode
=
pTSBuf
->
numOfVnodes
,
.
tsOrder
=
TSQL_SO_ASC
};
STSBufFileHeader
header
=
{.
magic
=
TS_COMP_FILE_MAGIC
,
.
numOfVnode
=
pTSBuf
->
numOfVnodes
,
.
tsOrder
=
TSQL_SO_ASC
};
...
...
src/client/src/tscProfile.c
浏览文件 @
ecd07ad9
...
@@ -202,10 +202,10 @@ void tscKillStream(STscObj *pObj, uint32_t killId) {
...
@@ -202,10 +202,10 @@ void tscKillStream(STscObj *pObj, uint32_t killId) {
tscTrace
(
"%p stream:%p is killed, streamId:%d"
,
pStream
->
pSql
,
pStream
,
killId
);
tscTrace
(
"%p stream:%p is killed, streamId:%d"
,
pStream
->
pSql
,
pStream
,
killId
);
}
}
taos_close_stream
(
pStream
);
if
(
pStream
->
callback
)
{
if
(
pStream
->
callback
)
{
pStream
->
callback
(
pStream
->
param
);
pStream
->
callback
(
pStream
->
param
);
}
}
taos_close_stream
(
pStream
);
}
}
char
*
tscBuildQueryStreamDesc
(
char
*
pMsg
,
STscObj
*
pObj
)
{
char
*
tscBuildQueryStreamDesc
(
char
*
pMsg
,
STscObj
*
pObj
)
{
...
@@ -285,8 +285,9 @@ void tscKillConnection(STscObj *pObj) {
...
@@ -285,8 +285,9 @@ void tscKillConnection(STscObj *pObj) {
SSqlStream
*
pStream
=
pObj
->
streamList
;
SSqlStream
*
pStream
=
pObj
->
streamList
;
while
(
pStream
)
{
while
(
pStream
)
{
SSqlStream
*
tmp
=
pStream
->
next
;
taos_close_stream
(
pStream
);
taos_close_stream
(
pStream
);
pStream
=
pStream
->
next
;
pStream
=
tmp
;
}
}
pthread_mutex_unlock
(
&
pObj
->
mutex
);
pthread_mutex_unlock
(
&
pObj
->
mutex
);
...
...
src/client/src/tscSQLParser.c
浏览文件 @
ecd07ad9
...
@@ -2918,7 +2918,7 @@ static SColumnFilterInfo* addColumnFilterInfo(SColumnBase* pColumn) {
...
@@ -2918,7 +2918,7 @@ static SColumnFilterInfo* addColumnFilterInfo(SColumnBase* pColumn) {
}
}
int32_t
size
=
pColumn
->
numOfFilters
+
1
;
int32_t
size
=
pColumn
->
numOfFilters
+
1
;
char
*
tmp
=
realloc
(
pColumn
->
filterInfo
,
sizeof
(
SColumnFilterInfo
)
*
(
size
));
char
*
tmp
=
(
char
*
)
realloc
((
void
*
)(
pColumn
->
filterInfo
)
,
sizeof
(
SColumnFilterInfo
)
*
(
size
));
if
(
tmp
!=
NULL
)
{
if
(
tmp
!=
NULL
)
{
pColumn
->
filterInfo
=
(
SColumnFilterInfo
*
)
tmp
;
pColumn
->
filterInfo
=
(
SColumnFilterInfo
*
)
tmp
;
}
}
...
...
src/client/src/tscSQLParserImpl.c
浏览文件 @
ecd07ad9
...
@@ -706,14 +706,14 @@ void setDCLSQLElems(SSqlInfo *pInfo, int32_t type, int32_t nParam, ...) {
...
@@ -706,14 +706,14 @@ void setDCLSQLElems(SSqlInfo *pInfo, int32_t type, int32_t nParam, ...) {
pInfo
->
sqlType
=
type
;
pInfo
->
sqlType
=
type
;
if
(
nParam
==
0
)
return
;
if
(
nParam
==
0
)
return
;
if
(
pInfo
->
pDCLInfo
==
NULL
)
pInfo
->
pDCLInfo
=
calloc
(
1
,
sizeof
(
tDCLSQL
));
if
(
pInfo
->
pDCLInfo
==
NULL
)
pInfo
->
pDCLInfo
=
(
tDCLSQL
*
)
calloc
(
1
,
sizeof
(
tDCLSQL
));
va_list
va
;
va_list
va
;
va_start
(
va
,
nParam
);
va_start
(
va
,
nParam
);
while
(
nParam
--
>
0
)
{
while
(
nParam
--
>
0
)
{
SSQLToken
*
pToken
=
va_arg
(
va
,
SSQLToken
*
);
SSQLToken
*
pToken
=
va_arg
(
va
,
SSQLToken
*
);
tTokenListAppend
(
pInfo
->
pDCLInfo
,
pToken
);
(
void
)
tTokenListAppend
(
pInfo
->
pDCLInfo
,
pToken
);
}
}
va_end
(
va
);
va_end
(
va
);
}
}
...
...
src/client/src/tscSecondaryMerge.c
浏览文件 @
ecd07ad9
...
@@ -598,7 +598,9 @@ int32_t tscLocalReducerEnvCreate(SSqlObj *pSql, tExtMemBuffer ***pMemBuffer, tOr
...
@@ -598,7 +598,9 @@ int32_t tscLocalReducerEnvCreate(SSqlObj *pSql, tExtMemBuffer ***pMemBuffer, tOr
rlen
+=
pExpr
->
resBytes
;
rlen
+=
pExpr
->
resBytes
;
}
}
int32_t
capacity
=
nBufferSizes
/
rlen
;
int32_t
capacity
=
0
;
if
(
0
!=
rlen
)
capacity
=
nBufferSizes
/
rlen
;
pModel
=
tColModelCreate
(
pSchema
,
pCmd
->
fieldsInfo
.
numOfOutputCols
,
capacity
);
pModel
=
tColModelCreate
(
pSchema
,
pCmd
->
fieldsInfo
.
numOfOutputCols
,
capacity
);
for
(
int32_t
i
=
0
;
i
<
pMeterMetaInfo
->
pMetricMeta
->
numOfVnodes
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
pMeterMetaInfo
->
pMetricMeta
->
numOfVnodes
;
++
i
)
{
...
...
src/client/src/tscServer.c
浏览文件 @
ecd07ad9
...
@@ -1380,7 +1380,7 @@ void tscRetrieveDataRes(void *param, TAOS_RES *tres, int code) {
...
@@ -1380,7 +1380,7 @@ void tscRetrieveDataRes(void *param, TAOS_RES *tres, int code) {
SSqlObj
*
pNew
=
tscCreateSqlObjForSubquery
(
trsupport
->
pParentSqlObj
,
trsupport
,
pSql
);
SSqlObj
*
pNew
=
tscCreateSqlObjForSubquery
(
trsupport
->
pParentSqlObj
,
trsupport
,
pSql
);
if
(
pNew
==
NULL
)
{
if
(
pNew
==
NULL
)
{
tscError
(
"%p sub:%p failed to create new subquery due to out of memory, abort retry, vid:%d, orderOfSub:%d"
,
tscError
(
"%p sub:%p failed to create new subquery due to out of memory, abort retry, vid:%d, orderOfSub:%d"
,
trsupport
->
pParentSqlObj
,
pSql
,
pSvd
->
vnode
,
trsupport
->
subqueryIndex
);
trsupport
->
pParentSqlObj
,
pSql
,
pSvd
!=
NULL
?
pSvd
->
vnode
:
10000
,
trsupport
->
subqueryIndex
);
pState
->
code
=
-
TSDB_CODE_CLI_OUT_OF_MEMORY
;
pState
->
code
=
-
TSDB_CODE_CLI_OUT_OF_MEMORY
;
trsupport
->
numOfRetry
=
MAX_NUM_OF_SUBQUERY_RETRY
;
trsupport
->
numOfRetry
=
MAX_NUM_OF_SUBQUERY_RETRY
;
...
@@ -1404,9 +1404,14 @@ void tscRetrieveDataRes(void *param, TAOS_RES *tres, int code) {
...
@@ -1404,9 +1404,14 @@ void tscRetrieveDataRes(void *param, TAOS_RES *tres, int code) {
tscRetrieveFromVnodeCallBack
(
param
,
tres
,
pState
->
code
);
tscRetrieveFromVnodeCallBack
(
param
,
tres
,
pState
->
code
);
}
else
{
// success, proceed to retrieve data from dnode
}
else
{
// success, proceed to retrieve data from dnode
tscTrace
(
"%p sub:%p query complete,ip:%u,vid:%d,orderOfSub:%d,retrieve data"
,
trsupport
->
pParentSqlObj
,
pSql
,
if
(
vnodeInfo
!=
NULL
)
{
tscTrace
(
"%p sub:%p query complete,ip:%u,vid:%d,orderOfSub:%d,retrieve data"
,
trsupport
->
pParentSqlObj
,
pSql
,
vnodeInfo
->
vpeerDesc
[
vnodeInfo
->
index
].
ip
,
vnodeInfo
->
vpeerDesc
[
vnodeInfo
->
index
].
vnode
,
vnodeInfo
->
vpeerDesc
[
vnodeInfo
->
index
].
ip
,
vnodeInfo
->
vpeerDesc
[
vnodeInfo
->
index
].
vnode
,
trsupport
->
subqueryIndex
);
trsupport
->
subqueryIndex
);
}
else
{
tscTrace
(
"%p sub:%p query complete, orderOfSub:%d,retrieve data"
,
trsupport
->
pParentSqlObj
,
pSql
,
trsupport
->
subqueryIndex
);
}
taos_fetch_rows_a
(
tres
,
tscRetrieveFromVnodeCallBack
,
param
);
taos_fetch_rows_a
(
tres
,
tscRetrieveFromVnodeCallBack
,
param
);
}
}
...
...
src/client/src/tscStream.c
浏览文件 @
ecd07ad9
...
@@ -268,11 +268,11 @@ static void tscSetRetryTimer(SSqlStream *pStream, SSqlObj *pSql, int64_t timer)
...
@@ -268,11 +268,11 @@ static void tscSetRetryTimer(SSqlStream *pStream, SSqlObj *pSql, int64_t timer)
tscTrace
(
"%p stream:%p, etime:%"
PRId64
" is too old, exceeds the max retention time window:%"
PRId64
", stop the stream"
,
tscTrace
(
"%p stream:%p, etime:%"
PRId64
" is too old, exceeds the max retention time window:%"
PRId64
", stop the stream"
,
pStream
->
pSql
,
pStream
,
pStream
->
stime
,
pStream
->
etime
);
pStream
->
pSql
,
pStream
,
pStream
->
stime
,
pStream
->
etime
);
// TODO : How to terminate stream here
// TODO : How to terminate stream here
taos_close_stream
(
pStream
);
if
(
pStream
->
callback
)
{
if
(
pStream
->
callback
)
{
// Callback function from upper level
// Callback function from upper level
pStream
->
callback
(
pStream
->
param
);
pStream
->
callback
(
pStream
->
param
);
}
}
taos_close_stream
(
pStream
);
return
;
return
;
}
}
...
@@ -302,11 +302,11 @@ static void tscSetNextLaunchTimer(SSqlStream *pStream, SSqlObj *pSql) {
...
@@ -302,11 +302,11 @@ static void tscSetNextLaunchTimer(SSqlStream *pStream, SSqlObj *pSql) {
tscTrace
(
"%p stream:%p, stime:%"
PRId64
" is larger than end time: %"
PRId64
", stop the stream"
,
pStream
->
pSql
,
pStream
,
tscTrace
(
"%p stream:%p, stime:%"
PRId64
" is larger than end time: %"
PRId64
", stop the stream"
,
pStream
->
pSql
,
pStream
,
pStream
->
stime
,
pStream
->
etime
);
pStream
->
stime
,
pStream
->
etime
);
// TODO : How to terminate stream here
// TODO : How to terminate stream here
taos_close_stream
(
pStream
);
if
(
pStream
->
callback
)
{
if
(
pStream
->
callback
)
{
// Callback function from upper level
// Callback function from upper level
pStream
->
callback
(
pStream
->
param
);
pStream
->
callback
(
pStream
->
param
);
}
}
taos_close_stream
(
pStream
);
return
;
return
;
}
}
}
else
{
}
else
{
...
@@ -315,11 +315,11 @@ static void tscSetNextLaunchTimer(SSqlStream *pStream, SSqlObj *pSql) {
...
@@ -315,11 +315,11 @@ static void tscSetNextLaunchTimer(SSqlStream *pStream, SSqlObj *pSql) {
tscTrace
(
"%p stream:%p, stime:%ld is larger than end time: %ld, stop the stream"
,
pStream
->
pSql
,
pStream
,
tscTrace
(
"%p stream:%p, stime:%ld is larger than end time: %ld, stop the stream"
,
pStream
->
pSql
,
pStream
,
pStream
->
stime
,
pStream
->
etime
);
pStream
->
stime
,
pStream
->
etime
);
// TODO : How to terminate stream here
// TODO : How to terminate stream here
taos_close_stream
(
pStream
);
if
(
pStream
->
callback
)
{
if
(
pStream
->
callback
)
{
// Callback function from upper level
// Callback function from upper level
pStream
->
callback
(
pStream
->
param
);
pStream
->
callback
(
pStream
->
param
);
}
}
taos_close_stream
(
pStream
);
return
;
return
;
}
}
...
...
src/os/linux/src/tsystem.c
浏览文件 @
ecd07ad9
...
@@ -517,7 +517,8 @@ bool taosGetProcIO(float *readKB, float *writeKB) {
...
@@ -517,7 +517,8 @@ bool taosGetProcIO(float *readKB, float *writeKB) {
static
int64_t
lastReadbyte
=
-
1
;
static
int64_t
lastReadbyte
=
-
1
;
static
int64_t
lastWritebyte
=
-
1
;
static
int64_t
lastWritebyte
=
-
1
;
int64_t
curReadbyte
,
curWritebyte
;
int64_t
curReadbyte
=
0
;
int64_t
curWritebyte
=
0
;
if
(
!
taosReadProcIO
(
&
curReadbyte
,
&
curWritebyte
))
{
if
(
!
taosReadProcIO
(
&
curReadbyte
,
&
curWritebyte
))
{
return
false
;
return
false
;
...
...
src/rpc/src/tudp.c
浏览文件 @
ecd07ad9
...
@@ -703,7 +703,7 @@ int taosSendPacketViaTcp(uint32_t ip, uint16_t port, char *data, int dataLen, vo
...
@@ -703,7 +703,7 @@ int taosSendPacketViaTcp(uint32_t ip, uint16_t port, char *data, int dataLen, vo
pHead
->
msgLen
=
(
int32_t
)
htonl
(
msgLen
);
pHead
->
msgLen
=
(
int32_t
)
htonl
(
msgLen
);
code
=
taosSendUdpData
(
ip
,
port
,
buffer
,
msgLen
,
chandle
);
code
=
taosSendUdpData
(
ip
,
port
,
buffer
,
msgLen
,
chandle
);
pHead
=
(
STaosHeader
*
)
data
;
//
pHead = (STaosHeader *)data;
tinet_ntoa
(
ipstr
,
ip
);
tinet_ntoa
(
ipstr
,
ip
);
int
fd
=
taosOpenTcpClientSocket
(
ipstr
,
pConn
->
port
,
tsLocalIp
);
int
fd
=
taosOpenTcpClientSocket
(
ipstr
,
pConn
->
port
,
tsLocalIp
);
...
...
src/system/detail/src/vnodeFile.c
浏览文件 @
ecd07ad9
...
@@ -1383,7 +1383,7 @@ int vnodeSearchPointInFile(SMeterObj *pObj, SQuery *pQuery) {
...
@@ -1383,7 +1383,7 @@ int vnodeSearchPointInFile(SMeterObj *pObj, SQuery *pQuery) {
firstSlot
=
0
;
firstSlot
=
0
;
lastSlot
=
pQuery
->
numOfBlocks
-
1
;
lastSlot
=
pQuery
->
numOfBlocks
-
1
;
numOfBlocks
=
pQuery
->
numOfBlocks
;
//
numOfBlocks = pQuery->numOfBlocks;
if
(
QUERY_IS_ASC_QUERY
(
pQuery
)
&&
pBlock
[
lastSlot
].
keyLast
<
pQuery
->
skey
)
continue
;
if
(
QUERY_IS_ASC_QUERY
(
pQuery
)
&&
pBlock
[
lastSlot
].
keyLast
<
pQuery
->
skey
)
continue
;
if
(
!
QUERY_IS_ASC_QUERY
(
pQuery
)
&&
pBlock
[
firstSlot
].
keyFirst
>
pQuery
->
skey
)
continue
;
if
(
!
QUERY_IS_ASC_QUERY
(
pQuery
)
&&
pBlock
[
firstSlot
].
keyFirst
>
pQuery
->
skey
)
continue
;
...
...
src/util/src/tbase64.c
浏览文件 @
ecd07ad9
...
@@ -98,7 +98,7 @@ unsigned char *base64_decode(const char *value, int inlen, int *outlen) {
...
@@ -98,7 +98,7 @@ unsigned char *base64_decode(const char *value, int inlen, int *outlen) {
base64_decode_error:
base64_decode_error:
free
(
result
);
free
(
result
);
*
result
=
0
;
result
=
0
;
*
outlen
=
0
;
*
outlen
=
0
;
return
result
;
return
result
;
...
...
src/util/src/textbuffer.c
浏览文件 @
ecd07ad9
...
@@ -516,20 +516,20 @@ tMemBucket* tMemBucketCreate(int32_t totalSlots, int32_t nBufferSize, int16_t nE
...
@@ -516,20 +516,20 @@ tMemBucket* tMemBucketCreate(int32_t totalSlots, int32_t nBufferSize, int16_t nE
if
(
pDesc
->
pSchema
->
numOfCols
!=
1
||
pDesc
->
pSchema
->
colOffset
[
0
]
!=
0
)
{
if
(
pDesc
->
pSchema
->
numOfCols
!=
1
||
pDesc
->
pSchema
->
colOffset
[
0
]
!=
0
)
{
pError
(
"MemBucket:%p,only consecutive data is allowed,invalid numOfCols:%d or offset:%d"
,
pError
(
"MemBucket:%p,only consecutive data is allowed,invalid numOfCols:%d or offset:%d"
,
*
pBucket
,
pDesc
->
pSchema
->
numOfCols
,
pDesc
->
pSchema
->
colOffset
[
0
]);
pBucket
,
pDesc
->
pSchema
->
numOfCols
,
pDesc
->
pSchema
->
colOffset
[
0
]);
tfree
(
pBucket
);
tfree
(
pBucket
);
return
NULL
;
return
NULL
;
}
}
if
(
pDesc
->
pSchema
->
pFields
[
0
].
type
!=
dataType
)
{
if
(
pDesc
->
pSchema
->
pFields
[
0
].
type
!=
dataType
)
{
pError
(
"MemBucket:%p,data type is not consistent,%d in schema, %d in param"
,
*
pBucket
,
pError
(
"MemBucket:%p,data type is not consistent,%d in schema, %d in param"
,
pBucket
,
pDesc
->
pSchema
->
pFields
[
0
].
type
,
dataType
);
pDesc
->
pSchema
->
pFields
[
0
].
type
,
dataType
);
tfree
(
pBucket
);
tfree
(
pBucket
);
return
NULL
;
return
NULL
;
}
}
if
(
pBucket
->
numOfTotalPages
<
pBucket
->
nTotalSlots
)
{
if
(
pBucket
->
numOfTotalPages
<
pBucket
->
nTotalSlots
)
{
pWarn
(
"MemBucket:%p,total buffer pages %d are not enough for all slots"
,
*
pBucket
,
pBucket
->
numOfTotalPages
);
pWarn
(
"MemBucket:%p,total buffer pages %d are not enough for all slots"
,
pBucket
,
pBucket
->
numOfTotalPages
);
}
}
pBucket
->
pSegs
=
(
tMemBucketSegment
*
)
malloc
(
pBucket
->
numOfSegs
*
sizeof
(
tMemBucketSegment
));
pBucket
->
pSegs
=
(
tMemBucketSegment
*
)
malloc
(
pBucket
->
numOfSegs
*
sizeof
(
tMemBucketSegment
));
...
@@ -540,7 +540,7 @@ tMemBucket* tMemBucketCreate(int32_t totalSlots, int32_t nBufferSize, int16_t nE
...
@@ -540,7 +540,7 @@ tMemBucket* tMemBucketCreate(int32_t totalSlots, int32_t nBufferSize, int16_t nE
pBucket
->
pSegs
[
i
].
pBoundingEntries
=
NULL
;
pBucket
->
pSegs
[
i
].
pBoundingEntries
=
NULL
;
}
}
pTrace
(
"MemBucket:%p,created,buffer size:%d,elem size:%d"
,
*
pBucket
,
pBucket
->
numOfTotalPages
*
DEFAULT_PAGE_SIZE
,
pTrace
(
"MemBucket:%p,created,buffer size:%d,elem size:%d"
,
pBucket
,
pBucket
->
numOfTotalPages
*
DEFAULT_PAGE_SIZE
,
pBucket
->
nElemSize
);
pBucket
->
nElemSize
);
return
pBucket
;
return
pBucket
;
...
@@ -1258,6 +1258,7 @@ static tFilePage *loadIntoBucketFromDisk(tMemBucket *pMemBucket, int32_t segIdx,
...
@@ -1258,6 +1258,7 @@ static tFilePage *loadIntoBucketFromDisk(tMemBucket *pMemBucket, int32_t segIdx,
for
(
uint32_t
j
=
0
;
j
<
pFlushInfo
->
numOfPages
;
++
j
)
{
for
(
uint32_t
j
=
0
;
j
<
pFlushInfo
->
numOfPages
;
++
j
)
{
ret
=
fread
(
pPage
,
pMemBuffer
->
nPageSize
,
1
,
pMemBuffer
->
dataFile
);
ret
=
fread
(
pPage
,
pMemBuffer
->
nPageSize
,
1
,
pMemBuffer
->
dataFile
);
UNUSED
(
ret
);
assert
(
pPage
->
numOfElems
>
0
);
assert
(
pPage
->
numOfElems
>
0
);
tColModelAppend
(
pDesc
->
pSchema
,
buffer
,
pPage
->
data
,
0
,
pPage
->
numOfElems
,
pPage
->
numOfElems
);
tColModelAppend
(
pDesc
->
pSchema
,
buffer
,
pPage
->
data
,
0
,
pPage
->
numOfElems
,
pPage
->
numOfElems
);
...
@@ -1917,6 +1918,7 @@ double getPercentileImpl(tMemBucket *pMemBucket, int32_t count, double fraction)
...
@@ -1917,6 +1918,7 @@ double getPercentileImpl(tMemBucket *pMemBucket, int32_t count, double fraction)
for
(
uint32_t
jx
=
0
;
jx
<
pFlushInfo
->
numOfPages
;
++
jx
)
{
for
(
uint32_t
jx
=
0
;
jx
<
pFlushInfo
->
numOfPages
;
++
jx
)
{
ret
=
fread
(
pPage
,
pMemBuffer
->
nPageSize
,
1
,
pMemBuffer
->
dataFile
);
ret
=
fread
(
pPage
,
pMemBuffer
->
nPageSize
,
1
,
pMemBuffer
->
dataFile
);
UNUSED
(
ret
);
tMemBucketPut
(
pMemBucket
,
pPage
->
data
,
pPage
->
numOfElems
);
tMemBucketPut
(
pMemBucket
,
pPage
->
data
,
pPage
->
numOfElems
);
}
}
...
...
src/util/src/ttypes.c
浏览文件 @
ecd07ad9
...
@@ -726,7 +726,7 @@ int32_t tVariantDump(tVariant *pVariant, char *payload, char type) {
...
@@ -726,7 +726,7 @@ int32_t tVariantDump(tVariant *pVariant, char *payload, char type) {
*
((
int64_t
*
)
payload
)
=
TSDB_DATA_DOUBLE_NULL
;
*
((
int64_t
*
)
payload
)
=
TSDB_DATA_DOUBLE_NULL
;
return
0
;
return
0
;
}
else
{
}
else
{
double
value
;
double
value
=
0
;
int32_t
ret
;
int32_t
ret
;
ret
=
convertToDouble
(
pVariant
->
pz
,
pVariant
->
nLen
,
&
value
);
ret
=
convertToDouble
(
pVariant
->
pz
,
pVariant
->
nLen
,
&
value
);
if
((
errno
==
ERANGE
&&
value
==
-
1
)
||
(
ret
!=
0
))
{
if
((
errno
==
ERANGE
&&
value
==
-
1
)
||
(
ret
!=
0
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录