Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
89769b8d
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看板
提交
89769b8d
编写于
9月 06, 2019
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix the issue #466
上级
1ddd7336
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
12 addition
and
12 deletion
+12
-12
src/client/src/tscLocal.c
src/client/src/tscLocal.c
+2
-2
src/client/src/tscProfile.c
src/client/src/tscProfile.c
+1
-1
src/client/src/tscSql.c
src/client/src/tscSql.c
+2
-2
src/client/src/tscSub.c
src/client/src/tscSub.c
+1
-1
src/util/src/tglobalcfg.c
src/util/src/tglobalcfg.c
+2
-2
src/util/src/tskiplist.c
src/util/src/tskiplist.c
+1
-1
src/util/src/ttypes.c
src/util/src/ttypes.c
+3
-3
未找到文件。
src/client/src/tscLocal.c
浏览文件 @
89769b8d
...
@@ -48,7 +48,7 @@ static int32_t getToStringLength(char *pData, int32_t length, int32_t type) {
...
@@ -48,7 +48,7 @@ static int32_t getToStringLength(char *pData, int32_t length, int32_t type) {
break
;
break
;
case
TSDB_DATA_TYPE_TIMESTAMP
:
case
TSDB_DATA_TYPE_TIMESTAMP
:
case
TSDB_DATA_TYPE_BIGINT
:
case
TSDB_DATA_TYPE_BIGINT
:
len
=
sprintf
(
buf
,
"%ld"
,
*
(
int64_t
*
)
pData
);
len
=
sprintf
(
buf
,
"%l
l
d"
,
*
(
int64_t
*
)
pData
);
break
;
break
;
case
TSDB_DATA_TYPE_BOOL
:
case
TSDB_DATA_TYPE_BOOL
:
len
=
MAX_BOOL_TYPE_LENGTH
;
len
=
MAX_BOOL_TYPE_LENGTH
;
...
@@ -198,7 +198,7 @@ static int32_t tscSetValueToResObj(SSqlObj *pSql, int32_t rowLen) {
...
@@ -198,7 +198,7 @@ static int32_t tscSetValueToResObj(SSqlObj *pSql, int32_t rowLen) {
sprintf
(
target
,
"%d"
,
*
(
int32_t
*
)
pTagValue
);
sprintf
(
target
,
"%d"
,
*
(
int32_t
*
)
pTagValue
);
break
;
break
;
case
TSDB_DATA_TYPE_BIGINT
:
case
TSDB_DATA_TYPE_BIGINT
:
sprintf
(
target
,
"%ld"
,
*
(
int64_t
*
)
pTagValue
);
sprintf
(
target
,
"%l
l
d"
,
*
(
int64_t
*
)
pTagValue
);
break
;
break
;
case
TSDB_DATA_TYPE_BOOL
:
{
case
TSDB_DATA_TYPE_BOOL
:
{
char
*
val
=
(
*
((
int8_t
*
)
pTagValue
)
==
0
)
?
"false"
:
"true"
;
char
*
val
=
(
*
((
int8_t
*
)
pTagValue
)
==
0
)
?
"false"
:
"true"
;
...
...
src/client/src/tscProfile.c
浏览文件 @
89769b8d
...
@@ -76,7 +76,7 @@ void tscSaveSlowQuery(SSqlObj *pSql) {
...
@@ -76,7 +76,7 @@ void tscSaveSlowQuery(SSqlObj *pSql) {
tscTrace
(
"%p query time:%ld sql:%s"
,
pSql
,
pSql
->
res
.
useconds
,
pSql
->
sqlstr
);
tscTrace
(
"%p query time:%ld sql:%s"
,
pSql
,
pSql
->
res
.
useconds
,
pSql
->
sqlstr
);
char
*
sql
=
malloc
(
200
);
char
*
sql
=
malloc
(
200
);
int
len
=
snprintf
(
sql
,
200
,
"insert into sys.slowquery values(now, '%s', %l
d, %
ld, '"
,
pSql
->
pTscObj
->
user
,
int
len
=
snprintf
(
sql
,
200
,
"insert into sys.slowquery values(now, '%s', %l
ld, %l
ld, '"
,
pSql
->
pTscObj
->
user
,
pSql
->
stime
,
pSql
->
res
.
useconds
);
pSql
->
stime
,
pSql
->
res
.
useconds
);
int
sqlLen
=
snprintf
(
sql
+
len
,
TSDB_SHOW_SQL_LEN
,
"%s"
,
pSql
->
sqlstr
);
int
sqlLen
=
snprintf
(
sql
+
len
,
TSDB_SHOW_SQL_LEN
,
"%s"
,
pSql
->
sqlstr
);
if
(
sqlLen
>
TSDB_SHOW_SQL_LEN
-
1
)
{
if
(
sqlLen
>
TSDB_SHOW_SQL_LEN
-
1
)
{
...
...
src/client/src/tscSql.c
浏览文件 @
89769b8d
...
@@ -665,7 +665,7 @@ int taos_print_row(char *str, TAOS_ROW row, TAOS_FIELD *fields, int num_fields)
...
@@ -665,7 +665,7 @@ int taos_print_row(char *str, TAOS_ROW row, TAOS_FIELD *fields, int num_fields)
break
;
break
;
case
TSDB_DATA_TYPE_BIGINT
:
case
TSDB_DATA_TYPE_BIGINT
:
len
+=
sprintf
(
str
+
len
,
"%ld "
,
*
((
int64_t
*
)
row
[
i
]));
len
+=
sprintf
(
str
+
len
,
"%l
l
d "
,
*
((
int64_t
*
)
row
[
i
]));
break
;
break
;
case
TSDB_DATA_TYPE_FLOAT
:
case
TSDB_DATA_TYPE_FLOAT
:
...
@@ -684,7 +684,7 @@ int taos_print_row(char *str, TAOS_ROW row, TAOS_FIELD *fields, int num_fields)
...
@@ -684,7 +684,7 @@ int taos_print_row(char *str, TAOS_ROW row, TAOS_FIELD *fields, int num_fields)
break
;
break
;
case
TSDB_DATA_TYPE_TIMESTAMP
:
case
TSDB_DATA_TYPE_TIMESTAMP
:
len
+=
sprintf
(
str
+
len
,
"%ld "
,
*
((
int64_t
*
)
row
[
i
]));
len
+=
sprintf
(
str
+
len
,
"%l
l
d "
,
*
((
int64_t
*
)
row
[
i
]));
break
;
break
;
case
TSDB_DATA_TYPE_BOOL
:
case
TSDB_DATA_TYPE_BOOL
:
...
...
src/client/src/tscSub.c
浏览文件 @
89769b8d
...
@@ -106,7 +106,7 @@ TAOS_ROW taos_consume(TAOS_SUB *tsub) {
...
@@ -106,7 +106,7 @@ TAOS_ROW taos_consume(TAOS_SUB *tsub) {
pSub
->
stime
=
taosGetTimestampMs
();
pSub
->
stime
=
taosGetTimestampMs
();
sprintf
(
qstr
,
"select * from %s where _c0 > %ld order by _c0 asc"
,
pSub
->
name
,
pSub
->
lastKey
);
sprintf
(
qstr
,
"select * from %s where _c0 > %l
l
d order by _c0 asc"
,
pSub
->
name
,
pSub
->
lastKey
);
if
(
taos_query
(
pSub
->
taos
,
qstr
))
{
if
(
taos_query
(
pSub
->
taos
,
qstr
))
{
tscTrace
(
"failed to select, reason:%s"
,
taos_errstr
(
pSub
->
taos
));
tscTrace
(
"failed to select, reason:%s"
,
taos_errstr
(
pSub
->
taos
));
return
NULL
;
return
NULL
;
...
...
src/util/src/tglobalcfg.c
浏览文件 @
89769b8d
...
@@ -449,9 +449,9 @@ void tsInitGlobalConfig() {
...
@@ -449,9 +449,9 @@ void tsInitGlobalConfig() {
tsInitConfigOption
(
cfg
++
,
"shellActivityTimer"
,
&
tsShellActivityTimer
,
TSDB_CFG_VTYPE_INT
,
tsInitConfigOption
(
cfg
++
,
"shellActivityTimer"
,
&
tsShellActivityTimer
,
TSDB_CFG_VTYPE_INT
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
,
1
,
120
,
0
,
TSDB_CFG_UTYPE_SECOND
);
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
,
1
,
120
,
0
,
TSDB_CFG_UTYPE_SECOND
);
tsInitConfigOption
(
cfg
++
,
"meterMetaKeepTimer"
,
&
tsMeterMetaKeepTimer
,
TSDB_CFG_VTYPE_INT
,
tsInitConfigOption
(
cfg
++
,
"meterMetaKeepTimer"
,
&
tsMeterMetaKeepTimer
,
TSDB_CFG_VTYPE_INT
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
,
1
,
36
000
,
0
,
TSDB_CFG_UTYPE_SECOND
);
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
,
1
,
8640
000
,
0
,
TSDB_CFG_UTYPE_SECOND
);
tsInitConfigOption
(
cfg
++
,
"metricMetaKeepTimer"
,
&
tsMetricMetaKeepTimer
,
TSDB_CFG_VTYPE_INT
,
tsInitConfigOption
(
cfg
++
,
"metricMetaKeepTimer"
,
&
tsMetricMetaKeepTimer
,
TSDB_CFG_VTYPE_INT
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
,
1
,
36
000
,
0
,
TSDB_CFG_UTYPE_SECOND
);
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
,
1
,
8640
000
,
0
,
TSDB_CFG_UTYPE_SECOND
);
// mgmt configs
// mgmt configs
tsInitConfigOption
(
cfg
++
,
"maxUsers"
,
&
tsMaxUsers
,
TSDB_CFG_VTYPE_INT
,
tsInitConfigOption
(
cfg
++
,
"maxUsers"
,
&
tsMaxUsers
,
TSDB_CFG_VTYPE_INT
,
...
...
src/util/src/tskiplist.c
浏览文件 @
89769b8d
...
@@ -713,7 +713,7 @@ void tSkipListPrint(tSkipList *pSkipList, int16_t nlevel) {
...
@@ -713,7 +713,7 @@ void tSkipListPrint(tSkipList *pSkipList, int16_t nlevel) {
case
TSDB_DATA_TYPE_SMALLINT
:
case
TSDB_DATA_TYPE_SMALLINT
:
case
TSDB_DATA_TYPE_TINYINT
:
case
TSDB_DATA_TYPE_TINYINT
:
case
TSDB_DATA_TYPE_BIGINT
:
case
TSDB_DATA_TYPE_BIGINT
:
fprintf
(
stdout
,
"%d: %ld
\n
"
,
id
++
,
p
->
key
.
i64Key
);
fprintf
(
stdout
,
"%d: %l
l
d
\n
"
,
id
++
,
p
->
key
.
i64Key
);
break
;
break
;
case
TSDB_DATA_TYPE_BINARY
:
case
TSDB_DATA_TYPE_BINARY
:
fprintf
(
stdout
,
"%d: %s
\n
"
,
id
++
,
p
->
key
.
pz
);
fprintf
(
stdout
,
"%d: %s
\n
"
,
id
++
,
p
->
key
.
pz
);
...
...
src/util/src/ttypes.c
浏览文件 @
89769b8d
...
@@ -225,7 +225,7 @@ int32_t tVariantToString(tVariant *pVar, char *dst) {
...
@@ -225,7 +225,7 @@ int32_t tVariantToString(tVariant *pVar, char *dst) {
return
sprintf
(
dst
,
"%d"
,
(
int32_t
)
pVar
->
i64Key
);
return
sprintf
(
dst
,
"%d"
,
(
int32_t
)
pVar
->
i64Key
);
case
TSDB_DATA_TYPE_BIGINT
:
case
TSDB_DATA_TYPE_BIGINT
:
return
sprintf
(
dst
,
"%ld"
,
pVar
->
i64Key
);
return
sprintf
(
dst
,
"%l
l
d"
,
pVar
->
i64Key
);
case
TSDB_DATA_TYPE_FLOAT
:
case
TSDB_DATA_TYPE_FLOAT
:
case
TSDB_DATA_TYPE_DOUBLE
:
case
TSDB_DATA_TYPE_DOUBLE
:
...
@@ -385,7 +385,7 @@ static int32_t toBinary(tVariant *pVariant, char **pDest, int32_t *pDestSize) {
...
@@ -385,7 +385,7 @@ static int32_t toBinary(tVariant *pVariant, char **pDest, int32_t *pDestSize) {
}
else
{
}
else
{
if
(
pVariant
->
nType
>=
TSDB_DATA_TYPE_TINYINT
&&
pVariant
->
nType
<=
TSDB_DATA_TYPE_BIGINT
)
{
if
(
pVariant
->
nType
>=
TSDB_DATA_TYPE_TINYINT
&&
pVariant
->
nType
<=
TSDB_DATA_TYPE_BIGINT
)
{
sprintf
(
pBuf
==
NULL
?
*
pDest
:
pBuf
,
"%ld"
,
pVariant
->
i64Key
);
sprintf
(
pBuf
==
NULL
?
*
pDest
:
pBuf
,
"%l
l
d"
,
pVariant
->
i64Key
);
}
else
if
(
pVariant
->
nType
==
TSDB_DATA_TYPE_DOUBLE
||
pVariant
->
nType
==
TSDB_DATA_TYPE_FLOAT
)
{
}
else
if
(
pVariant
->
nType
==
TSDB_DATA_TYPE_DOUBLE
||
pVariant
->
nType
==
TSDB_DATA_TYPE_FLOAT
)
{
sprintf
(
pBuf
==
NULL
?
*
pDest
:
pBuf
,
"%lf"
,
pVariant
->
dKey
);
sprintf
(
pBuf
==
NULL
?
*
pDest
:
pBuf
,
"%lf"
,
pVariant
->
dKey
);
}
else
if
(
pVariant
->
nType
==
TSDB_DATA_TYPE_BOOL
)
{
}
else
if
(
pVariant
->
nType
==
TSDB_DATA_TYPE_BOOL
)
{
...
@@ -407,7 +407,7 @@ static int32_t toNchar(tVariant *pVariant, char **pDest, int32_t *pDestSize) {
...
@@ -407,7 +407,7 @@ static int32_t toNchar(tVariant *pVariant, char **pDest, int32_t *pDestSize) {
int32_t
nLen
=
0
;
int32_t
nLen
=
0
;
if
(
pVariant
->
nType
>=
TSDB_DATA_TYPE_TINYINT
&&
pVariant
->
nType
<=
TSDB_DATA_TYPE_BIGINT
)
{
if
(
pVariant
->
nType
>=
TSDB_DATA_TYPE_TINYINT
&&
pVariant
->
nType
<=
TSDB_DATA_TYPE_BIGINT
)
{
nLen
=
sprintf
(
pDst
,
"%ld"
,
pVariant
->
i64Key
);
nLen
=
sprintf
(
pDst
,
"%l
l
d"
,
pVariant
->
i64Key
);
}
else
if
(
pVariant
->
nType
==
TSDB_DATA_TYPE_DOUBLE
||
pVariant
->
nType
==
TSDB_DATA_TYPE_FLOAT
)
{
}
else
if
(
pVariant
->
nType
==
TSDB_DATA_TYPE_DOUBLE
||
pVariant
->
nType
==
TSDB_DATA_TYPE_FLOAT
)
{
nLen
=
sprintf
(
pDst
,
"%lf"
,
pVariant
->
dKey
);
nLen
=
sprintf
(
pDst
,
"%lf"
,
pVariant
->
dKey
);
}
else
if
(
pVariant
->
nType
==
TSDB_DATA_TYPE_BINARY
)
{
}
else
if
(
pVariant
->
nType
==
TSDB_DATA_TYPE_BINARY
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录