Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Cherenkov effect
TDengine
提交
73516d5d
T
TDengine
项目概览
Cherenkov effect
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
2
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
73516d5d
编写于
11月 11, 2019
作者:
S
slguan
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/develop' into release/v1.6.4.0
上级
2a11363e
e54df4d7
变更
39
隐藏空白更改
内联
并排
Showing
39 changed file
with
153 addition
and
174 deletion
+153
-174
CMakeLists.txt
CMakeLists.txt
+39
-7
src/client/CMakeLists.txt
src/client/CMakeLists.txt
+1
-1
src/client/src/TSDBJNIConnector.c
src/client/src/TSDBJNIConnector.c
+0
-2
src/client/src/tscAst.c
src/client/src/tscAst.c
+0
-6
src/client/src/tscAsync.c
src/client/src/tscAsync.c
+1
-2
src/client/src/tscCache.c
src/client/src/tscCache.c
+1
-8
src/client/src/tscFunctionImpl.c
src/client/src/tscFunctionImpl.c
+53
-32
src/client/src/tscJoinProcess.c
src/client/src/tscJoinProcess.c
+0
-7
src/client/src/tscLocal.c
src/client/src/tscLocal.c
+1
-3
src/client/src/tscParseInsert.c
src/client/src/tscParseInsert.c
+1
-15
src/client/src/tscPrepare.c
src/client/src/tscPrepare.c
+0
-3
src/client/src/tscProfile.c
src/client/src/tscProfile.c
+1
-4
src/client/src/tscSQLParserImpl.c
src/client/src/tscSQLParserImpl.c
+0
-7
src/client/src/tscSchemaUtil.c
src/client/src/tscSchemaUtil.c
+0
-4
src/client/src/tscSecondaryMerge.c
src/client/src/tscSecondaryMerge.c
+1
-6
src/client/src/tscServer.c
src/client/src/tscServer.c
+3
-9
src/client/src/tscSql.c
src/client/src/tscSql.c
+0
-3
src/client/src/tscSub.c
src/client/src/tscSub.c
+1
-1
src/client/src/tscSyntaxtreefunction.c
src/client/src/tscSyntaxtreefunction.c
+1
-4
src/client/src/tscSystem.c
src/client/src/tscSystem.c
+0
-9
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+0
-4
src/inc/ttimer.h
src/inc/ttimer.h
+1
-1
src/kit/shell/CMakeLists.txt
src/kit/shell/CMakeLists.txt
+1
-1
src/kit/taosdemo/CMakeLists.txt
src/kit/taosdemo/CMakeLists.txt
+1
-1
src/kit/taosdump/CMakeLists.txt
src/kit/taosdump/CMakeLists.txt
+1
-1
src/modules/http/CMakeLists.txt
src/modules/http/CMakeLists.txt
+1
-1
src/modules/monitor/CMakeLists.txt
src/modules/monitor/CMakeLists.txt
+1
-1
src/os/linux/CMakeLists.txt
src/os/linux/CMakeLists.txt
+1
-1
src/os/linux/inc/os.h
src/os/linux/inc/os.h
+21
-20
src/rpc/CMakeLists.txt
src/rpc/CMakeLists.txt
+1
-1
src/sdb/CMakeLists.txt
src/sdb/CMakeLists.txt
+2
-2
src/system/detail/CMakeLists.txt
src/system/detail/CMakeLists.txt
+1
-1
src/system/detail/src/mgmtMeter.c
src/system/detail/src/mgmtMeter.c
+1
-0
src/system/detail/src/vnodeQueryImpl.c
src/system/detail/src/vnodeQueryImpl.c
+9
-0
src/system/detail/src/vnodeRead.c
src/system/detail/src/vnodeRead.c
+2
-1
src/system/detail/src/vnodeShell.c
src/system/detail/src/vnodeShell.c
+1
-1
src/system/lite/CMakeLists.txt
src/system/lite/CMakeLists.txt
+1
-1
src/util/CMakeLists.txt
src/util/CMakeLists.txt
+1
-1
src/util/src/version.c
src/util/src/version.c
+2
-2
未找到文件。
CMakeLists.txt
浏览文件 @
73516d5d
...
...
@@ -38,8 +38,9 @@ IF (NOT DEFINED TD_CLUSTER)
# Set macro definitions according to os platform
SET
(
TD_LINUX_64 FALSE
)
SET
(
TD_LINUX_32 FALSE
)
SET
(
TD_ARM_64 FALSE
)
SET
(
TD_ARM_32 FALSE
)
SET
(
_TD_ARM_ FALSE
)
SET
(
_TD_ARM_64 FALSE
)
SET
(
_TD_ARM_32 FALSE
)
SET
(
TD_MIPS_64 FALSE
)
SET
(
TD_DARWIN_64 FALSE
)
SET
(
TD_WINDOWS_64 FALSE
)
...
...
@@ -50,9 +51,18 @@ IF (NOT DEFINED TD_CLUSTER)
SET
(
TD_OS_DIR
${
TD_COMMUNITY_DIR
}
/src/os/linux
)
ADD_DEFINITIONS
(
-D_M_X64
)
MESSAGE
(
STATUS
"The current platform is Linux 64-bit"
)
ELSE
()
ELSEIF
(
${
CMAKE_SIZEOF_VOID_P
}
MATCHES 4
)
IF
(
_TD_ARM_
)
SET
(
TD_LINUX_32 TRUE
)
MESSAGE
(
FATAL_ERROR
"The current platform is Linux 32-bit, not supported yet"
)
SET
(
TD_OS_DIR
${
TD_COMMUNITY_DIR
}
/src/os/linux
)
#ADD_DEFINITIONS(-D_M_IX86)
MESSAGE
(
STATUS
"The current platform is Linux 32-bit"
)
ELSE
()
MESSAGE
(
FATAL_ERROR
"The current platform is Linux 32-bit, but no ARM not supported yet"
)
EXIT
()
ENDIF
()
ELSE
()
MESSAGE
(
FATAL_ERROR
"The current platform is Linux neither 32-bit nor 64-bit, not supported yet"
)
EXIT
()
ENDIF
()
ELSEIF
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"Darwin"
)
...
...
@@ -102,13 +112,27 @@ IF (NOT DEFINED TD_CLUSTER)
IF
(
TD_LINUX_64
)
SET
(
DEBUG_FLAGS
"-O0 -DDEBUG"
)
SET
(
RELEASE_FLAGS
"-O0"
)
IF
(
${
CMAKE_CXX_COMPILER_ID
}
MATCHES
"Clang"
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -fPIC -malign-double -g -Wno-char-subscripts -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
IF
(
NOT _TD_ARM_
)
IF
(
${
CMAKE_CXX_COMPILER_ID
}
MATCHES
"Clang"
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -fPIC -malign-double -g -Wno-char-subscripts -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ELSE
()
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -fPIC -malign-double -g -Wno-char-subscripts -malign-stringops -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ENDIF
()
ELSE
()
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -fPIC -
malign-double -g -Wno-char-subscripts -malign-stringops -msse4.2
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -fPIC -
g -Wno-char-subscripts -fsigned-char -munaligned-access -fpack-struct=8
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ENDIF
()
ADD_DEFINITIONS
(
-DLINUX
)
ADD_DEFINITIONS
(
-D_REENTRANT -D__USE_POSIX -D_LIBC_REENTRANT
)
ELSEIF
(
TD_LINUX_32
)
IF
(
NOT _TD_ARM_
)
EXIT
()
ENDIF
()
SET
(
DEBUG_FLAGS
"-O0 -DDEBUG"
)
SET
(
RELEASE_FLAGS
"-O0"
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -fPIC -g -Wno-char-subscripts -fsigned-char -munaligned-access -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ADD_DEFINITIONS
(
-DLINUX
)
ADD_DEFINITIONS
(
-D_REENTRANT -D__USE_POSIX -D_LIBC_REENTRANT
)
ADD_DEFINITIONS
(
-DUSE_LIBICONV
)
ELSEIF
(
TD_WINDOWS_64
)
SET
(
CMAKE_GENERATOR
"NMake Makefiles"
CACHE INTERNAL
""
FORCE
)
SET
(
COMMON_FLAGS
"/nologo /WX- /Oi /Oy- /Gm- /EHsc /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Gd /errorReport:prompt /analyze-"
)
...
...
@@ -169,6 +193,14 @@ IF (NOT DEFINED TD_CLUSTER)
INSTALL
(
CODE
"MESSAGE(
\"
make install script:
${
TD_MAKE_INSTALL_SH
}
\"
)"
)
INSTALL
(
CODE
"execute_process(COMMAND chmod 777
${
TD_MAKE_INSTALL_SH
}
)"
)
INSTALL
(
CODE
"execute_process(COMMAND
${
TD_MAKE_INSTALL_SH
}
${
TD_COMMUNITY_DIR
}
${
PROJECT_BINARY_DIR
}
)"
)
ELSEIF
(
TD_LINUX_32
)
IF
(
NOT _TD_ARM_
)
EXIT
()
ENDIF
()
SET
(
TD_MAKE_INSTALL_SH
"
${
TD_COMMUNITY_DIR
}
/packaging/tools/make_install.sh"
)
INSTALL
(
CODE
"MESSAGE(
\"
make install script:
${
TD_MAKE_INSTALL_SH
}
\"
)"
)
INSTALL
(
CODE
"execute_process(COMMAND chmod 777
${
TD_MAKE_INSTALL_SH
}
)"
)
INSTALL
(
CODE
"execute_process(COMMAND
${
TD_MAKE_INSTALL_SH
}
${
TD_COMMUNITY_DIR
}
${
PROJECT_BINARY_DIR
}
)"
)
ELSEIF
(
TD_WINDOWS_64
)
SET
(
CMAKE_INSTALL_PREFIX C:/TDengine
)
INSTALL
(
DIRECTORY
${
TD_COMMUNITY_DIR
}
/src/connector/go DESTINATION connector
)
...
...
src/client/CMakeLists.txt
浏览文件 @
73516d5d
...
...
@@ -7,7 +7,7 @@ INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/inc)
INCLUDE_DIRECTORIES
(
${
TD_OS_DIR
}
/inc
)
AUX_SOURCE_DIRECTORY
(
./src SRC
)
IF
(
TD_LINUX_64
)
IF
(
(
TD_LINUX_64
)
OR
(
TD_LINUX_32 AND _TD_ARM_
)
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/deps/jni/linux
)
# set the static lib name
...
...
src/client/src/TSDBJNIConnector.c
浏览文件 @
73516d5d
...
...
@@ -13,8 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdbool.h>
#include "os.h"
#include "com_taosdata_jdbc_TSDBJNIConnector.h"
#include "taos.h"
...
...
src/client/src/tscAst.c
浏览文件 @
73516d5d
...
...
@@ -13,12 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <assert.h>
#include <float.h>
#include <math.h>
#include <stdbool.h>
#include <stdlib.h>
#include "os.h"
#include "taosmsg.h"
#include "tast.h"
...
...
src/client/src/tscAsync.c
浏览文件 @
73516d5d
...
...
@@ -13,8 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <stdlib.h>
#include "os.h"
#include "tlog.h"
#include "trpc.h"
...
...
src/client/src/tscCache.c
浏览文件 @
73516d5d
...
...
@@ -13,14 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <assert.h>
#include <pthread.h>
#include <semaphore.h>
#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "os.h"
#include "tglobalcfg.h"
#include "tlog.h"
...
...
src/client/src/tscFunctionImpl.c
浏览文件 @
73516d5d
...
...
@@ -15,16 +15,6 @@
#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
#include <assert.h>
#include <ctype.h>
#include <fcntl.h>
#include <float.h>
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <wctype.h>
#include "os.h"
#include "taosmsg.h"
#include "tast.h"
...
...
@@ -3786,10 +3776,11 @@ static void getStatics_i64(int64_t *primaryKey, int64_t *data, int32_t numOfRow,
static
void
getStatics_f
(
int64_t
*
primaryKey
,
float
*
data
,
int32_t
numOfRow
,
double
*
min
,
double
*
max
,
double
*
sum
,
int16_t
*
minIndex
,
int16_t
*
maxIndex
,
int32_t
*
numOfNull
)
{
*
min
=
DBL_MAX
;
*
max
=
-
DBL_MAX
;
*
minIndex
=
0
;
*
maxIndex
=
0
;
float
fmin
=
DBL_MAX
;
float
fmax
=
-
DBL_MAX
;
float
fminIndex
=
0
;
float
fmaxIndex
=
0
;
double
dsum
=
0
;
assert
(
numOfRow
<=
INT16_MAX
);
...
...
@@ -3799,15 +3790,19 @@ static void getStatics_f(int64_t *primaryKey, float *data, int32_t numOfRow, dou
continue
;
}
*
sum
+=
data
[
i
];
if
(
*
min
>
data
[
i
])
{
*
min
=
data
[
i
];
*
minIndex
=
i
;
float
fv
=
0
;
*
(
int32_t
*
)(
&
fv
)
=
*
(
int32_t
*
)(
&
(
data
[
i
]));
//*sum += data[i];
dsum
+=
fv
;
if
(
fmin
>
fv
)
{
fmin
=
fv
;
fminIndex
=
i
;
}
if
(
*
max
<
data
[
i
]
)
{
*
max
=
data
[
i
]
;
*
maxIndex
=
i
;
if
(
fmax
<
fv
)
{
fmax
=
fv
;
f
maxIndex
=
i
;
}
// if (isNull(&lastVal, TSDB_DATA_TYPE_FLOAT)) {
...
...
@@ -3819,14 +3814,26 @@ static void getStatics_f(int64_t *primaryKey, float *data, int32_t numOfRow, dou
// lastVal = data[i];
// }
}
double
csum
=
0
;
*
(
int64_t
*
)(
&
csum
)
=
*
(
int64_t
*
)
sum
;
csum
+=
dsum
;
*
(
int64_t
*
)(
sum
)
=
*
(
int64_t
*
)(
&
csum
);
*
(
int32_t
*
)
max
=
*
(
int32_t
*
)(
&
fmax
);
*
(
int32_t
*
)
min
=
*
(
int32_t
*
)(
&
fmin
);
*
(
int32_t
*
)
minIndex
=
*
(
int32_t
*
)(
&
fminIndex
);
*
(
int32_t
*
)
maxIndex
=
*
(
int32_t
*
)(
&
fmaxIndex
);
}
static
void
getStatics_d
(
int64_t
*
primaryKey
,
double
*
data
,
int32_t
numOfRow
,
double
*
min
,
double
*
max
,
double
*
sum
,
int16_t
*
minIndex
,
int16_t
*
maxIndex
,
int32_t
*
numOfNull
)
{
*
min
=
DBL_MAX
;
*
max
=
-
DBL_MAX
;
*
minIndex
=
0
;
*
maxIndex
=
0
;
double
dmin
=
DBL_MAX
;
double
dmax
=
-
DBL_MAX
;
double
dminIndex
=
0
;
double
dmaxIndex
=
0
;
double
dsum
=
0
;
assert
(
numOfRow
<=
INT16_MAX
);
...
...
@@ -3839,15 +3846,19 @@ static void getStatics_d(int64_t *primaryKey, double *data, int32_t numOfRow, do
continue
;
}
*
sum
+=
data
[
i
];
if
(
*
min
>
data
[
i
])
{
*
min
=
data
[
i
];
*
minIndex
=
i
;
double
dv
=
0
;
*
(
int64_t
*
)(
&
dv
)
=
*
(
int64_t
*
)(
&
(
data
[
i
]));
//*sum += data[i];
dsum
+=
dv
;
if
(
dmin
>
dv
)
{
dmin
=
dv
;
dminIndex
=
i
;
}
if
(
*
max
<
data
[
i
]
)
{
*
max
=
data
[
i
]
;
*
maxIndex
=
i
;
if
(
dmax
<
dv
)
{
dmax
=
dv
;
d
maxIndex
=
i
;
}
// if (isNull(&lastVal, TSDB_DATA_TYPE_DOUBLE)) {
...
...
@@ -3859,6 +3870,16 @@ static void getStatics_d(int64_t *primaryKey, double *data, int32_t numOfRow, do
// lastVal = data[i];
// }
}
double
csum
=
0
;
*
(
int64_t
*
)(
&
csum
)
=
*
(
int64_t
*
)
sum
;
csum
+=
dsum
;
*
(
int64_t
*
)(
sum
)
=
*
(
int64_t
*
)(
&
csum
);
*
(
int64_t
*
)
max
=
*
(
int64_t
*
)(
&
dmax
);
*
(
int64_t
*
)
min
=
*
(
int64_t
*
)(
&
dmin
);
*
(
int64_t
*
)
minIndex
=
*
(
int64_t
*
)(
&
dminIndex
);
*
(
int64_t
*
)
maxIndex
=
*
(
int64_t
*
)(
&
dmaxIndex
);
}
void
getStatistics
(
char
*
priData
,
char
*
data
,
int32_t
size
,
int32_t
numOfRow
,
int32_t
type
,
int64_t
*
min
,
int64_t
*
max
,
...
...
src/client/src/tscJoinProcess.c
浏览文件 @
73516d5d
...
...
@@ -13,13 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <fcntl.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <tsclient.h>
#include <sys/stat.h>
#include "os.h"
#include "tcache.h"
#include "tscJoinProcess.h"
...
...
src/client/src/tscLocal.c
浏览文件 @
73516d5d
...
...
@@ -13,9 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "os.h"
#include "taosmsg.h"
#include "tcache.h"
...
...
src/client/src/tscParseInsert.c
浏览文件 @
73516d5d
...
...
@@ -21,22 +21,8 @@
#pragma GCC diagnostic ignored "-Woverflow"
#pragma GCC diagnostic ignored "-Wunused-variable"
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <sys/types.h>
#include <assert.h>
#include <float.h>
#include <math.h>
#include <string.h>
#include <time.h>
#include <wchar.h>
#include "ihash.h"
#include "os.h"
#include "ihash.h"
#include "tscSecondaryMerge.h"
#include "tscUtil.h"
#include "tschemautil.h"
...
...
src/client/src/tscPrepare.c
浏览文件 @
73516d5d
...
...
@@ -13,9 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <stdlib.h>
#include "taos.h"
#include "tsclient.h"
#include "tsql.h"
...
...
src/client/src/tscProfile.c
浏览文件 @
73516d5d
...
...
@@ -13,9 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <stdlib.h>
#include "os.h"
#include "tlog.h"
#include "tsclient.h"
...
...
@@ -96,7 +93,7 @@ void tscSaveSlowQuery(SSqlObj *pSql) {
const
static
int64_t
SLOW_QUERY_INTERVAL
=
3000000L
;
if
(
pSql
->
res
.
useconds
<
SLOW_QUERY_INTERVAL
)
return
;
tscTrace
(
"%p query time:%ld sql:%s"
,
pSql
,
pSql
->
res
.
useconds
,
pSql
->
sqlstr
);
tscTrace
(
"%p query time:%l
l
d 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
,
...
...
src/client/src/tscSQLParserImpl.c
浏览文件 @
73516d5d
...
...
@@ -13,13 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <stdarg.h>
#include "os.h"
#include "tglobalcfg.h"
#include "tsql.h"
...
...
src/client/src/tscSchemaUtil.c
浏览文件 @
73516d5d
...
...
@@ -13,10 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "os.h"
#include "taosmsg.h"
#include "tschemautil.h"
...
...
src/client/src/tscSecondaryMerge.c
浏览文件 @
73516d5d
...
...
@@ -13,13 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <assert.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
#include <tsclient.h>
#include "
tlosertree
.h"
#include "
os
.h"
#include "tlosertree.h"
#include "tscSecondaryMerge.h"
#include "tscUtil.h"
...
...
src/client/src/tscServer.c
浏览文件 @
73516d5d
...
...
@@ -13,12 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <assert.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>
#include "os.h"
#include "tcache.h"
#include "trpc.h"
...
...
@@ -2848,7 +2842,7 @@ int tscBuildMetricMetaMsg(SSqlObj *pSql) {
return
msgLen
;
}
int
tscEstimate
Build
HeartBeatMsgLength
(
SSqlObj
*
pSql
)
{
int
tscEstimateHeartBeatMsgLength
(
SSqlObj
*
pSql
)
{
int
size
=
0
;
STscObj
*
pObj
=
pSql
->
pTscObj
;
...
...
@@ -2881,7 +2875,7 @@ int tscBuildHeartBeatMsg(SSqlObj *pSql) {
pthread_mutex_lock
(
&
pObj
->
mutex
);
size
=
tscEstimate
Build
HeartBeatMsgLength
(
pSql
);
size
=
tscEstimateHeartBeatMsgLength
(
pSql
);
if
(
TSDB_CODE_SUCCESS
!=
tscAllocPayload
(
pCmd
,
size
))
{
tscError
(
"%p failed to malloc for heartbeat msg"
,
pSql
);
return
-
1
;
...
...
@@ -3613,7 +3607,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:%d, addr:%p"
,
pSql
,
tscTrace
(
"%p metric query not update metric meta, numOfTags:%d, numOfCols:%d, uid:%
ll
d, addr:%p"
,
pSql
,
pMeterMetaInfo
->
pMeterMeta
->
numOfTags
,
pCmd
->
numOfCols
,
pMeterMetaInfo
->
pMeterMeta
->
uid
,
pMeterMetaInfo
->
pMeterMeta
);
}
...
...
src/client/src/tscSql.c
浏览文件 @
73516d5d
...
...
@@ -13,9 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <stdlib.h>
#include "os.h"
#include "tcache.h"
#include "tlog.h"
...
...
src/client/src/tscSub.c
浏览文件 @
73516d5d
...
...
@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include
<signal.h>
#include
"os.h"
#include "shash.h"
#include "taos.h"
...
...
src/client/src/tscSyntaxtreefunction.c
浏览文件 @
73516d5d
...
...
@@ -13,10 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <assert.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "os.h"
#include "tscSyntaxtreefunction.h"
#include "tsql.h"
...
...
src/client/src/tscSystem.c
浏览文件 @
73516d5d
...
...
@@ -13,15 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <locale.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
#include "os.h"
#include "taosmsg.h"
#include "tcache.h"
...
...
src/client/src/tscUtil.c
浏览文件 @
73516d5d
...
...
@@ -13,10 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <assert.h>
#include <math.h>
#include <time.h>
#include "os.h"
#include "ihash.h"
#include "taosmsg.h"
...
...
src/inc/ttimer.h
浏览文件 @
73516d5d
...
...
@@ -41,7 +41,7 @@ extern int taosTmrThreads;
tprintf("TMR ", tmrDebugFlag, __VA_ARGS__); \
} } while(0)
#define MAX_NUM_OF_TMRCTL
3
2
#define MAX_NUM_OF_TMRCTL
51
2
#define MSECONDS_PER_TICK 5
void
*
taosTmrInit
(
int
maxTmr
,
int
resoultion
,
int
longest
,
const
char
*
label
);
...
...
src/kit/shell/CMakeLists.txt
浏览文件 @
73516d5d
...
...
@@ -6,7 +6,7 @@ INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/client/inc)
INCLUDE_DIRECTORIES
(
${
TD_OS_DIR
}
/inc
)
INCLUDE_DIRECTORIES
(
inc
)
IF
(
TD_LINUX_64
)
IF
(
(
TD_LINUX_64
)
OR
(
TD_LINUX_32 AND _TD_ARM_
)
)
AUX_SOURCE_DIRECTORY
(
./src SRC
)
LIST
(
REMOVE_ITEM SRC ./src/shellWindows.c
)
ADD_EXECUTABLE
(
shell
${
SRC
}
)
...
...
src/kit/taosdemo/CMakeLists.txt
浏览文件 @
73516d5d
...
...
@@ -6,7 +6,7 @@ INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/client/inc)
INCLUDE_DIRECTORIES
(
${
TD_OS_DIR
}
/inc
)
INCLUDE_DIRECTORIES
(
inc
)
IF
(
TD_LINUX_64
)
IF
(
(
TD_LINUX_64
)
OR
(
TD_LINUX_32 AND _TD_ARM_
)
)
AUX_SOURCE_DIRECTORY
(
. SRC
)
ADD_EXECUTABLE
(
taosdemo
${
SRC
}
)
TARGET_LINK_LIBRARIES
(
taosdemo taos_static
)
...
...
src/kit/taosdump/CMakeLists.txt
浏览文件 @
73516d5d
...
...
@@ -6,7 +6,7 @@ INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/client/inc)
INCLUDE_DIRECTORIES
(
${
TD_OS_DIR
}
/inc
)
INCLUDE_DIRECTORIES
(
inc
)
IF
(
TD_LINUX_64
)
IF
(
(
TD_LINUX_64
)
OR
(
TD_LINUX_32 AND _TD_ARM_
)
)
AUX_SOURCE_DIRECTORY
(
. SRC
)
ADD_EXECUTABLE
(
taosdump
${
SRC
}
)
TARGET_LINK_LIBRARIES
(
taosdump taos_static
)
...
...
src/modules/http/CMakeLists.txt
浏览文件 @
73516d5d
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.8
)
PROJECT
(
TDengine
)
IF
(
TD_LINUX_64
)
IF
(
(
TD_LINUX_64
)
OR
(
TD_LINUX_32 AND _TD_ARM_
)
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/client/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/deps/zlib-1.2.11/inc
)
...
...
src/modules/monitor/CMakeLists.txt
浏览文件 @
73516d5d
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.8
)
PROJECT
(
TDengine
)
IF
(
TD_LINUX_64
)
IF
(
(
TD_LINUX_64
)
OR
(
TD_LINUX_32 AND _TD_ARM_
)
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/client/inc
)
INCLUDE_DIRECTORIES
(
${
TD_OS_DIR
}
/inc
)
...
...
src/os/linux/CMakeLists.txt
浏览文件 @
73516d5d
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.8
)
PROJECT
(
TDengine
)
IF
(
TD_LINUX_64
)
IF
(
(
TD_LINUX_64
)
OR
(
TD_LINUX_32 AND _TD_ARM_
)
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/inc
)
INCLUDE_DIRECTORIES
(
inc
)
AUX_SOURCE_DIRECTORY
(
src SRC
)
...
...
src/os/linux/inc/os.h
浏览文件 @
73516d5d
/*
* 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/>.
*/
* 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_PLATFORM_LINUX_H
#define TDENGINE_PLATFORM_LINUX_H
...
...
@@ -25,10 +25,12 @@ extern "C" {
#include <arpa/inet.h>
#include <assert.h>
#include <dirent.h>
#include <endian.h>
#include <float.h>
#include <ifaddrs.h>
#include <limits.h>
#include <locale.h>
#include <math.h>
#include <netdb.h>
#include <netinet/in.h>
...
...
@@ -37,7 +39,8 @@ extern "C" {
#include <netinet/udp.h>
#include <pthread.h>
#include <pwd.h>
#include <stdbool.h>
#include <semaphore.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
...
...
@@ -45,21 +48,19 @@ extern "C" {
#include <sys/epoll.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/sendfile.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/time.h>
#include <sys/uio.h>
#include <sys/mman.h>
#include <sys/un.h>
#include <syslog.h>
#include <termios.h>
#include <unistd.h>
#include <wchar.h>
#include <wordexp.h>
#include <locale.h>
#include <dirent.h>
#define taosCloseSocket(x) \
{ \
...
...
@@ -110,7 +111,7 @@ extern "C" {
#define __sync_sub_and_fetch_ptr __sync_sub_and_fetch
int32_t
__sync_val_load_32
(
int32_t
*
ptr
);
void
__sync_val_restore_32
(
int32_t
*
ptr
,
int32_t
newval
);
void
__sync_val_restore_32
(
int32_t
*
ptr
,
int32_t
newval
);
#define SWAP(a, b, c) \
do { \
...
...
@@ -168,9 +169,9 @@ bool taosSkipSocketCheck();
int64_t
str2int64
(
char
*
str
);
#define BUILDIN_CLZL(val) __builtin_clzl(val)
#define BUILDIN_CLZ(val)
__builtin_clz(val)
#define BUILDIN_CLZ(val) __builtin_clz(val)
#define BUILDIN_CTZL(val) __builtin_ctzl(val)
#define BUILDIN_CTZ(val)
__builtin_ctz(val)
#define BUILDIN_CTZ(val) __builtin_ctz(val)
#ifdef __cplusplus
}
...
...
src/rpc/CMakeLists.txt
浏览文件 @
73516d5d
...
...
@@ -5,7 +5,7 @@ INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/inc)
INCLUDE_DIRECTORIES
(
${
TD_OS_DIR
}
/inc
)
INCLUDE_DIRECTORIES
(
inc
)
IF
(
TD_LINUX_64
)
IF
(
(
TD_LINUX_64
)
OR
(
TD_LINUX_32 AND _TD_ARM_
)
)
AUX_SOURCE_DIRECTORY
(
./src SRC
)
ELSEIF
(
TD_DARWIN_64
)
LIST
(
APPEND SRC ./src/thaship.c
)
...
...
src/sdb/CMakeLists.txt
浏览文件 @
73516d5d
...
...
@@ -5,11 +5,11 @@ INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/inc)
INCLUDE_DIRECTORIES
(
${
TD_OS_DIR
}
/inc
)
INCLUDE_DIRECTORIES
(
inc
)
IF
(
TD_LINUX_64
)
IF
(
(
TD_LINUX_64
)
OR
(
TD_LINUX_32 AND _TD_ARM_
)
)
AUX_SOURCE_DIRECTORY
(
src SRC
)
ADD_LIBRARY
(
sdb
${
SRC
}
)
TARGET_LINK_LIBRARIES
(
sdb trpc
)
IF
(
TD_CLUSTER
)
TARGET_LINK_LIBRARIES
(
sdb sdb_cluster
)
ENDIF
()
ENDIF
()
\ No newline at end of file
ENDIF
()
src/system/detail/CMakeLists.txt
浏览文件 @
73516d5d
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.8
)
PROJECT
(
TDengine
)
IF
(
TD_LINUX_64
)
IF
(
(
TD_LINUX_64
)
OR
(
TD_LINUX_32 AND _TD_ARM_
)
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/client/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/modules/http/inc
)
...
...
src/system/detail/src/mgmtMeter.c
浏览文件 @
73516d5d
...
...
@@ -833,6 +833,7 @@ static void removeMeterFromMetricIndex(STabObj *pMetric, STabObj *pMeter) {
}
}
tSkipListDestroyKey
(
&
key
);
if
(
num
!=
0
)
{
free
(
pRes
);
}
...
...
src/system/detail/src/vnodeQueryImpl.c
浏览文件 @
73516d5d
...
...
@@ -3436,9 +3436,18 @@ void pointInterpSupporterSetData(SQInfo *pQInfo, SPointInterpoSupporter *pPointI
if
(
pQuery
->
interpoType
==
TSDB_INTERPO_SET_VALUE
)
{
for
(
int32_t
i
=
0
;
i
<
pQuery
->
numOfOutputCols
;
++
i
)
{
SQLFunctionCtx
*
pCtx
=
&
pRuntimeEnv
->
pCtx
[
i
];
// only the function of interp needs the corresponding information
if
(
pCtx
->
functionId
!=
TSDB_FUNC_INTERP
)
{
continue
;
}
pCtx
->
numOfParams
=
4
;
SInterpInfo
*
pInterpInfo
=
(
SInterpInfo
*
)
pRuntimeEnv
->
pCtx
[
i
].
aOutputBuf
;
pInterpInfo
->
pInterpDetail
=
calloc
(
1
,
sizeof
(
SInterpInfoDetail
));
SInterpInfoDetail
*
pInterpDetail
=
pInterpInfo
->
pInterpDetail
;
// for primary timestamp column, set the flag
...
...
src/system/detail/src/vnodeRead.c
浏览文件 @
73516d5d
...
...
@@ -866,7 +866,8 @@ int vnodeSaveQueryResult(void *handle, char *data, int32_t *size) {
pQInfo
->
pointsRead
);
if
(
pQInfo
->
over
==
0
)
{
dTrace
(
"QInfo:%p set query flag, oldSig:%p, func:%s"
,
pQInfo
,
pQInfo
->
signature
,
__FUNCTION__
);
//dTrace("QInfo:%p set query flag, oldSig:%p, func:%s", pQInfo, pQInfo->signature, __FUNCTION__);
dTrace
(
"QInfo:%p set query flag, oldSig:%p"
,
pQInfo
,
pQInfo
->
signature
);
uint64_t
oldSignature
=
TSDB_QINFO_SET_QUERY_FLAG
(
pQInfo
);
/*
...
...
src/system/detail/src/vnodeShell.c
浏览文件 @
73516d5d
...
...
@@ -419,7 +419,7 @@ void vnodeExecuteRetrieveReq(SSchedMsg *pSched) {
if
(
code
==
TSDB_CODE_SUCCESS
)
{
pRsp
->
offset
=
htobe64
(
vnodeGetOffsetVal
(
pRetrieve
->
qhandle
));
pRsp
->
useconds
=
((
SQInfo
*
)(
pRetrieve
->
qhandle
))
->
useconds
;
pRsp
->
useconds
=
htobe64
(((
SQInfo
*
)(
pRetrieve
->
qhandle
))
->
useconds
)
;
}
else
{
pRsp
->
offset
=
0
;
pRsp
->
useconds
=
0
;
...
...
src/system/lite/CMakeLists.txt
浏览文件 @
73516d5d
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.8
)
PROJECT
(
TDengine
)
IF
(
TD_LINUX_64
)
IF
(
(
TD_LINUX_64
)
OR
(
TD_LINUX_32 AND _TD_ARM_
)
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/client/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/modules/http/inc
)
...
...
src/util/CMakeLists.txt
浏览文件 @
73516d5d
...
...
@@ -4,7 +4,7 @@ PROJECT(TDengine)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/inc
)
INCLUDE_DIRECTORIES
(
${
TD_OS_DIR
}
/inc
)
IF
(
TD_LINUX_64
)
IF
(
(
TD_LINUX_64
)
OR
(
TD_LINUX_32 AND _TD_ARM_
)
)
AUX_SOURCE_DIRECTORY
(
src SRC
)
ADD_LIBRARY
(
tutil
${
SRC
}
)
TARGET_LINK_LIBRARIES
(
tutil pthread os m rt
)
...
...
src/util/src/version.c
浏览文件 @
73516d5d
char
version
[
64
]
=
"1.6.4.0"
;
char
compatible_version
[
64
]
=
"1.6.1.0"
;
char
gitinfo
[
128
]
=
"
869171d2331eb25ba0901e88d33ae627bf5a9d91
"
;
char
buildinfo
[
512
]
=
"Built by
ubuntu at 2019-11-07 22:31
"
;
char
gitinfo
[
128
]
=
"
d04354a8ac2f7dd9ba521d755e5d484a203783d9
"
;
char
buildinfo
[
512
]
=
"Built by
root at 2019-11-11 10:23
"
;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录