Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
48e379f3
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看板
提交
48e379f3
编写于
4月 27, 2022
作者:
wafwerar
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(shell): memory init error.
上级
a558b445
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
22 addition
and
22 deletion
+22
-22
contrib/CMakeLists.txt
contrib/CMakeLists.txt
+13
-13
source/dnode/mgmt/exe/dmMain.c
source/dnode/mgmt/exe/dmMain.c
+2
-2
source/libs/function/src/tudf.c
source/libs/function/src/tudf.c
+1
-1
source/util/src/tconfig.c
source/util/src/tconfig.c
+6
-6
未找到文件。
contrib/CMakeLists.txt
浏览文件 @
48e379f3
...
...
@@ -110,7 +110,7 @@ execute_process(COMMAND "${CMAKE_COMMAND}" --build .
# ================================================================================================
# googletest
if
(
${
BUILD_TEST
}
)
add_subdirectory
(
googletest
)
add_subdirectory
(
googletest
EXCLUDE_FROM_ALL
)
target_include_directories
(
gtest
PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/cpp-stub/src>
...
...
@@ -143,7 +143,7 @@ set(CMAKE_PROJECT_INCLUDE_BEFORE "${TD_SUPPORT_DIR}/EnableCMP0048.txt.in")
option
(
ENABLE_CJSON_TEST
"Enable building cJSON test"
OFF
)
option
(
CJSON_OVERRIDE_BUILD_SHARED_LIBS
"Override BUILD_SHARED_LIBS with CJSON_BUILD_SHARED_LIBS"
ON
)
option
(
CJSON_BUILD_SHARED_LIBS
"Overrides BUILD_SHARED_LIBS if CJSON_OVERRIDE_BUILD_SHARED_LIBS is enabled"
OFF
)
add_subdirectory
(
cJson
)
add_subdirectory
(
cJson
EXCLUDE_FROM_ALL
)
target_include_directories
(
cjson
# see https://stackoverflow.com/questions/25676277/cmake-target-include-directories-prints-an-error-when-i-try-to-add-the-source
...
...
@@ -152,7 +152,7 @@ target_include_directories(
unset
(
CMAKE_PROJECT_INCLUDE_BEFORE
)
# lz4
add_subdirectory
(
lz4/build/cmake
)
add_subdirectory
(
lz4/build/cmake
EXCLUDE_FROM_ALL
)
target_include_directories
(
lz4_static
PUBLIC
${
CMAKE_CURRENT_SOURCE_DIR
}
/lz4/lib
...
...
@@ -160,7 +160,7 @@ target_include_directories(
# zlib
set
(
CMAKE_PROJECT_INCLUDE_BEFORE
"
${
TD_SUPPORT_DIR
}
/EnableCMP0048.txt.in"
)
add_subdirectory
(
zlib
)
add_subdirectory
(
zlib
EXCLUDE_FROM_ALL
)
target_include_directories
(
zlibstatic
PUBLIC
${
CMAKE_CURRENT_BINARY_DIR
}
/zlib
...
...
@@ -176,7 +176,7 @@ unset(CMAKE_PROJECT_INCLUDE_BEFORE)
# leveldb
if
(
${
BUILD_WITH_LEVELDB
}
)
option
(
LEVELDB_BUILD_TESTS
""
OFF
)
add_subdirectory
(
leveldb
)
add_subdirectory
(
leveldb
EXCLUDE_FROM_ALL
)
target_include_directories
(
leveldb
PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/leveldb/include>
...
...
@@ -192,7 +192,7 @@ if(${BUILD_WITH_ROCKSDB})
option
(
WITH_TOOLS
""
OFF
)
option
(
WITH_LIBURING
""
OFF
)
option
(
ROCKSDB_BUILD_SHARED
"Build shared versions of the RocksDB libraries"
OFF
)
add_subdirectory
(
rocksdb
)
add_subdirectory
(
rocksdb
EXCLUDE_FROM_ALL
)
target_include_directories
(
rocksdb
PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/rocksdb/include>
...
...
@@ -203,7 +203,7 @@ endif(${BUILD_WITH_ROCKSDB})
# To support build on ubuntu: sudo apt-get install libboost-all-dev
if
(
${
BUILD_WITH_LUCENE
}
)
option
(
ENABLE_TEST
"Enable the tests"
OFF
)
add_subdirectory
(
lucene
)
add_subdirectory
(
lucene
EXCLUDE_FROM_ALL
)
target_include_directories
(
lucene++
PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/lucene/include>
...
...
@@ -213,14 +213,14 @@ endif(${BUILD_WITH_LUCENE})
# NuRaft
if
(
${
BUILD_WITH_NURAFT
}
)
add_subdirectory
(
nuraft
)
add_subdirectory
(
nuraft
EXCLUDE_FROM_ALL
)
endif
(
${
BUILD_WITH_NURAFT
}
)
# pthread
if
(
${
BUILD_PTHREAD
}
)
set
(
CMAKE_BUILD_TYPE release
)
add_definitions
(
-DPTW32_STATIC_LIB
)
add_subdirectory
(
pthread
)
add_subdirectory
(
pthread
EXCLUDE_FROM_ALL
)
set_target_properties
(
libpthreadVC3 PROPERTIES OUTPUT_NAME pthread
)
add_library
(
pthread STATIC IMPORTED GLOBAL
)
SET_PROPERTY
(
TARGET pthread PROPERTY IMPORTED_LOCATION
${
LIBRARY_OUTPUT_PATH
}
/pthread.lib
)
...
...
@@ -228,12 +228,12 @@ endif()
# iconv
if
(
${
BUILD_WITH_ICONV
}
)
add_subdirectory
(
iconv
)
add_subdirectory
(
iconv
EXCLUDE_FROM_ALL
)
endif
(
${
BUILD_WITH_ICONV
}
)
# wingetopt
if
(
${
BUILD_WINGETOPT
}
)
add_subdirectory
(
wingetopt
)
add_subdirectory
(
wingetopt
EXCLUDE_FROM_ALL
)
endif
(
${
BUILD_WINGETOPT
}
)
# msvcregex
...
...
@@ -293,7 +293,7 @@ if(${BUILD_WITH_UV})
MESSAGE
(
"Windows need set no-sign-compare"
)
add_compile_options
(
-Wno-sign-compare
)
endif
()
add_subdirectory
(
libuv
)
add_subdirectory
(
libuv
EXCLUDE_FROM_ALL
)
endif
(
${
BUILD_WITH_UV
}
)
# BDB
...
...
@@ -334,5 +334,5 @@ endif(${BUILD_WITH_SQLITE})
# Build test
# ================================================================================================
if
(
${
BUILD_DEPENDENCY_TESTS
}
)
add_subdirectory
(
test
)
add_subdirectory
(
test
EXCLUDE_FROM_ALL
)
endif
(
${
BUILD_DEPENDENCY_TESTS
}
)
source/dnode/mgmt/exe/dmMain.c
浏览文件 @
48e379f3
...
...
@@ -69,8 +69,8 @@ static void dmSetSignalHandle() {
static
int32_t
dmParseArgs
(
int32_t
argc
,
char
const
*
argv
[])
{
int32_t
cmdEnvIndex
=
0
;
if
(
argc
<
2
)
return
0
;
global
.
envCmd
=
taosMemoryMalloc
(
argc
-
1
);
memset
(
global
.
envCmd
,
0
,
argc
-
1
);
global
.
envCmd
=
taosMemoryMalloc
(
(
argc
-
1
)
*
sizeof
(
char
*
)
);
memset
(
global
.
envCmd
,
0
,
(
argc
-
1
)
*
sizeof
(
char
*
)
);
for
(
int32_t
i
=
1
;
i
<
argc
;
++
i
)
{
if
(
strcmp
(
argv
[
i
],
"-c"
)
==
0
)
{
if
(
i
<
argc
-
1
)
{
...
...
source/libs/function/src/tudf.c
浏览文件 @
48e379f3
...
...
@@ -213,7 +213,7 @@ enum {
int32_t
getUdfdPipeName
(
char
*
pipeName
,
int32_t
size
)
{
char
dnodeId
[
8
]
=
{
0
};
size_t
dnodeIdSize
;
size_t
dnodeIdSize
=
sizeof
(
dnodeId
)
;
int32_t
err
=
uv_os_getenv
(
UDF_DNODE_ID_ENV_NAME
,
dnodeId
,
&
dnodeIdSize
);
if
(
err
!=
0
)
{
dnodeId
[
0
]
=
'1'
;
...
...
source/util/src/tconfig.c
浏览文件 @
48e379f3
...
...
@@ -823,7 +823,7 @@ int32_t cfgLoadFromApollUrl(SConfig *pConfig, const char *url) {
}
p
++
;
if
(
mem
cmp
(
url
,
"jsonFile"
,
8
)
==
0
)
{
if
(
strn
cmp
(
url
,
"jsonFile"
,
8
)
==
0
)
{
char
*
filepath
=
p
;
if
(
!
taosCheckExistFile
(
filepath
))
{
uError
(
"fial to load json file: %s"
,
filepath
);
...
...
@@ -893,8 +893,8 @@ int32_t cfgLoadFromApollUrl(SConfig *pConfig, const char *url) {
}
tjsonDelete
(
pJson
);
// } else if (
mem
cmp(url, "jsonUrl", 7) == 0) {
// } else if (
mem
cmp(url, "etcdUrl", 7) == 0) {
// } else if (
strn
cmp(url, "jsonUrl", 7) == 0) {
// } else if (
strn
cmp(url, "etcdUrl", 7) == 0) {
}
else
{
uError
(
"Unsupported url: %s"
,
url
);
return
-
1
;
...
...
@@ -908,7 +908,7 @@ int32_t cfgGetApollUrl(const char **envCmd, const char *envFile, char* apolloUrl
int32_t
index
=
0
;
if
(
envCmd
==
NULL
)
return
0
;
while
(
envCmd
[
index
]
!=
NULL
)
{
if
(
mem
cmp
(
envCmd
[
index
],
"TAOS_APOLLO_URL"
,
14
)
==
0
)
{
if
(
strn
cmp
(
envCmd
[
index
],
"TAOS_APOLLO_URL"
,
14
)
==
0
)
{
char
*
p
=
strchr
(
envCmd
[
index
],
'='
);
if
(
p
!=
NULL
)
{
p
++
;
...
...
@@ -934,7 +934,7 @@ int32_t cfgGetApollUrl(const char **envCmd, const char *envFile, char* apolloUrl
break
;
}
if
(
line
[
_bytes
-
1
]
==
'\n'
)
line
[
_bytes
-
1
]
=
0
;
if
(
mem
cmp
(
line
,
"TAOS_APOLLO_URL"
,
14
)
==
0
)
{
if
(
strn
cmp
(
line
,
"TAOS_APOLLO_URL"
,
14
)
==
0
)
{
char
*
p
=
strchr
(
line
,
'='
);
if
(
p
!=
NULL
)
{
p
++
;
...
...
@@ -975,7 +975,7 @@ int32_t cfgGetApollUrl(const char **envCmd, const char *envFile, char* apolloUrl
break
;
}
if
(
line
[
_bytes
-
1
]
==
'\n'
)
line
[
_bytes
-
1
]
=
0
;
if
(
mem
cmp
(
line
,
"TAOS_APOLLO_URL"
,
14
)
==
0
)
{
if
(
strn
cmp
(
line
,
"TAOS_APOLLO_URL"
,
14
)
==
0
)
{
char
*
p
=
strchr
(
line
,
'='
);
if
(
p
!=
NULL
)
{
p
++
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录