Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
a5b1ba1b
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看板
提交
a5b1ba1b
编写于
5月 06, 2020
作者:
sangshuduo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix compile error for Ubuntu 20.04
[TD-210]
上级
a83824ec
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
60 addition
and
24 deletion
+60
-24
src/client/src/tscLocal.c
src/client/src/tscLocal.c
+4
-2
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+2
-2
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+1
-1
src/mnode/src/mgmtDb.c
src/mnode/src/mgmtDb.c
+4
-2
src/mnode/src/mgmtDnode.c
src/mnode/src/mgmtDnode.c
+1
-1
src/mnode/src/mgmtUser.c
src/mnode/src/mgmtUser.c
+7
-4
src/mnode/src/mgmtVgroup.c
src/mnode/src/mgmtVgroup.c
+3
-2
src/os/linux/CMakeLists.txt
src/os/linux/CMakeLists.txt
+2
-0
src/os/linux/inc/os.h
src/os/linux/inc/os.h
+1
-7
src/os/linux/inc/tsysctl.h
src/os/linux/inc/tsysctl.h
+30
-0
src/os/linux/src/linuxSysPara.c
src/os/linux/src/linuxSysPara.c
+1
-0
tests/tsim/src/simExe.c
tests/tsim/src/simExe.c
+4
-3
未找到文件。
src/client/src/tscLocal.c
浏览文件 @
a5b1ba1b
...
...
@@ -156,7 +156,8 @@ static int32_t tscSetValueToResObj(SSqlObj *pSql, int32_t rowLen) {
pField
=
tscFieldInfoGetField
(
&
pQueryInfo
->
fieldsInfo
,
3
);
if
(
i
>=
tscGetNumOfColumns
(
pMeta
)
&&
tscGetNumOfTags
(
pMeta
)
!=
0
)
{
char
*
output
=
pRes
->
data
+
tscFieldInfoGetOffset
(
pQueryInfo
,
3
)
*
totalNumOfRows
+
pField
->
bytes
*
i
;
STR_WITH_SIZE_TO_VARSTR
(
output
,
"TAG"
,
3
);
const
char
*
src
=
"TAG"
;
STR_WITH_SIZE_TO_VARSTR
(
output
,
src
,
strlen
(
src
));
}
}
...
...
@@ -191,7 +192,8 @@ static int32_t tscSetValueToResObj(SSqlObj *pSql, int32_t rowLen) {
// tag value
pField
=
tscFieldInfoGetField
(
&
pQueryInfo
->
fieldsInfo
,
3
);
char
*
target
=
pRes
->
data
+
tscFieldInfoGetOffset
(
pQueryInfo
,
3
)
*
totalNumOfRows
+
pField
->
bytes
*
i
;
STR_WITH_SIZE_TO_VARSTR
(
target
,
"TAG"
,
3
);
const
char
*
src
=
"TAG"
;
STR_WITH_SIZE_TO_VARSTR
(
target
,
src
,
strlen
(
src
));
pTagValue
+=
pSchema
[
i
].
bytes
;
}
...
...
src/client/src/tscSQLParser.c
浏览文件 @
a5b1ba1b
...
...
@@ -2222,14 +2222,14 @@ int32_t setKillInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
char
*
portStr
=
strtok
(
NULL
,
&
delim
);
if
(
!
validateIpAddress
(
ipStr
,
strlen
(
ipStr
)))
{
memset
(
pCmd
->
payload
,
0
,
tListL
en
(
pCmd
->
payload
));
memset
(
pCmd
->
payload
,
0
,
strl
en
(
pCmd
->
payload
));
return
invalidSqlErrMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg1
);
}
uint16_t
port
=
(
uint16_t
)
strtol
(
portStr
,
NULL
,
10
);
if
(
port
<=
0
||
port
>
65535
)
{
memset
(
pCmd
->
payload
,
0
,
tListL
en
(
pCmd
->
payload
));
memset
(
pCmd
->
payload
,
0
,
strl
en
(
pCmd
->
payload
));
return
invalidSqlErrMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg2
);
}
...
...
src/kit/taosdemo/taosdemo.c
浏览文件 @
a5b1ba1b
...
...
@@ -634,7 +634,7 @@ void *readMetric(void *sarg) {
fprintf
(
fp
,
"Querying On %d records:
\n
"
,
totalData
);
for
(
int
j
=
0
;
j
<
n
;
j
++
)
{
char
condition
[
BUFFER_SIZE
]
=
"
\0
"
;
char
condition
[
BUFFER_SIZE
-
30
]
=
"
\0
"
;
char
tempS
[
BUFFER_SIZE
]
=
"
\0
"
;
int
m
=
10
<
num_of_tables
?
10
:
num_of_tables
;
...
...
src/mnode/src/mgmtDb.c
浏览文件 @
a5b1ba1b
...
...
@@ -677,9 +677,11 @@ static int32_t mgmtRetrieveDbs(SShowObj *pShow, char *data, int32_t rows, void *
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
if
(
pDb
->
status
==
TSDB_DB_STATUS_READY
)
{
STR_WITH_SIZE_TO_VARSTR
(
pWrite
,
"ready"
,
5
);
const
char
*
src
=
"ready"
;
STR_WITH_SIZE_TO_VARSTR
(
pWrite
,
src
,
strlen
(
src
));
}
else
{
STR_WITH_SIZE_TO_VARSTR
(
pWrite
,
"dropping"
,
8
);
const
char
*
src
=
"dropping"
;
STR_WITH_SIZE_TO_VARSTR
(
pWrite
,
src
,
strlen
(
src
));
}
cols
++
;
...
...
src/mnode/src/mgmtDnode.c
浏览文件 @
a5b1ba1b
...
...
@@ -225,7 +225,7 @@ void mgmtProcessCfgDnodeMsg(SQueuedMsg *pMsg) {
if
(
pCmCfgDnode
->
ep
[
0
]
==
0
)
{
strcpy
(
pCmCfgDnode
->
ep
,
tsLocalEp
);
}
else
{
strcpy
(
pCmCfgDnode
->
ep
,
pCmCfgDnode
->
ep
);
// TODO temporary disabled for compiling: strcpy(pCmCfgDnode->ep, pCmCfgDnode->ep);
}
if
(
strcmp
(
pMsg
->
pUser
->
user
,
"root"
)
!=
0
)
{
...
...
src/mnode/src/mgmtUser.c
浏览文件 @
a5b1ba1b
...
...
@@ -309,11 +309,14 @@ static int32_t mgmtRetrieveUsers(SShowObj *pShow, char *data, int32_t rows, void
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
if
(
pUser
->
superAuth
)
{
STR_WITH_SIZE_TO_VARSTR
(
pWrite
,
"super"
,
5
);
const
char
*
src
=
"super"
;
STR_WITH_SIZE_TO_VARSTR
(
pWrite
,
src
,
strlen
(
src
));
}
else
if
(
pUser
->
writeAuth
)
{
STR_WITH_SIZE_TO_VARSTR
(
pWrite
,
"writable"
,
8
);
const
char
*
src
=
"writable"
;
STR_WITH_SIZE_TO_VARSTR
(
pWrite
,
src
,
strlen
(
src
));
}
else
{
STR_WITH_SIZE_TO_VARSTR
(
pWrite
,
"readable"
,
8
);
const
char
*
src
=
"readable"
;
STR_WITH_SIZE_TO_VARSTR
(
pWrite
,
src
,
strlen
(
src
));
}
cols
++
;
...
...
@@ -525,4 +528,4 @@ void mgmtDropAllUsers(SAcctObj *pAcct) {
}
mTrace
(
"acct:%s, all users:%d is dropped from sdb"
,
pAcct
->
user
,
numOfUsers
);
}
\ No newline at end of file
}
src/mnode/src/mgmtVgroup.c
浏览文件 @
a5b1ba1b
...
...
@@ -495,11 +495,12 @@ int32_t mgmtRetrieveVgroups(SShowObj *pShow, char *data, int32_t rows, void *pCo
cols
++
;
}
else
{
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
STR_WITH_SIZE_TO_VARSTR
(
pWrite
,
"NULL"
,
4
);
const
char
*
src
=
"NULL"
;
STR_WITH_SIZE_TO_VARSTR
(
pWrite
,
src
,
strlen
(
src
));
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
STR_WITH_SIZE_TO_VARSTR
(
pWrite
,
"NULL"
,
4
);
STR_WITH_SIZE_TO_VARSTR
(
pWrite
,
src
,
strlen
(
src
)
);
cols
++
;
}
}
...
...
src/os/linux/CMakeLists.txt
浏览文件 @
a5b1ba1b
...
...
@@ -12,3 +12,5 @@ IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM))
ADD_LIBRARY
(
os
${
SRC
}
)
TARGET_LINK_LIBRARIES
(
os m rt
)
ENDIF
()
SET_SOURCE_FILES_PROPERTIES
(
src/linuxSysPara.c PROPERTIES COMPILE_FLAGS -w
)
src/os/linux/inc/os.h
浏览文件 @
a5b1ba1b
...
...
@@ -23,13 +23,6 @@ extern "C" {
#include <stdio.h>
#include <stdlib.h>
#ifndef _ALPINE
#include <error.h>
#include <sys/sysctl.h>
#else
#include <linux/sysctl.h>
#endif
#include <argp.h>
#include <arpa/inet.h>
#include <assert.h>
...
...
@@ -82,6 +75,7 @@ extern "C" {
#include <fcntl.h>
#include <sys/utsname.h>
#include <sys/resource.h>
#include <error.h>
#define taosCloseSocket(x) \
{ \
...
...
src/os/linux/inc/tsysctl.h
0 → 100644
浏览文件 @
a5b1ba1b
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* 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/>.
*/
#ifndef TDENGINE_TSYSCTL_H
#define TDENGINE_TSYSCTL_H
#ifdef __cplusplus
extern
"C"
{
#endif
#ifndef _ALPINE
#include <error.h>
#include <sys/sysctl.h>
#else
#include <linux/sysctl.h>
#endif
#endif
src/os/linux/src/linuxSysPara.c
浏览文件 @
a5b1ba1b
...
...
@@ -15,6 +15,7 @@
#define _DEFAULT_SOURCE
#include "os.h"
#include "tsysctl.h"
#include "tconfig.h"
#include "tglobal.h"
#include "tulog.h"
...
...
tests/tsim/src/simExe.c
浏览文件 @
a5b1ba1b
...
...
@@ -119,7 +119,7 @@ char *simGetVariable(SScript *script, char *varName, int varLen) {
int
simExecuteExpression
(
SScript
*
script
,
char
*
exp
)
{
char
*
op1
,
*
op2
,
*
var1
,
*
var2
,
*
var3
,
*
rest
;
int
op1Len
,
op2Len
,
var1Len
,
var2Len
,
var3Len
,
val0
,
val1
;
char
t0
[
512
],
t1
[
512
],
t2
[
512
],
t3
[
512
];
char
t0
[
512
],
t1
[
512
],
t2
[
512
],
t3
[
1024
];
int
result
;
rest
=
paGetToken
(
exp
,
&
var1
,
&
var1Len
);
...
...
@@ -310,14 +310,15 @@ void simStoreSystemContentResult(SScript *script, char *filename) {
bool
simExecuteSystemContentCmd
(
SScript
*
script
,
char
*
option
)
{
char
buf
[
4096
]
=
{
0
};
char
buf1
[
4096
+
512
]
=
{
0
};
char
filename
[
400
]
=
{
0
};
sprintf
(
filename
,
"%s/%s.tmp"
,
tsScriptDir
,
script
->
fileName
);
sprintf
(
buf
,
"cd %s; "
,
tsScriptDir
);
simVisuallizeOption
(
script
,
option
,
buf
+
strlen
(
buf
));
sprintf
(
buf
,
"%s > %s 2>/dev/null"
,
buf
,
filename
);
sprintf
(
buf
1
,
"%s > %s 2>/dev/null"
,
buf
,
filename
);
sprintf
(
script
->
system_exit_code
,
"%d"
,
system
(
buf
));
sprintf
(
script
->
system_exit_code
,
"%d"
,
system
(
buf
1
));
simStoreSystemContentResult
(
script
,
filename
);
script
->
linePos
++
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录