Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
c12fb22e
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看板
提交
c12fb22e
编写于
12月 09, 2019
作者:
H
hjxilinx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
suppress compile warnings
上级
9794fe6c
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
46 addition
and
53 deletion
+46
-53
src/client/inc/tsclient.h
src/client/inc/tsclient.h
+3
-3
src/client/src/tscFunctionImpl.c
src/client/src/tscFunctionImpl.c
+1
-1
src/client/src/tscJoinProcess.c
src/client/src/tscJoinProcess.c
+6
-6
src/client/src/tscLocal.c
src/client/src/tscLocal.c
+2
-2
src/client/src/tscProfile.c
src/client/src/tscProfile.c
+2
-2
src/client/src/tscServer.c
src/client/src/tscServer.c
+2
-2
src/client/src/tscSql.c
src/client/src/tscSql.c
+3
-3
src/client/src/tscStream.c
src/client/src/tscStream.c
+15
-15
src/client/src/tscSub.c
src/client/src/tscSub.c
+1
-1
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+2
-1
src/inc/taosmsg.h
src/inc/taosmsg.h
+1
-1
src/inc/tutil.h
src/inc/tutil.h
+1
-1
src/os/linux/inc/os.h
src/os/linux/inc/os.h
+1
-0
src/util/src/textbuffer.c
src/util/src/textbuffer.c
+0
-1
src/util/src/thistogram.c
src/util/src/thistogram.c
+0
-1
src/util/src/tskiplist.c
src/util/src/tskiplist.c
+1
-5
src/util/src/tstrbuild.c
src/util/src/tstrbuild.c
+0
-1
src/util/src/ttimer.c
src/util/src/ttimer.c
+0
-1
src/util/src/ttokenizer.c
src/util/src/ttokenizer.c
+4
-4
src/util/src/ttypes.c
src/util/src/ttypes.c
+0
-1
src/util/src/tutil.c
src/util/src/tutil.c
+1
-1
未找到文件。
src/client/inc/tsclient.h
浏览文件 @
c12fb22e
...
...
@@ -274,7 +274,7 @@ typedef struct {
int8_t
isInsertFromFile
;
// load data from file or not
bool
import
;
// import/insert type
char
msgType
;
uint8_t
msgType
;
uint16_t
type
;
// query type
char
intervalTimeUnit
;
int64_t
etime
,
stime
;
...
...
@@ -378,14 +378,14 @@ typedef struct _sql_obj {
char
*
sqlstr
;
char
retry
;
char
maxRetry
;
char
index
;
uint8_t
index
;
char
freed
:
4
;
char
listed
:
4
;
tsem_t
rspSem
;
tsem_t
emptyRspSem
;
SSqlCmd
cmd
;
SSqlRes
res
;
char
numOfSubs
;
uint8_t
numOfSubs
;
struct
_sql_obj
**
pSubs
;
struct
_sql_obj
*
prev
,
*
next
;
}
SSqlObj
;
...
...
src/client/src/tscFunctionImpl.c
浏览文件 @
c12fb22e
...
...
@@ -1668,7 +1668,7 @@ static void last_data_assign_impl(SQLFunctionCtx *pCtx, char *pData, int32_t ind
if
(
pInfo
->
hasResult
!=
DATA_SET_FLAG
||
pInfo
->
ts
<
timestamp
[
index
])
{
#if defined(_DEBUG_VIEW)
pTrace
(
"assign index:%d, ts:%
lld
, val:%d, "
,
index
,
timestamp
[
index
],
*
(
int32_t
*
)
pData
);
pTrace
(
"assign index:%d, ts:%
"
PRId64
"
, val:%d, "
,
index
,
timestamp
[
index
],
*
(
int32_t
*
)
pData
);
#endif
memcpy
(
pCtx
->
aOutputBuf
,
pData
,
pCtx
->
inputBytes
);
...
...
src/client/src/tscJoinProcess.c
浏览文件 @
c12fb22e
...
...
@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "tscJoinProcess.h"
#include "os.h"
#include "tscJoinProcess.h"
#include "tcache.h"
#include "tscUtil.h"
#include "tsclient.h"
...
...
@@ -88,7 +88,7 @@ static int64_t doTSBlockIntersect(SSqlObj* pSql, SJoinSubquerySupporter* pSuppor
#ifdef _DEBUG_VIEW
// for debug purpose
tscPrint
(
"%
lld, tags:%d
\t
%lld
, tags:%d"
,
elem1
.
ts
,
elem1
.
tag
,
elem2
.
ts
,
elem2
.
tag
);
tscPrint
(
"%
"
PRId64
", tags:%d
\t
%"
PRId64
"
, tags:%d"
,
elem1
.
ts
,
elem1
.
tag
,
elem2
.
ts
,
elem2
.
tag
);
#endif
if
(
elem1
.
tag
<
elem2
.
tag
||
(
elem1
.
tag
==
elem2
.
tag
&&
doCompare
(
order
,
elem1
.
ts
,
elem2
.
ts
)))
{
...
...
@@ -150,7 +150,7 @@ static int64_t doTSBlockIntersect(SSqlObj* pSql, SJoinSubquerySupporter* pSuppor
tsBufDestory
(
pSupporter1
->
pTSBuf
);
tsBufDestory
(
pSupporter2
->
pTSBuf
);
tscTrace
(
"%p input1:%
lld, input2:%lld, final:%lld
for secondary query after ts blocks intersecting"
,
pSql
,
tscTrace
(
"%p input1:%
"
PRId64
", input2:%"
PRId64
", final:%"
PRId64
"
for secondary query after ts blocks intersecting"
,
pSql
,
numOfInput1
,
numOfInput2
,
output1
->
numOfTotal
);
return
output1
->
numOfTotal
;
...
...
@@ -528,8 +528,8 @@ void tscFetchDatablockFromSubquery(SSqlObj* pSql) {
numOfFetch
++
;
}
}
else
{
if
((
pRes
->
row
>=
pRes
->
numOfRows
&&
(
!
tscHasReachLimitation
(
pSql
->
pSubs
[
i
]))
&&
tscProjectionQueryOnTable
(
pSql
))
||
(
pRes
->
numOfRows
==
0
))
{
if
((
pRes
->
row
>=
pRes
->
numOfRows
&&
(
!
tscHasReachLimitation
(
pSql
->
pSubs
[
i
]))
&&
tscProjectionQueryOnTable
(
&
pSql
->
cmd
))
||
(
pRes
->
numOfRows
==
0
))
{
numOfFetch
++
;
}
}
...
...
@@ -1619,7 +1619,7 @@ void tsBufDisplay(STSBuf* pTSBuf) {
while
(
tsBufNextPos
(
pTSBuf
))
{
STSElem
elem
=
tsBufGetElem
(
pTSBuf
);
printf
(
"%d-%
lld-%lld
\n
"
,
elem
.
vnode
,
elem
.
tag
,
elem
.
ts
);
printf
(
"%d-%
"
PRId64
"-%"
PRId64
"
\n
"
,
elem
.
vnode
,
*
(
int64_t
*
)
elem
.
tag
,
elem
.
ts
);
}
pTSBuf
->
cur
.
order
=
old
;
...
...
src/client/src/tscLocal.c
浏览文件 @
c12fb22e
...
...
@@ -64,7 +64,7 @@ static int32_t getToStringLength(const char *pData, int32_t length, int32_t type
}
break
;
case
TSDB_DATA_TYPE_TIMESTAMP
:
case
TSDB_DATA_TYPE_BIGINT
:
len
=
sprintf
(
buf
,
"%
lld
"
,
*
(
int64_t
*
)
pData
);
len
=
sprintf
(
buf
,
"%
"
PRId64
"
"
,
*
(
int64_t
*
)
pData
);
break
;
case
TSDB_DATA_TYPE_BOOL
:
len
=
MAX_BOOL_TYPE_LENGTH
;
...
...
@@ -228,7 +228,7 @@ static int32_t tscSetValueToResObj(SSqlObj *pSql, int32_t rowLen) {
sprintf
(
target
,
"%d"
,
*
(
int32_t
*
)
pTagValue
);
break
;
case
TSDB_DATA_TYPE_BIGINT
:
sprintf
(
target
,
"%
lld
"
,
*
(
int64_t
*
)
pTagValue
);
sprintf
(
target
,
"%
"
PRId64
"
"
,
*
(
int64_t
*
)
pTagValue
);
break
;
case
TSDB_DATA_TYPE_BOOL
:
{
char
*
val
=
(
*
((
int8_t
*
)
pTagValue
)
==
0
)
?
"false"
:
"true"
;
...
...
src/client/src/tscProfile.c
浏览文件 @
c12fb22e
...
...
@@ -93,10 +93,10 @@ void tscSaveSlowQuery(SSqlObj *pSql) {
const
static
int64_t
SLOW_QUERY_INTERVAL
=
3000000L
;
if
(
pSql
->
res
.
useconds
<
SLOW_QUERY_INTERVAL
)
return
;
tscTrace
(
"%p query time:%
lld
sql:%s"
,
pSql
,
pSql
->
res
.
useconds
,
pSql
->
sqlstr
);
tscTrace
(
"%p query time:%
"
PRId64
"
sql:%s"
,
pSql
,
pSql
->
res
.
useconds
,
pSql
->
sqlstr
);
char
*
sql
=
malloc
(
200
);
int
len
=
snprintf
(
sql
,
200
,
"insert into %s.slowquery values(now, '%s', %
lld, %lld
, '"
,
tsMonitorDbName
,
int
len
=
snprintf
(
sql
,
200
,
"insert into %s.slowquery values(now, '%s', %
"
PRId64
", %"
PRId64
"
, '"
,
tsMonitorDbName
,
pSql
->
pTscObj
->
user
,
pSql
->
stime
,
pSql
->
res
.
useconds
);
int
sqlLen
=
snprintf
(
sql
+
len
,
TSDB_SHOW_SQL_LEN
,
"%s"
,
pSql
->
sqlstr
);
if
(
sqlLen
>
TSDB_SHOW_SQL_LEN
-
1
)
{
...
...
src/client/src/tscServer.c
浏览文件 @
c12fb22e
...
...
@@ -3634,7 +3634,7 @@ int tscRenewMeterMeta(SSqlObj *pSql, char *meterId) {
*/
if
(
pMeterMetaInfo
->
pMeterMeta
==
NULL
||
!
tscQueryOnMetric
(
pCmd
))
{
if
(
pMeterMetaInfo
->
pMeterMeta
)
{
tscTrace
(
"%p update meter meta, old: numOfTags:%d, numOfCols:%d, uid:%
lld
, addr:%p"
,
pSql
,
tscTrace
(
"%p update meter meta, old: numOfTags:%d, numOfCols:%d, uid:%
"
PRId64
"
, addr:%p"
,
pSql
,
pMeterMetaInfo
->
numOfTags
,
pCmd
->
numOfCols
,
pMeterMetaInfo
->
pMeterMeta
->
uid
,
pMeterMetaInfo
->
pMeterMeta
);
}
tscWaitingForCreateTable
(
&
pSql
->
cmd
);
...
...
@@ -3642,7 +3642,7 @@ int tscRenewMeterMeta(SSqlObj *pSql, char *meterId) {
code
=
tscDoGetMeterMeta
(
pSql
,
meterId
,
0
);
// todo ??
}
else
{
tscTrace
(
"%p metric query not update metric meta, numOfTags:%d, numOfCols:%d, uid:%
lld
, addr:%p"
,
pSql
,
tscTrace
(
"%p metric query not update metric meta, numOfTags:%d, numOfCols:%d, uid:%
"
PRId64
"
, addr:%p"
,
pSql
,
pMeterMetaInfo
->
pMeterMeta
->
numOfTags
,
pCmd
->
numOfCols
,
pMeterMetaInfo
->
pMeterMeta
->
uid
,
pMeterMetaInfo
->
pMeterMeta
);
}
...
...
src/client/src/tscSql.c
浏览文件 @
c12fb22e
...
...
@@ -532,7 +532,7 @@ static void **tscJoinResultsetFromBuf(SSqlObj *pSql) {
doSetResultRowData
(
pSql
->
pSubs
[
1
]);
// TSKEY key1 = *(TSKEY *)pRes1->tsrow[0];
// TSKEY key2 = *(TSKEY *)pRes2->tsrow[0];
// printf("first:%
lld, second:%lld
\n", key1, key2);
// printf("first:%
" PRId64 ", second:%" PRId64 "
\n", key1, key2);
success
=
true
;
pRes1
->
row
++
;
pRes2
->
row
++
;
...
...
@@ -903,7 +903,7 @@ int taos_print_row(char *str, TAOS_ROW row, TAOS_FIELD *fields, int num_fields)
break
;
case
TSDB_DATA_TYPE_BIGINT
:
len
+=
sprintf
(
str
+
len
,
"%
lld
"
,
*
((
int64_t
*
)
row
[
i
]));
len
+=
sprintf
(
str
+
len
,
"%
"
PRId64
"
"
,
*
((
int64_t
*
)
row
[
i
]));
break
;
case
TSDB_DATA_TYPE_FLOAT
:
...
...
@@ -928,7 +928,7 @@ int taos_print_row(char *str, TAOS_ROW row, TAOS_FIELD *fields, int num_fields)
}
break
;
case
TSDB_DATA_TYPE_TIMESTAMP
:
len
+=
sprintf
(
str
+
len
,
"%
lld
"
,
*
((
int64_t
*
)
row
[
i
]));
len
+=
sprintf
(
str
+
len
,
"%
"
PRId64
"
"
,
*
((
int64_t
*
)
row
[
i
]));
break
;
case
TSDB_DATA_TYPE_BOOL
:
...
...
src/client/src/tscStream.c
浏览文件 @
c12fb22e
...
...
@@ -85,7 +85,7 @@ static void tscProcessStreamLaunchQuery(SSchedMsg *pMsg) {
// failed to get meter/metric meta, retry in 10sec.
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
int64_t
retryDelayTime
=
tscGetRetryDelayTime
(
pStream
->
slidingTime
,
pStream
->
precision
);
tscError
(
"%p stream:%p,get metermeta failed, retry in %
lld
ms"
,
pStream
->
pSql
,
pStream
,
retryDelayTime
);
tscError
(
"%p stream:%p,get metermeta failed, retry in %
"
PRId64
"
ms"
,
pStream
->
pSql
,
pStream
,
retryDelayTime
);
tscSetRetryTimer
(
pStream
,
pSql
,
retryDelayTime
);
return
;
...
...
@@ -136,7 +136,7 @@ static void tscProcessStreamQueryCallback(void *param, TAOS_RES *tres, int numOf
SSqlStream
*
pStream
=
(
SSqlStream
*
)
param
;
if
(
tres
==
NULL
||
numOfRows
<
0
)
{
int64_t
retryDelay
=
tscGetRetryDelayTime
(
pStream
->
slidingTime
,
pStream
->
precision
);
tscError
(
"%p stream:%p, query data failed, code:%d, retry in %
lld
ms"
,
pStream
->
pSql
,
pStream
,
numOfRows
,
tscError
(
"%p stream:%p, query data failed, code:%d, retry in %
"
PRId64
"
ms"
,
pStream
->
pSql
,
pStream
,
numOfRows
,
retryDelay
);
SMeterMetaInfo
*
pMeterMetaInfo
=
tscGetMeterMetaInfo
(
&
pStream
->
pSql
->
cmd
,
0
);
...
...
@@ -158,7 +158,7 @@ static void tscSetTimestampForRes(SSqlStream *pStream, SSqlObj *pSql) {
if
(
timestamp
!=
actualTimestamp
)
{
// reset the timestamp of each agg point by using start time of each interval
*
((
int64_t
*
)
pRes
->
data
)
=
actualTimestamp
;
tscWarn
(
"%p stream:%p, timestamp of points is:%
lld, reset to %lld
"
,
pSql
,
pStream
,
timestamp
,
actualTimestamp
);
tscWarn
(
"%p stream:%p, timestamp of points is:%
"
PRId64
", reset to %"
PRId64
"
"
,
pSql
,
pStream
,
timestamp
,
actualTimestamp
);
}
}
...
...
@@ -169,7 +169,7 @@ static void tscProcessStreamRetrieveResult(void *param, TAOS_RES *res, int numOf
if
(
pSql
==
NULL
||
numOfRows
<
0
)
{
int64_t
retryDelayTime
=
tscGetRetryDelayTime
(
pStream
->
slidingTime
,
pStream
->
precision
);
tscError
(
"%p stream:%p, retrieve data failed, code:%d, retry in %
lld
ms"
,
pSql
,
pStream
,
numOfRows
,
retryDelayTime
);
tscError
(
"%p stream:%p, retrieve data failed, code:%d, retry in %
"
PRId64
"
ms"
,
pSql
,
pStream
,
numOfRows
,
retryDelayTime
);
tscClearMeterMetaInfo
(
pMeterMetaInfo
,
true
);
tscSetRetryTimer
(
pStream
,
pStream
->
pSql
,
retryDelayTime
);
...
...
@@ -235,7 +235,7 @@ static void tscProcessStreamRetrieveResult(void *param, TAOS_RES *res, int numOf
/* no resuls in the query range, retry */
// todo set retry dynamic time
int32_t
retry
=
tsProjectExecInterval
;
tscError
(
"%p stream:%p, retrieve no data, code:%d, retry in %
lld
ms"
,
pSql
,
pStream
,
numOfRows
,
retry
);
tscError
(
"%p stream:%p, retrieve no data, code:%d, retry in %
"
PRId64
"
ms"
,
pSql
,
pStream
,
numOfRows
,
retry
);
tscClearSqlMetaInfoForce
(
&
(
pStream
->
pSql
->
cmd
));
tscSetRetryTimer
(
pStream
,
pStream
->
pSql
,
retry
);
...
...
@@ -265,7 +265,7 @@ static void tscSetRetryTimer(SSqlStream *pStream, SSqlObj *pSql, int64_t timer)
/*
* current time window will be closed, since it too early to exceed the maxRetentWindow value
*/
tscTrace
(
"%p stream:%p, etime:%
lld is too old, exceeds the max retention time window:%lld
, 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
);
// TODO : How to terminate stream here
taos_close_stream
(
pStream
);
...
...
@@ -276,10 +276,10 @@ static void tscSetRetryTimer(SSqlStream *pStream, SSqlObj *pSql, int64_t timer)
return
;
}
tscTrace
(
"%p stream:%p, next query start at %
lld, in %lldms. query range %lld-%lld
"
,
pStream
->
pSql
,
pStream
,
tscTrace
(
"%p stream:%p, next query start at %
"
PRId64
", in %"
PRId64
"ms. query range %"
PRId64
"-%"
PRId64
"
"
,
pStream
->
pSql
,
pStream
,
now
+
timer
,
timer
,
pStream
->
stime
,
etime
);
}
else
{
tscTrace
(
"%p stream:%p, next query start at %
lld, in %lldms. query range %lld-%lld
"
,
pStream
->
pSql
,
pStream
,
tscTrace
(
"%p stream:%p, next query start at %
"
PRId64
", in %"
PRId64
"ms. query range %"
PRId64
"-%"
PRId64
"
"
,
pStream
->
pSql
,
pStream
,
pStream
->
stime
,
timer
,
pStream
->
stime
-
pStream
->
interval
,
pStream
->
stime
-
1
);
}
...
...
@@ -299,7 +299,7 @@ static void tscSetNextLaunchTimer(SSqlStream *pStream, SSqlObj *pSql) {
*/
timer
=
pStream
->
slidingTime
;
if
(
pStream
->
stime
>
pStream
->
etime
)
{
tscTrace
(
"%p stream:%p, stime:%
lld is larger than end time: %lld
, 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
);
// TODO : How to terminate stream here
taos_close_stream
(
pStream
);
...
...
@@ -353,7 +353,7 @@ static void tscSetSlidingWindowInfo(SSqlObj *pSql, SSqlStream *pStream) {
int64_t
minIntervalTime
=
(
pStream
->
precision
==
TSDB_TIME_PRECISION_MICRO
)
?
tsMinIntervalTime
*
1000L
:
tsMinIntervalTime
;
if
(
pCmd
->
nAggTimeInterval
<
minIntervalTime
)
{
tscWarn
(
"%p stream:%p, original sample interval:%ld too small, reset to:%
lld
"
,
pSql
,
pStream
,
tscWarn
(
"%p stream:%p, original sample interval:%ld too small, reset to:%
"
PRId64
"
"
,
pSql
,
pStream
,
pCmd
->
nAggTimeInterval
,
minIntervalTime
);
pCmd
->
nAggTimeInterval
=
minIntervalTime
;
}
...
...
@@ -368,14 +368,14 @@ static void tscSetSlidingWindowInfo(SSqlObj *pSql, SSqlStream *pStream) {
(
pStream
->
precision
==
TSDB_TIME_PRECISION_MICRO
)
?
tsMinSlidingTime
*
1000L
:
tsMinSlidingTime
;
if
(
pCmd
->
nSlidingTime
<
minSlidingTime
)
{
tscWarn
(
"%p stream:%p, original sliding value:%
lld too small, reset to:%lld
"
,
pSql
,
pStream
,
pCmd
->
nSlidingTime
,
tscWarn
(
"%p stream:%p, original sliding value:%
"
PRId64
" too small, reset to:%"
PRId64
"
"
,
pSql
,
pStream
,
pCmd
->
nSlidingTime
,
minSlidingTime
);
pCmd
->
nSlidingTime
=
minSlidingTime
;
}
if
(
pCmd
->
nSlidingTime
>
pCmd
->
nAggTimeInterval
)
{
tscWarn
(
"%p stream:%p, sliding value:%
lld can not be larger than interval range, reset to:%lld
"
,
pSql
,
pStream
,
tscWarn
(
"%p stream:%p, sliding value:%
"
PRId64
" can not be larger than interval range, reset to:%"
PRId64
"
"
,
pSql
,
pStream
,
pCmd
->
nSlidingTime
,
pCmd
->
nAggTimeInterval
);
pCmd
->
nSlidingTime
=
pCmd
->
nAggTimeInterval
;
...
...
@@ -401,11 +401,11 @@ static int64_t tscGetStreamStartTimestamp(SSqlObj *pSql, SSqlStream *pStream, in
}
else
{
// timewindow based aggregation stream
if
(
stime
==
0
)
{
// no data in meter till now
stime
=
((
int64_t
)
taosGetTimestamp
(
pStream
->
precision
)
/
pStream
->
interval
)
*
pStream
->
interval
;
tscWarn
(
"%p stream:%p, last timestamp:0, reset to:%
lld
"
,
pSql
,
pStream
,
stime
);
tscWarn
(
"%p stream:%p, last timestamp:0, reset to:%
"
PRId64
"
"
,
pSql
,
pStream
,
stime
);
}
else
{
int64_t
newStime
=
(
stime
/
pStream
->
interval
)
*
pStream
->
interval
;
if
(
newStime
!=
stime
)
{
tscWarn
(
"%p stream:%p, last timestamp:%
lld, reset to:%lld
"
,
pSql
,
pStream
,
stime
,
newStime
);
tscWarn
(
"%p stream:%p, last timestamp:%
"
PRId64
", reset to:%"
PRId64
"
"
,
pSql
,
pStream
,
stime
,
newStime
);
stime
=
newStime
;
}
}
...
...
@@ -537,7 +537,7 @@ TAOS_STREAM *taos_open_stream(TAOS *taos, const char *sqlstr, void (*fp)(void *p
int64_t
starttime
=
tscGetLaunchTimestamp
(
pStream
);
taosTmrReset
(
tscProcessStreamTimer
,
starttime
,
pStream
,
tscTmr
,
&
pStream
->
pTimer
);
tscTrace
(
"%p stream:%p is opened, query on:%s, interval:%
lld, sliding:%lld, first launched in:%lld
, sql:%s"
,
pSql
,
tscTrace
(
"%p stream:%p is opened, query on:%s, interval:%
"
PRId64
", sliding:%"
PRId64
", first launched in:%"
PRId64
"
, sql:%s"
,
pSql
,
pStream
,
pMeterMetaInfo
->
name
,
pStream
->
interval
,
pStream
->
slidingTime
,
starttime
,
sqlstr
);
return
pStream
;
...
...
src/client/src/tscSub.c
浏览文件 @
c12fb22e
...
...
@@ -106,7 +106,7 @@ TAOS_ROW taos_consume(TAOS_SUB *tsub) {
pSub
->
stime
=
taosGetTimestampMs
();
sprintf
(
qstr
,
"select * from %s where _c0 > %
lld
order by _c0 asc"
,
pSub
->
name
,
pSub
->
lastKey
);
sprintf
(
qstr
,
"select * from %s where _c0 > %
"
PRId64
"
order by _c0 asc"
,
pSub
->
name
,
pSub
->
lastKey
);
if
(
taos_query
(
pSub
->
taos
,
qstr
))
{
tscTrace
(
"failed to select, reason:%s"
,
taos_errstr
(
pSub
->
taos
));
return
NULL
;
...
...
src/client/src/tscUtil.c
浏览文件 @
c12fb22e
...
...
@@ -1202,7 +1202,8 @@ void tscColumnBaseInfoDestroy(SColumnBaseInfo* pColumnBaseInfo) {
assert
(
pColBase
->
filterInfo
[
j
].
filterOnBinary
==
0
||
pColBase
->
filterInfo
[
j
].
filterOnBinary
==
1
);
if
(
pColBase
->
filterInfo
[
j
].
filterOnBinary
)
{
tfree
(
pColBase
->
filterInfo
[
j
].
pz
);
free
((
char
*
)
pColBase
->
filterInfo
[
j
].
pz
);
pColBase
->
filterInfo
[
j
].
pz
=
0
;
}
}
}
...
...
src/inc/taosmsg.h
浏览文件 @
c12fb22e
...
...
@@ -279,7 +279,7 @@ typedef struct {
}
SShellSubmitMsg
;
typedef
struct
SSchema
{
char
type
;
uint8_t
type
;
char
name
[
TSDB_COL_NAME_LEN
];
short
colId
;
short
bytes
;
...
...
src/inc/tutil.h
浏览文件 @
c12fb22e
...
...
@@ -175,7 +175,7 @@ bool taosMbsToUcs4(char *mbs, int32_t mbs_len, char *ucs4, int32_t ucs4_max_len)
bool
taosUcs4ToMbs
(
void
*
ucs4
,
int32_t
ucs4_max_len
,
char
*
mbs
);
bool
taosValidateEncodec
(
char
*
encodec
);
bool
taosValidateEncodec
(
c
onst
c
har
*
encodec
);
bool
taosGetVersionNumber
(
char
*
versionStr
,
int
*
versionNubmer
);
...
...
src/os/linux/inc/os.h
浏览文件 @
c12fb22e
...
...
@@ -71,6 +71,7 @@ extern "C" {
#include <wchar.h>
#include <wordexp.h>
#include <wctype.h>
#include <inttypes.h>
#define taosCloseSocket(x) \
...
...
src/util/src/textbuffer.c
浏览文件 @
c12fb22e
...
...
@@ -12,7 +12,6 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <inttypes.h>
#include "os.h"
#include "taos.h"
#include "taosmsg.h"
...
...
src/util/src/thistogram.c
浏览文件 @
c12fb22e
...
...
@@ -12,7 +12,6 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <inttypes.h>
#include "os.h"
#include "taosmsg.h"
...
...
src/util/src/tskiplist.c
浏览文件 @
c12fb22e
...
...
@@ -12,11 +12,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <inttypes.h>
#include <float.h>
#include <math.h>
#include <stdbool.h>
#include <stdlib.h>
#include "os.h"
#include "tlog.h"
#include "tsdb.h"
...
...
src/util/src/tstrbuild.c
浏览文件 @
c12fb22e
...
...
@@ -12,7 +12,6 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <inttypes.h>
#include "os.h"
#include "tstrbuild.h"
...
...
src/util/src/ttimer.c
浏览文件 @
c12fb22e
...
...
@@ -14,7 +14,6 @@
*/
#include "os.h"
#include <inttypes.h>
#include "tlog.h"
#include "tsched.h"
#include "ttime.h"
...
...
src/util/src/ttokenizer.c
浏览文件 @
c12fb22e
...
...
@@ -510,7 +510,7 @@ uint32_t tSQLGetToken(char* z, uint32_t* tokenType) {
if
((
z
[
i
]
==
'a'
||
z
[
i
]
==
's'
||
z
[
i
]
==
'm'
||
z
[
i
]
==
'h'
||
z
[
i
]
==
'd'
||
z
[
i
]
==
'n'
||
z
[
i
]
==
'y'
||
z
[
i
]
==
'w'
||
z
[
i
]
==
'A'
||
z
[
i
]
==
'S'
||
z
[
i
]
==
'M'
||
z
[
i
]
==
'H'
||
z
[
i
]
==
'D'
||
z
[
i
]
==
'N'
||
z
[
i
]
==
'Y'
||
z
[
i
]
==
'W'
)
&&
(
isIdChar
[
z
[
i
+
1
]]
==
0
))
{
(
isIdChar
[
(
uint8_t
)
z
[
i
+
1
]]
==
0
))
{
*
tokenType
=
TK_VARIABLE
;
i
+=
1
;
return
i
;
...
...
@@ -551,7 +551,7 @@ uint32_t tSQLGetToken(char* z, uint32_t* tokenType) {
case
't'
:
case
'F'
:
case
'f'
:
{
for
(
i
=
1
;
((
z
[
i
]
&
0x80
)
==
0
)
&&
isIdChar
[
z
[
i
]];
i
++
)
{
for
(
i
=
1
;
((
z
[
i
]
&
0x80
)
==
0
)
&&
isIdChar
[
(
uint8_t
)
z
[
i
]];
i
++
)
{
}
if
((
i
==
4
&&
strncasecmp
(
z
,
"true"
,
4
)
==
0
)
||
(
i
==
5
&&
strncasecmp
(
z
,
"false"
,
5
)
==
0
))
{
...
...
@@ -560,10 +560,10 @@ uint32_t tSQLGetToken(char* z, uint32_t* tokenType) {
}
}
default:
{
if
(((
*
z
&
0x80
)
!=
0
)
||
!
isIdChar
[
*
z
])
{
if
(((
*
z
&
0x80
)
!=
0
)
||
!
isIdChar
[
(
uint8_t
)
*
z
])
{
break
;
}
for
(
i
=
1
;
((
z
[
i
]
&
0x80
)
==
0
)
&&
isIdChar
[
z
[
i
]];
i
++
)
{
for
(
i
=
1
;
((
z
[
i
]
&
0x80
)
==
0
)
&&
isIdChar
[
(
uint8_t
)
z
[
i
]];
i
++
)
{
}
*
tokenType
=
tSQLKeywordCode
(
z
,
i
);
return
i
;
...
...
src/util/src/ttypes.c
浏览文件 @
c12fb22e
...
...
@@ -12,7 +12,6 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <inttypes.h>
#include "os.h"
#include "taos.h"
#include "tsdb.h"
...
...
src/util/src/tutil.c
浏览文件 @
c12fb22e
...
...
@@ -443,7 +443,7 @@ bool taosMbsToUcs4(char *mbs, int32_t mbs_len, char *ucs4, int32_t ucs4_max_len)
#endif
}
bool
taosValidateEncodec
(
char
*
encodec
)
{
bool
taosValidateEncodec
(
c
onst
c
har
*
encodec
)
{
#ifdef USE_LIBICONV
iconv_t
cd
=
iconv_open
(
encodec
,
DEFAULT_UNICODE_ENCODEC
);
if
(
cd
==
(
iconv_t
)(
-
1
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录