Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
2e5da0dd
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
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看板
提交
2e5da0dd
编写于
11月 03, 2021
作者:
Z
zhanglianlei
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' of
https://github.com/taosdata/TDengine
into develop
上级
89d0cbe4
6124b211
变更
27
展开全部
显示空白变更内容
内联
并排
Showing
27 changed file
with
2753 addition
and
1779 deletion
+2753
-1779
.gitmodules
.gitmodules
+3
-0
CMakeLists.txt
CMakeLists.txt
+20
-0
cmake/define.inc
cmake/define.inc
+8
-2
cmake/input.inc
cmake/input.inc
+2
-0
deps/CMakeLists.txt
deps/CMakeLists.txt
+29
-3
deps/TSZ
deps/TSZ
+0
-1
deps/avro
deps/avro
+1
-0
packaging/cfg/taos.cfg
packaging/cfg/taos.cfg
+3
-0
packaging/check_package.sh
packaging/check_package.sh
+5
-5
packaging/release.sh
packaging/release.sh
+1
-1
packaging/rpm/makerpm.sh
packaging/rpm/makerpm.sh
+1
-1
packaging/tools/check_os.sh
packaging/tools/check_os.sh
+1
-1
packaging/tools/install.sh
packaging/tools/install.sh
+2
-2
packaging/tools/install_power.sh
packaging/tools/install_power.sh
+2
-2
packaging/tools/install_pro.sh
packaging/tools/install_pro.sh
+3
-3
packaging/tools/install_tq.sh
packaging/tools/install_tq.sh
+2
-2
packaging/tools/make_install.sh
packaging/tools/make_install.sh
+36
-9
packaging/tools/post.sh
packaging/tools/post.sh
+2
-2
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+7
-2
src/common/inc/tglobal.h
src/common/inc/tglobal.h
+48
-46
src/common/src/tglobal.c
src/common/src/tglobal.c
+119
-109
src/kit/taosdump/CMakeLists.txt
src/kit/taosdump/CMakeLists.txt
+15
-4
src/kit/taosdump/taosdump.c
src/kit/taosdump/taosdump.c
+2437
-1560
src/plugins/CMakeLists.txt
src/plugins/CMakeLists.txt
+2
-20
src/plugins/http/src/httpContext.c
src/plugins/http/src/httpContext.c
+1
-1
src/util/inc/tconfig.h
src/util/inc/tconfig.h
+2
-1
tests/pytest/insert/special_character_show.py
tests/pytest/insert/special_character_show.py
+1
-2
未找到文件。
.gitmodules
浏览文件 @
2e5da0dd
...
...
@@ -19,3 +19,6 @@
[submodule "src/plugins/blm3"]
path = src/plugins/blm3
url = https://github.com/taosdata/blm3
[submodule "deps/avro"]
path = deps/avro
url = https://github.com/apache/avro
CMakeLists.txt
浏览文件 @
2e5da0dd
...
...
@@ -15,6 +15,26 @@ ELSE ()
CMAKE_MINIMUM_REQUIRED
(
VERSION 3.0
)
ENDIF
()
if
(
NOT WIN32
)
string
(
ASCII 27 Esc
)
set
(
ColourReset
"
${
Esc
}
[m"
)
set
(
ColourBold
"
${
Esc
}
[1m"
)
set
(
Red
"
${
Esc
}
[31m"
)
set
(
Green
"
${
Esc
}
[32m"
)
set
(
Yellow
"
${
Esc
}
[33m"
)
set
(
Blue
"
${
Esc
}
[34m"
)
set
(
Magenta
"
${
Esc
}
[35m"
)
set
(
Cyan
"
${
Esc
}
[36m"
)
set
(
White
"
${
Esc
}
[37m"
)
set
(
BoldRed
"
${
Esc
}
[1;31m"
)
set
(
BoldGreen
"
${
Esc
}
[1;32m"
)
set
(
BoldYellow
"
${
Esc
}
[1;33m"
)
set
(
BoldBlue
"
${
Esc
}
[1;34m"
)
set
(
BoldMagenta
"
${
Esc
}
[1;35m"
)
set
(
BoldCyan
"
${
Esc
}
[1;36m"
)
set
(
BoldWhite
"
${
Esc
}
[1;37m"
)
endif
()
SET
(
TD_ACCOUNT FALSE
)
SET
(
TD_ADMIN FALSE
)
SET
(
TD_GRANT FALSE
)
...
...
cmake/define.inc
浏览文件 @
2e5da0dd
...
...
@@ -128,7 +128,6 @@ IF (TD_APLHINE)
MESSAGE
(
STATUS
"aplhine is defined"
)
ENDIF
()
MESSAGE
(
"before BUILD_HTTP: "
$
{
BUILD_HTTP
})
IF
(
"${BUILD_HTTP}"
STREQUAL
""
)
IF
(
TD_LINUX
)
IF
(
TD_ARM_32
)
...
...
@@ -140,7 +139,6 @@ IF ("${BUILD_HTTP}" STREQUAL "")
SET
(
BUILD_HTTP
"true"
)
ENDIF
()
ENDIF
()
MESSAGE
(
"after BUILD_HTTP: "
$
{
BUILD_HTTP
})
IF
(
$
{
BUILD_HTTP
}
MATCHES
"true"
)
SET
(
TD_BUILD_HTTP
TRUE
)
...
...
@@ -150,6 +148,14 @@ IF (TD_BUILD_HTTP)
ADD_DEFINITIONS
(
-
DHTTP_EMBEDDED
)
ENDIF
()
IF
(
"${AVRO_SUPPORT}"
MATCHES
"true"
)
SET
(
TD_AVRO_SUPPORT
TRUE
)
ENDIF
()
IF
(
TD_AVRO_SUPPORT
)
ADD_DEFINITIONS
(
-
DAVRO_SUPPORT
)
ENDIF
()
IF
(
TD_LINUX
)
ADD_DEFINITIONS
(
-
DLINUX
)
ADD_DEFINITIONS
(
-
D_LINUX
)
...
...
cmake/input.inc
浏览文件 @
2e5da0dd
...
...
@@ -92,6 +92,8 @@ ENDIF ()
SET
(
TD_BUILD_HTTP
FALSE
)
SET
(
TD_AVRO_SUPPORT
FALSE
)
SET
(
TD_MEMORY_SANITIZER
FALSE
)
IF
(
$
{
MEMORY_SANITIZER
}
MATCHES
"true"
)
SET
(
TD_MEMORY_SANITIZER
TRUE
)
...
...
deps/CMakeLists.txt
浏览文件 @
2e5da0dd
...
...
@@ -25,10 +25,36 @@ IF (TD_DARWIN AND TD_MQTT)
ADD_SUBDIRECTORY
(
MQTT-C
)
ENDIF
()
IF
(
AVRO_SUPPORT
)
MESSAGE
(
""
)
MESSAGE
(
"
${
Green
}
ENABLE avro format support
${
ColourReset
}
"
)
MESSAGE
(
""
)
include
(
ExternalProject
)
ExternalProject_Add
(
apache-avro
PREFIX
"avro"
SOURCE_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/avro/lang/c
BUILD_IN_SOURCE 1
PATCH_COMMAND
COMMAND git clean -f -d
COMMAND sed -i.bak -e
"/TARGETS avroappend/d"
${
CMAKE_CURRENT_SOURCE_DIR
}
/avro/lang/c/src/CMakeLists.txt
COMMAND sed -i.bak -e
"/TARGETS avrocat/d"
${
CMAKE_CURRENT_SOURCE_DIR
}
/avro/lang/c/src/CMakeLists.txt
COMMAND sed -i.bak -e
"/TARGETS avromod/d"
${
CMAKE_CURRENT_SOURCE_DIR
}
/avro/lang/c/src/CMakeLists.txt
COMMAND sed -i.bak -e
"/TARGETS avropipe/d"
${
CMAKE_CURRENT_SOURCE_DIR
}
/avro/lang/c/src/CMakeLists.txt
CONFIGURE_COMMAND cmake -DCMAKE_INSTALL_PREFIX:PATH=
${
CMAKE_BINARY_DIR
}
/build
)
ELSE
()
MESSAGE
(
""
)
MESSAGE
(
"
${
Yellow
}
NO avro format support
${
ColourReset
}
"
)
MESSAGE
(
""
)
ENDIF
()
IF
(
TD_LINUX_64 AND JEMALLOC_ENABLED
)
MESSAGE
(
""
)
MESSAGE
(
"
${
Green
}
ENABLE jemalloc
${
ColourReset
}
"
)
MESSAGE
(
""
)
MESSAGE
(
"setup deps/jemalloc, current source dir:"
${
CMAKE_CURRENT_SOURCE_DIR
}
)
MESSAGE
(
"binary dir:"
${
CMAKE_BINARY_DIR
}
)
include
(
ExternalProject
)
ExternalProject_Add
(
jemalloc
PREFIX
"jemalloc"
SOURCE_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/jemalloc
...
...
TSZ
@
0ca5b15a
比较
0ca5b15a
...
0ca5b15a
Subproject commit 0ca5b15a8eac40327dd737be52c926fa5675712c
avro
@
a1fce29d
Subproject commit a1fce29d9675b4dd95dfee9db32cc505d0b2227c
packaging/cfg/taos.cfg
浏览文件 @
2e5da0dd
...
...
@@ -203,6 +203,9 @@ keepColumnName 1
# database name must be specified in restful interface if the following parameter is set, off by default
# httpDbNameMandatory 1
# http keep alive, default is 30 seconds
# httpKeepAlive 30000
# The following parameter is used to limit the maximum number of lines in log files.
# max number of lines per log filters
# numOfLogLines 10000000
...
...
packaging/check_package.sh
浏览文件 @
2e5da0dd
...
...
@@ -128,12 +128,12 @@ function check_link() {
function
check_main_path
()
{
#check install main dir and all sub dir
main_dir
=(
""
"cfg"
"bin"
"connector"
"driver"
"examples"
"include"
"init.d"
)
for
i
in
${
main_dir
[@]
}
;
do
for
i
in
"
${
main_dir
[@]
}
"
;
do
check_file
${
install_main_dir
}
$i
done
if
[
"
$verMode
"
==
"cluster"
]
;
then
nginx_main_dir
=(
"admin"
"conf"
"html"
"sbin"
"logs"
)
for
i
in
${
nginx_main_dir
[@]
}
;
do
for
i
in
"
${
nginx_main_dir
[@]
}
"
;
do
check_file
${
nginx_dir
}
$i
done
fi
...
...
@@ -143,11 +143,11 @@ function check_main_path() {
function
check_bin_path
()
{
# check install bin dir and all sub dir
bin_dir
=(
"taos"
"taosd"
"blm3"
"taosdemo"
"taosdump"
"remove.sh"
"tarbitrator"
"set_core.sh"
)
for
i
in
${
bin_dir
[@]
}
;
do
for
i
in
"
${
bin_dir
[@]
}
"
;
do
check_file
${
sbin_dir
}
$i
done
lbin_dir
=(
"taos"
"taosd"
"blm3"
"taosdemo"
"taosdump"
"rmtaos"
"tarbitrator"
"set_core"
)
for
i
in
${
lbin_dir
[@]
}
;
do
for
i
in
"
${
lbin_dir
[@]
}
"
;
do
check_link
${
bin_link_dir
}
/
$i
done
if
[
"
$verMode
"
==
"cluster"
]
;
then
...
...
@@ -171,7 +171,7 @@ function check_lib_path() {
function
check_header_path
()
{
# check all header
header_dir
=(
"taos.h"
"taoserror.h"
)
for
i
in
${
header_dir
[@]
}
;
do
for
i
in
"
${
header_dir
[@]
}
"
;
do
check_link
${
inc_link_dir
}
/
$i
done
echo
-e
"Check bin path:
\0
33[32mOK
\0
33[0m!"
...
...
packaging/release.sh
浏览文件 @
2e5da0dd
...
...
@@ -151,7 +151,7 @@ function vercomp () {
}
# 1. check version information
if
(
(
!
is_valid_version
$verNumber
)
||
(
!
is_valid_version
$verNumberComp
)
||
[[
"
$(
vercomp
$verNumber
$verNumberComp
)
"
==
'2'
]]
)
;
then
if
(
(
!
is_valid_version
$verNumber
)
||
(
!
is_valid_version
$verNumberComp
)
||
[[
"
$(
vercomp
$verNumber
$verNumberComp
)
"
==
'2'
]]
)
;
then
echo
"please enter correct version"
exit
0
fi
...
...
packaging/rpm/makerpm.sh
浏览文件 @
2e5da0dd
...
...
@@ -36,7 +36,7 @@ local cur_dir
cd
$1
cur_dir
=
$(
pwd
)
for
dirlist
in
$(
ls
${
cur_dir
}
)
;
do
for
dirlist
in
"
$(
ls
${
cur_dir
}
)
"
;
do
if
test
-d
${
dirlist
}
;
then
cd
${
dirlist
}
cp_rpm_package
${
cur_dir
}
/
${
dirlist
}
...
...
packaging/tools/check_os.sh
浏览文件 @
2e5da0dd
#
/bin/bash
#
!
/bin/bash
#
CSI
=
$(
echo
-e
"
\0
33["
)
CRED
=
"
${
CSI
}
1;31m"
...
...
packaging/tools/install.sh
浏览文件 @
2e5da0dd
...
...
@@ -303,7 +303,7 @@ function add_newHostname_to_hosts() {
iphost
=
$(
cat
/etc/hosts |
grep
$1
|
awk
'{print $1}'
)
arr
=(
$iphost
)
IFS
=
"
$OLD_IFS
"
for
s
in
${
arr
[@]
}
for
s
in
"
${
arr
[@]
}
"
do
if
[[
"
$s
"
==
"
$localIp
"
]]
;
then
return
...
...
@@ -358,7 +358,7 @@ function is_correct_ipaddr() {
IFS
=
" "
arr
=(
$iplist
)
IFS
=
"
$OLD_IFS
"
for
s
in
${
arr
[@]
}
for
s
in
"
${
arr
[@]
}
"
do
if
[[
"
$s
"
==
"
$newIp
"
]]
;
then
return
0
...
...
packaging/tools/install_power.sh
浏览文件 @
2e5da0dd
...
...
@@ -287,7 +287,7 @@ function add_newHostname_to_hosts() {
iphost
=
$(
cat
/etc/hosts |
grep
$1
|
awk
'{print $1}'
)
arr
=(
$iphost
)
IFS
=
"
$OLD_IFS
"
for
s
in
${
arr
[@]
}
for
s
in
"
${
arr
[@]
}
"
do
if
[[
"
$s
"
==
"
$localIp
"
]]
;
then
return
...
...
@@ -342,7 +342,7 @@ function is_correct_ipaddr() {
IFS
=
" "
arr
=(
$iplist
)
IFS
=
"
$OLD_IFS
"
for
s
in
${
arr
[@]
}
for
s
in
"
${
arr
[@]
}
"
do
if
[[
"
$s
"
==
"
$newIp
"
]]
;
then
return
0
...
...
packaging/tools/install_pro.sh
浏览文件 @
2e5da0dd
...
...
@@ -278,7 +278,7 @@ function add_newHostname_to_hosts() {
iphost
=
$(
cat
/etc/hosts |
grep
$1
|
awk
'{print $1}'
)
arr
=(
$iphost
)
IFS
=
"
$OLD_IFS
"
for
s
in
${
arr
[@]
}
for
s
in
"
${
arr
[@]
}
"
do
if
[[
"
$s
"
==
"
$localIp
"
]]
;
then
return
...
...
@@ -330,7 +330,7 @@ function is_correct_ipaddr() {
IFS
=
" "
arr
=(
$iplist
)
IFS
=
"
$OLD_IFS
"
for
s
in
${
arr
[@]
}
for
s
in
"
${
arr
[@]
}
"
do
if
[[
"
$s
"
==
"
$newIp
"
]]
;
then
return
0
...
...
packaging/tools/install_tq.sh
浏览文件 @
2e5da0dd
...
...
@@ -287,7 +287,7 @@ function add_newHostname_to_hosts() {
iphost
=
$(
cat
/etc/hosts |
grep
$1
|
awk
'{print $1}'
)
arr
=(
$iphost
)
IFS
=
"
$OLD_IFS
"
for
s
in
${
arr
[@]
}
for
s
in
"
${
arr
[@]
}
"
do
if
[[
"
$s
"
==
"
$localIp
"
]]
;
then
return
...
...
@@ -342,7 +342,7 @@ function is_correct_ipaddr() {
IFS
=
" "
arr
=(
$iplist
)
IFS
=
"
$OLD_IFS
"
for
s
in
${
arr
[@]
}
for
s
in
"
${
arr
[@]
}
"
do
if
[[
"
$s
"
==
"
$newIp
"
]]
;
then
return
0
...
...
packaging/tools/make_install.sh
浏览文件 @
2e5da0dd
...
...
@@ -212,7 +212,8 @@ function install_jemalloc() {
fi
if
[
-f
"
${
binary_dir
}
/build/include/jemalloc/jemalloc.h"
]
;
then
/usr/bin/install
-c
-d
/usr/local/include/jemalloc
/usr/bin/install
-c
-m
644
${
binary_dir
}
/build/include/jemalloc/jemalloc.h /usr/local/include/jemalloc
/usr/bin/install
-c
-m
644
${
binary_dir
}
/build/include/jemalloc/jemalloc.h
\
/usr/local/include/jemalloc
fi
if
[
-f
"
${
binary_dir
}
/build/lib/libjemalloc.so.2"
]
;
then
/usr/bin/install
-c
-d
/usr/local/lib
...
...
@@ -225,25 +226,49 @@ function install_jemalloc() {
/usr/bin/install
-c
-m
755
${
binary_dir
}
/build/lib/libjemalloc_pic.a /usr/local/lib
if
[
-f
"
${
binary_dir
}
/build/lib/pkgconfig/jemalloc.pc"
]
;
then
/usr/bin/install
-c
-d
/usr/local/lib/pkgconfig
/usr/bin/install
-c
-m
644
${
binary_dir
}
/build/lib/pkgconfig/jemalloc.pc /usr/local/lib/pkgconfig
/usr/bin/install
-c
-m
644
${
binary_dir
}
/build/lib/pkgconfig/jemalloc.pc
\
/usr/local/lib/pkgconfig
fi
if
[
-d
/etc/ld.so.conf.d
]
;
then
echo
"/usr/local/lib"
|
${
csudo
}
tee
/etc/ld.so.conf.d/jemalloc.conf
${
csudo
}
ldconfig
else
echo
"/etc/ld.so.conf.d not found!"
fi
fi
if
[
-f
"
${
binary_dir
}
/build/share/doc/jemalloc/jemalloc.html"
]
;
then
/usr/bin/install
-c
-d
/usr/local/share/doc/jemalloc
/usr/bin/install
-c
-m
644
${
binary_dir
}
/build/share/doc/jemalloc/jemalloc.html /usr/local/share/doc/jemalloc
/usr/bin/install
-c
-m
644
${
binary_dir
}
/build/share/doc/jemalloc/jemalloc.html
\
/usr/local/share/doc/jemalloc
fi
if
[
-f
"
${
binary_dir
}
/build/share/man/man3/jemalloc.3"
]
;
then
/usr/bin/install
-c
-d
/usr/local/share/man/man3
/usr/bin/install
-c
-m
644
${
binary_dir
}
/build/share/man/man3/jemalloc.3 /usr/local/share/man/man3
/usr/bin/install
-c
-m
644
${
binary_dir
}
/build/share/man/man3/jemalloc.3
\
/usr/local/share/man/man3
fi
fi
}
function
install_avro
()
{
if
[
"
$osType
"
!=
"Darwin"
]
;
then
if
[
-f
"
${
binary_dir
}
/build/
$1
/libavro.so.23.0.0"
]
;
then
/usr/bin/install
-c
-d
/usr/local/
$1
/usr/bin/install
-c
-m
755
${
binary_dir
}
/build/
$1
/libavro.so.23.0.0 /usr/local/
$1
ln
-sf
libavro.so.23.0.0 /usr/local/
$1
/libavro.so.23
ln
-sf
libavro.so.23 /usr/local/
$1
/libavro.so
/usr/bin/install
-c
-d
/usr/local/
$1
[
-f
${
binary_dir
}
/build/
$1
/libavro.a
]
&&
/usr/bin/install
-c
-m
755
${
binary_dir
}
/build/
$1
/libavro.a /usr/local/
$1
if
[
-d
/etc/ld.so.conf.d
]
;
then
echo
"/usr/local/lib"
|
${
csudo
}
tee
/etc/ld.so.conf.d/jemalloc
.conf
echo
"/usr/local/
$1
"
|
${
csudo
}
tee
/etc/ld.so.conf.d/libavro
.conf
${
csudo
}
ldconfig
else
echo
"/etc/ld.so.conf.d not found!"
fi
fi
fi
}
function
install_lib
()
{
...
...
@@ -292,6 +317,8 @@ function install_lib() {
fi
install_jemalloc
install_avro lib
install_avro lib64
if
[
"
$osType
"
!=
"Darwin"
]
;
then
${
csudo
}
ldconfig
...
...
packaging/tools/post.sh
浏览文件 @
2e5da0dd
...
...
@@ -127,7 +127,7 @@ function add_newHostname_to_hosts() {
iphost
=
$(
cat
/etc/hosts |
grep
$1
|
awk
'{print $1}'
)
arr
=(
$iphost
)
IFS
=
"
$OLD_IFS
"
for
s
in
${
arr
[@]
}
for
s
in
"
${
arr
[@]
}
"
do
if
[[
"
$s
"
==
"
$localIp
"
]]
;
then
return
...
...
@@ -182,7 +182,7 @@ function is_correct_ipaddr() {
IFS
=
" "
arr
=(
$iplist
)
IFS
=
"
$OLD_IFS
"
for
s
in
${
arr
[@]
}
for
s
in
"
${
arr
[@]
}
"
do
if
[[
"
$s
"
==
"
$newIp
"
]]
;
then
return
0
...
...
src/client/src/tscSQLParser.c
浏览文件 @
2e5da0dd
...
...
@@ -2454,6 +2454,7 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col
const
char
*
msg12
=
"parameter is out of range [1, 100]"
;
const
char
*
msg13
=
"parameter list required"
;
const
char
*
msg14
=
"third parameter algorithm must be 'default' or 't-digest'"
;
const
char
*
msg15
=
"parameter is out of range [1, 1000]"
;
switch
(
functionId
)
{
case
TSDB_FUNC_COUNT
:
{
...
...
@@ -2901,11 +2902,15 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col
}
}
}
else
if
(
functionId
==
TSDB_FUNC_MAVG
||
functionId
==
TSDB_FUNC_SAMPLE
)
{
if
(
pVariant
->
nType
!=
TSDB_DATA_TYPE_BIGINT
)
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg2
);
}
tVariantDump
(
pVariant
,
val
,
TSDB_DATA_TYPE_BIGINT
,
true
);
int64_t
numRowsSelected
=
GET_INT
32
_VAL
(
val
);
int64_t
numRowsSelected
=
GET_INT
64
_VAL
(
val
);
if
(
numRowsSelected
<=
0
||
numRowsSelected
>
1000
)
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg1
2
);
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg1
5
);
}
// todo REFACTOR
...
...
src/common/inc/tglobal.h
浏览文件 @
2e5da0dd
...
...
@@ -64,10 +64,11 @@ extern int32_t tsCompressColData;
extern
int32_t
tsMaxNumOfDistinctResults
;
extern
char
tsTempDir
[];
//query buffer management
//
query buffer management
extern
int32_t
tsQueryBufferSize
;
// maximum allowed usage buffer size in MB for each data node during query processing
extern
int64_t
tsQueryBufferSizeBytes
;
// maximum allowed usage buffer size in byte for each data node during query processing
extern
int32_t
tsRetrieveBlockingModel
;
// retrieve threads will be blocked
extern
int64_t
tsQueryBufferSizeBytes
;
// maximum allowed usage buffer size in byte for each data node during query processing
extern
int32_t
tsRetrieveBlockingModel
;
// retrieve threads will be blocked
extern
int8_t
tsKeepOriginalColumnName
;
...
...
@@ -108,7 +109,7 @@ extern int32_t tsQuorum;
extern
int8_t
tsUpdate
;
extern
int8_t
tsCacheLastRow
;
//tsdb
//
tsdb
extern
bool
tsdbForceKeepFile
;
extern
bool
tsdbForceCompactFile
;
extern
int32_t
tsdbWalFlushSize
;
...
...
@@ -134,6 +135,7 @@ extern int8_t tsHttpEnableCompress;
extern
int8_t
tsHttpEnableRecordSql
;
extern
int8_t
tsTelegrafUseFieldNum
;
extern
int8_t
tsHttpDbNameMandatory
;
extern
int32_t
tsHttpKeepAlive
;
// mqtt
extern
int8_t
tsEnableMqttModule
;
...
...
src/common/src/tglobal.c
浏览文件 @
2e5da0dd
...
...
@@ -14,18 +14,18 @@
*/
#define _DEFAULT_SOURCE
#include "tglobal.h"
#include "monitor.h"
#include "os.h"
#include "taosdef.h"
#include "taoserror.h"
#include "t
ulog
.h"
#include "t
compare
.h"
#include "tconfig.h"
#include "tglobal.h"
#include "monitor.h"
#include "tsocket.h"
#include "tutil.h"
#include "tlocale.h"
#include "tsocket.h"
#include "ttimezone.h"
#include "tcompare.h"
#include "tulog.h"
#include "tutil.h"
// cluster
char
tsFirst
[
TSDB_EP_LEN
]
=
{
0
};
...
...
@@ -51,7 +51,7 @@ int64_t tsDnodeStartTime = 0;
// common
int32_t
tsRpcTimer
=
300
;
int32_t
tsRpcMaxTime
=
600
;
// seconds;
int32_t
tsRpcForceTcp
=
0
;
//
disable this, means query, show command use udp protocol as default
int32_t
tsRpcForceTcp
=
0
;
//
disable this, means query, show command use udp protocol as default
int32_t
tsMaxShellConns
=
50000
;
int32_t
tsMaxConnections
=
5000
;
int32_t
tsShellActivityTimer
=
3
;
// second
...
...
@@ -109,7 +109,7 @@ int32_t tsMaxStreamComputDelay = 20000;
int32_t
tsStreamCompStartDelay
=
10000
;
// the stream computing delay time after executing failed, change accordingly
int32_t
tsRetryStreamCompDelay
=
10
*
1000
;
int32_t
tsRetryStreamCompDelay
=
10
*
1000
;
// The delayed computing ration. 10% of the whole computing time window by default.
float
tsStreamComputDelayRatio
=
0
.
1
f
;
...
...
@@ -180,6 +180,7 @@ int8_t tsHttpEnableCompress = 1;
int8_t
tsHttpEnableRecordSql
=
0
;
int8_t
tsTelegrafUseFieldNum
=
0
;
int8_t
tsHttpDbNameMandatory
=
0
;
int32_t
tsHttpKeepAlive
=
30000
;
// mqtt
int8_t
tsEnableMqttModule
=
0
;
// not finished yet, not started it by default
...
...
@@ -274,7 +275,8 @@ int8_t tsClientMerge = 0;
//
// lossy compress 6
//
char
lossyColumns
[
32
]
=
""
;
// "float|double" means all float and double columns can be lossy compressed. set empty can close lossy compress.
char
lossyColumns
[
32
]
=
""
;
// "float|double" means all float and double columns can be lossy compressed. set empty
// can close lossy compress.
// below option can take effect when tsLossyColumns not empty
double
fPrecision
=
1E-8
;
// float column precision
double
dPrecision
=
1E-16
;
// double column precision
...
...
@@ -326,7 +328,8 @@ bool taosCfgDynamicOptions(char *msg) {
int32_t
vint
=
0
;
paGetToken
(
msg
,
&
option
,
&
olen
);
if
(
olen
==
0
)
return
false
;;
if
(
olen
==
0
)
return
false
;
;
paGetToken
(
option
+
olen
+
1
,
&
value
,
&
vlen
);
if
(
vlen
==
0
)
...
...
@@ -339,7 +342,7 @@ bool taosCfgDynamicOptions(char *msg) {
for
(
int32_t
i
=
0
;
i
<
tsGlobalConfigNum
;
++
i
)
{
SGlobalCfg
*
cfg
=
tsGlobalConfig
+
i
;
//if (!(cfg->cfgType & TSDB_CFG_CTYPE_B_LOG)) continue;
//
if (!(cfg->cfgType & TSDB_CFG_CTYPE_B_LOG)) continue;
if
(
cfg
->
valType
!=
TAOS_CFG_VTYPE_INT32
&&
cfg
->
valType
!=
TAOS_CFG_VTYPE_INT8
)
continue
;
int32_t
cfgLen
=
(
int32_t
)
strlen
(
cfg
->
option
);
...
...
@@ -427,7 +430,7 @@ static void taosCheckDataDirCfg() {
}
static
int32_t
taosCheckTmpDir
(
void
)
{
if
(
strlen
(
tsTempDir
)
<=
0
){
if
(
strlen
(
tsTempDir
)
<=
0
)
{
uError
(
"tempDir is not set"
);
return
-
1
;
}
...
...
@@ -577,8 +580,8 @@ static void doInitGlobalConfig(void) {
cfg
.
ptr
=
&
tsMaxNumOfDistinctResults
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
|
TSDB_CFG_CTYPE_B_CLIENT
;
cfg
.
minValue
=
10
*
10000
;
cfg
.
maxValue
=
10000
*
10000
;
cfg
.
minValue
=
10
*
10000
;
cfg
.
maxValue
=
10000
*
10000
;
cfg
.
ptrLength
=
0
;
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
...
...
@@ -1320,6 +1323,17 @@ static void doInitGlobalConfig(void) {
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
// pContext in cache
cfg
.
option
=
"httpKeepAlive"
;
cfg
.
ptr
=
&
tsHttpKeepAlive
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
;
cfg
.
minValue
=
3000
;
cfg
.
maxValue
=
3600000
;
cfg
.
ptrLength
=
0
;
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
// debug flag
cfg
.
option
=
"numOfLogLines"
;
cfg
.
ptr
=
&
tsNumOfLogLines
;
...
...
@@ -1401,7 +1415,6 @@ static void doInitGlobalConfig(void) {
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"sdbDebugFlag"
;
cfg
.
ptr
=
&
sdbDebugFlag
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
...
...
@@ -1731,12 +1744,9 @@ static void doInitGlobalConfig(void) {
#else
assert
(
tsGlobalConfigNum
<
TSDB_CFG_MAX_NUM
);
#endif
}
void
taosInitGlobalCfg
()
{
pthread_once
(
&
tsInitGlobalCfgOnce
,
doInitGlobalConfig
);
}
void
taosInitGlobalCfg
()
{
pthread_once
(
&
tsInitGlobalCfgOnce
,
doInitGlobalConfig
);
}
int32_t
taosCheckGlobalCfg
()
{
char
fqdn
[
TSDB_FQDN_LEN
];
...
...
@@ -1794,8 +1804,8 @@ int32_t taosCheckGlobalCfg() {
}
if
(
tsMaxTablePerVnode
<
tsMinTablePerVnode
)
{
uError
(
"maxTablesPerVnode(%d) < minTablesPerVnode(%d), reset to minTablesPerVnode(%d)"
,
tsMaxTablePerVnode
,
tsMinTablePerVnode
,
tsMinTablePerVnode
);
uError
(
"maxTablesPerVnode(%d) < minTablesPerVnode(%d), reset to minTablesPerVnode(%d)"
,
tsMaxTablePerVnode
,
tsMinTablePerVnode
,
tsMinTablePerVnode
);
tsMaxTablePerVnode
=
tsMinTablePerVnode
;
}
...
...
@@ -1839,7 +1849,7 @@ int taosGetFqdnPortFromEp(const char *ep, char *fqdn, uint16_t *port) {
char
*
temp
=
strchr
(
fqdn
,
':'
);
if
(
temp
)
{
*
temp
=
0
;
*
port
=
atoi
(
temp
+
1
);
*
port
=
atoi
(
temp
+
1
);
}
if
(
*
port
==
0
)
{
...
...
src/kit/taosdump/CMakeLists.txt
浏览文件 @
2e5da0dd
...
...
@@ -3,6 +3,7 @@ PROJECT(TDengine)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/client/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/query/inc
)
INCLUDE_DIRECTORIES
(
${
CMAKE_BINARY_DIR
}
/build/include
)
INCLUDE_DIRECTORIES
(
inc
)
AUX_SOURCE_DIRECTORY
(
. SRC
)
...
...
@@ -61,12 +62,22 @@ ENDIF ()
MESSAGE
(
"TD_VERSION_NUMBER is:"
${
TD_VERSION_NUMBER
}
)
ADD_DEFINITIONS
(
-DTD_VERNUMBER=
"
${
TD_VERSION_NUMBER
}
"
)
LINK_DIRECTORIES
(
${
CMAKE_BINARY_DIR
}
/build/lib
${
CMAKE_BINARY_DIR
}
/build/lib64
)
IF
(
TD_LINUX
)
ADD_EXECUTABLE
(
taosdump
${
SRC
}
)
IF
(
TD_SOMODE_STATIC
)
TARGET_LINK_LIBRARIES
(
taosdump taos_static cJson
)
IF
(
AVRO_SUPPORT
)
TARGET_LINK_LIBRARIES
(
taosdump taos_static avro jansson
)
ELSE
()
TARGET_LINK_LIBRARIES
(
taosdump taos_static
)
ENDIF
()
ELSE
()
TARGET_LINK_LIBRARIES
(
taosdump taos cJson
)
IF
(
AVRO_SUPPORT
)
TARGET_LINK_LIBRARIES
(
taosdump taos avro jansson
)
ELSE
()
TARGET_LINK_LIBRARIES
(
taosdump taos
)
ENDIF
()
ENDIF
()
ENDIF
()
...
...
@@ -74,8 +85,8 @@ IF (TD_DARWIN)
# missing <argp.h> for macosx
# ADD_EXECUTABLE(taosdump ${SRC})
# IF (TD_SOMODE_STATIC)
# TARGET_LINK_LIBRARIES(taosdump taos_static
cJ
son)
# TARGET_LINK_LIBRARIES(taosdump taos_static
jans
son)
# ELSE ()
# TARGET_LINK_LIBRARIES(taosdump taos
cJ
son)
# TARGET_LINK_LIBRARIES(taosdump taos
jans
son)
# ENDIF ()
ENDIF
()
src/kit/taosdump/taosdump.c
浏览文件 @
2e5da0dd
此差异已折叠。
点击以展开。
src/plugins/CMakeLists.txt
浏览文件 @
2e5da0dd
CMAKE_MINIMUM_REQUIRED
(
VERSION 3.0...3.20
)
PROJECT
(
TDengine
)
if
(
NOT WIN32
)
string
(
ASCII 27 Esc
)
set
(
ColourReset
"
${
Esc
}
[m"
)
set
(
ColourBold
"
${
Esc
}
[1m"
)
set
(
Red
"
${
Esc
}
[31m"
)
set
(
Green
"
${
Esc
}
[32m"
)
set
(
Yellow
"
${
Esc
}
[33m"
)
set
(
Blue
"
${
Esc
}
[34m"
)
set
(
Magenta
"
${
Esc
}
[35m"
)
set
(
Cyan
"
${
Esc
}
[36m"
)
set
(
White
"
${
Esc
}
[37m"
)
set
(
BoldRed
"
${
Esc
}
[1;31m"
)
set
(
BoldGreen
"
${
Esc
}
[1;32m"
)
set
(
BoldYellow
"
${
Esc
}
[1;33m"
)
set
(
BoldBlue
"
${
Esc
}
[1;34m"
)
set
(
BoldMagenta
"
${
Esc
}
[1;35m"
)
set
(
BoldCyan
"
${
Esc
}
[1;36m"
)
set
(
BoldWhite
"
${
Esc
}
[1;37m"
)
endif
()
ADD_SUBDIRECTORY
(
monitor
)
IF
(
TD_BUILD_HTTP
)
...
...
@@ -57,6 +37,8 @@ ELSE ()
DEPENDS taos
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND cmake -E echo
"blm3 no need cmake to config"
PATCH_COMMAND
COMMAND git clean -f -d
BUILD_COMMAND CGO_CFLAGS=-I
${
CMAKE_CURRENT_SOURCE_DIR
}
/../inc CGO_LDFLAGS=-L
${
CMAKE_BINARY_DIR
}
/build/lib go build -ldflags
"-s -w -X github.com/taosdata/blm3/version.CommitID=
${
blm3_commit_sha1
}
"
INSTALL_COMMAND cmake -E copy blm3
${
CMAKE_BINARY_DIR
}
/build/bin COMMAND cmake -E make_directory
${
CMAKE_BINARY_DIR
}
/test/cfg/ COMMAND cmake -E copy ./example/config/blm.toml
${
CMAKE_BINARY_DIR
}
/test/cfg/
)
...
...
src/plugins/http/src/httpContext.c
浏览文件 @
2e5da0dd
...
...
@@ -123,7 +123,7 @@ HttpContext *httpCreateContext(SOCKET fd) {
TSDB_CACHE_PTR_TYPE
handleVal
=
(
TSDB_CACHE_PTR_TYPE
)
pContext
;
HttpContext
**
ppContext
=
taosCachePut
(
tsHttpServer
.
contextCache
,
&
handleVal
,
sizeof
(
TSDB_CACHE_PTR_TYPE
),
&
pContext
,
sizeof
(
TSDB_CACHE_PTR_TYPE
),
3000
);
sizeof
(
TSDB_CACHE_PTR_TYPE
),
tsHttpKeepAlive
);
pContext
->
ppContext
=
ppContext
;
httpDebug
(
"context:%p, fd:%d, is created, data:%p"
,
pContext
,
fd
,
ppContext
);
...
...
src/util/inc/tconfig.h
浏览文件 @
2e5da0dd
...
...
@@ -20,7 +20,8 @@
extern
"C"
{
#endif
#define TSDB_CFG_MAX_NUM 128
#define TSDB_CFG_MAX_NUM 129
#define TSDB_CFG_PRINT_LEN 23
#define TSDB_CFG_OPTION_LEN 24
#define TSDB_CFG_VALUE_LEN 41
...
...
tests/pytest/insert/special_character_show.py
浏览文件 @
2e5da0dd
...
...
@@ -31,9 +31,8 @@ class TDTestCase:
tdLog
.
info
(
'create table stb1 (ts timestamp, value double) tags (bin binary(128))'
)
tdSql
.
execute
(
'create table stb1 (ts timestamp, value double) tags (bin binary(128))'
)
tdLog
.
info
(
'=============== step2,create table
增加了转义字符
'
)
tdLog
.
info
(
'=============== step2,create table
with escape character
'
)
tdLog
.
info
(
'create table tb1 using stb1 tags("abc
\\
"def")'
)
#增加了转义字符\
tdSql
.
execute
(
'create table tb1 using stb1 tags("abc
\\
"def")'
)
tdLog
.
info
(
'=============== step3,insert data'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录