Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Rattenking
TDengine
提交
195ce6d1
T
TDengine
项目概览
Rattenking
/
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
195ce6d1
编写于
7月 16, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
差异文件
Merge from master into develop
上级
2d6ad4d8
00a84f9f
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
101 addition
and
46 deletion
+101
-46
packaging/tools/install_client.sh
packaging/tools/install_client.sh
+7
-1
packaging/tools/makeclient.sh
packaging/tools/makeclient.sh
+13
-4
packaging/tools/makeclient_power.sh
packaging/tools/makeclient_power.sh
+47
-14
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+18
-22
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+0
-2
src/query/src/qTsbuf.c
src/query/src/qTsbuf.c
+9
-0
src/tsdb/src/tsdbRead.c
src/tsdb/src/tsdbRead.c
+4
-0
tests/pytest/query/queryPerformance.py
tests/pytest/query/queryPerformance.py
+2
-1
tests/pytest/tools/taosdemoPerformance.py
tests/pytest/tools/taosdemoPerformance.py
+1
-1
tests/pytest/tools/taosdumpTest.py
tests/pytest/tools/taosdumpTest.py
+0
-1
未找到文件。
packaging/tools/install_client.sh
浏览文件 @
195ce6d1
...
@@ -182,7 +182,13 @@ function install_jemalloc() {
...
@@ -182,7 +182,13 @@ function install_jemalloc() {
${
csudo
}
/usr/bin/install
-c
-d
/usr/local/share/man/man3
${
csudo
}
/usr/bin/install
-c
-d
/usr/local/share/man/man3
${
csudo
}
/usr/bin/install
-c
-m
644
${
jemalloc_dir
}
/share/man/man3/jemalloc.3 /usr/local/share/man/man3
${
csudo
}
/usr/bin/install
-c
-m
644
${
jemalloc_dir
}
/share/man/man3/jemalloc.3 /usr/local/share/man/man3
fi
fi
${
csudo
}
ldconfig
if
[
-d
/etc/ld.so.conf.d
]
;
then
${
csudo
}
echo
"/usr/local/lib"
>
/etc/ld.so.conf.d/jemalloc.conf
${
csudo
}
ldconfig
else
echo
"/etc/ld.so.conf.d not found!"
fi
fi
fi
}
}
...
...
packaging/tools/makeclient.sh
浏览文件 @
195ce6d1
...
@@ -41,10 +41,10 @@ fi
...
@@ -41,10 +41,10 @@ fi
if
[
"
$osType
"
!=
"Darwin"
]
;
then
if
[
"
$osType
"
!=
"Darwin"
]
;
then
if
[
"
$pagMode
"
==
"lite"
]
;
then
if
[
"
$pagMode
"
==
"lite"
]
;
then
#strip ${build_dir}/bin/taosd
#strip ${build_dir}/bin/taosd
strip
${
build_dir
}
/bin/taos
strip
${
build_dir
}
/bin/taos
bin_files
=
"
${
build_dir
}
/bin/taos
${
script_dir
}
/remove_client.sh"
bin_files
=
"
${
build_dir
}
/bin/taos
${
script_dir
}
/remove_client.sh"
else
else
bin_files
=
"
${
build_dir
}
/bin/taos
${
build_dir
}
/bin/taosdump
${
build_dir
}
/bin/taosdemo
\
bin_files
=
"
${
build_dir
}
/bin/taos
${
build_dir
}
/bin/taosdump
${
build_dir
}
/bin/taosdemo
\
${
script_dir
}
/remove_client.sh
${
script_dir
}
/set_core.sh
${
script_dir
}
/get_client.sh
${
script_dir
}
/taosd-dump-cfg.gdb"
${
script_dir
}
/remove_client.sh
${
script_dir
}
/set_core.sh
${
script_dir
}
/get_client.sh
${
script_dir
}
/taosd-dump-cfg.gdb"
fi
fi
...
@@ -139,7 +139,7 @@ if [[ "$pagMode" != "lite" ]] && [[ "$cpuType" != "aarch32" ]]; then
...
@@ -139,7 +139,7 @@ if [[ "$pagMode" != "lite" ]] && [[ "$cpuType" != "aarch32" ]]; then
cp
-r
${
examples_dir
}
/C#
${
install_dir
}
/examples
cp
-r
${
examples_dir
}
/C#
${
install_dir
}
/examples
fi
fi
# Copy driver
# Copy driver
mkdir
-p
${
install_dir
}
/driver
mkdir
-p
${
install_dir
}
/driver
cp
${
lib_files
}
${
install_dir
}
/driver
cp
${
lib_files
}
${
install_dir
}
/driver
# Copy connector
# Copy connector
...
@@ -168,7 +168,7 @@ fi
...
@@ -168,7 +168,7 @@ fi
# exit 1
# exit 1
cd
${
release_dir
}
cd
${
release_dir
}
# install_dir has been distinguishes cluster from edege, so comments this code
# install_dir has been distinguishes cluster from edege, so comments this code
pkg_name
=
${
install_dir
}
-
${
osType
}
-
${
cpuType
}
pkg_name
=
${
install_dir
}
-
${
osType
}
-
${
cpuType
}
...
@@ -195,6 +195,15 @@ if [ "$pagMode" == "lite" ]; then
...
@@ -195,6 +195,15 @@ if [ "$pagMode" == "lite" ]; then
pkg_name
=
${
pkg_name
}
-Lite
pkg_name
=
${
pkg_name
}
-Lite
fi
fi
if
[
"
$verType
"
==
"beta"
]
;
then
pkg_name
=
${
pkg_name
}
-
${
verType
}
elif
[
"
$verType
"
==
"stable"
]
;
then
pkg_name
=
${
pkg_name
}
else
echo
"unknow verType, nor stable or beta"
exit
1
fi
if
[
"
$osType
"
!=
"Darwin"
]
;
then
if
[
"
$osType
"
!=
"Darwin"
]
;
then
tar
-zcv
-f
"
$(
basename
${
pkg_name
}
)
.tar.gz"
$(
basename
${
install_dir
}
)
--remove-files
||
:
tar
-zcv
-f
"
$(
basename
${
pkg_name
}
)
.tar.gz"
$(
basename
${
install_dir
}
)
--remove-files
||
:
else
else
...
...
packaging/tools/makeclient_power.sh
浏览文件 @
195ce6d1
...
@@ -41,10 +41,10 @@ fi
...
@@ -41,10 +41,10 @@ fi
if
[
"
$osType
"
!=
"Darwin"
]
;
then
if
[
"
$osType
"
!=
"Darwin"
]
;
then
# if [ "$pagMode" == "lite" ]; then
# if [ "$pagMode" == "lite" ]; then
# strip ${build_dir}/bin/powerd
# strip ${build_dir}/bin/powerd
# strip ${build_dir}/bin/power
# strip ${build_dir}/bin/power
# bin_files="${build_dir}/bin/power ${script_dir}/remove_client_power.sh"
# bin_files="${build_dir}/bin/power ${script_dir}/remove_client_power.sh"
# else
# else
# bin_files="${build_dir}/bin/power ${build_dir}/bin/powerdemo ${script_dir}/remove_client_power.sh ${script_dir}/set_core.sh"
# bin_files="${build_dir}/bin/power ${build_dir}/bin/powerdemo ${script_dir}/remove_client_power.sh ${script_dir}/set_core.sh"
# fi
# fi
lib_files
=
"
${
build_dir
}
/lib/libtaos.so.
${
version
}
"
lib_files
=
"
${
build_dir
}
/lib/libtaos.so.
${
version
}
"
...
@@ -67,6 +67,39 @@ mkdir -p ${install_dir}
...
@@ -67,6 +67,39 @@ mkdir -p ${install_dir}
mkdir
-p
${
install_dir
}
/inc
&&
cp
${
header_files
}
${
install_dir
}
/inc
mkdir
-p
${
install_dir
}
/inc
&&
cp
${
header_files
}
${
install_dir
}
/inc
mkdir
-p
${
install_dir
}
/cfg
&&
cp
${
cfg_dir
}
/taos.cfg
${
install_dir
}
/cfg/taos.cfg
mkdir
-p
${
install_dir
}
/cfg
&&
cp
${
cfg_dir
}
/taos.cfg
${
install_dir
}
/cfg/taos.cfg
if
[
-f
${
build_dir
}
/bin/jemalloc-config
]
;
then
mkdir
-p
${
install_dir
}
/jemalloc/
{
bin,lib,lib/pkgconfig,include/jemalloc,share/doc/jemalloc,share/man/man3
}
cp
${
build_dir
}
/bin/jemalloc-config
${
install_dir
}
/jemalloc/bin
if
[
-f
${
build_dir
}
/bin/jemalloc.sh
]
;
then
cp
${
build_dir
}
/bin/jemalloc.sh
${
install_dir
}
/jemalloc/bin
fi
if
[
-f
${
build_dir
}
/bin/jeprof
]
;
then
cp
${
build_dir
}
/bin/jeprof
${
install_dir
}
/jemalloc/bin
fi
if
[
-f
${
build_dir
}
/include/jemalloc/jemalloc.h
]
;
then
cp
${
build_dir
}
/include/jemalloc/jemalloc.h
${
install_dir
}
/jemalloc/include/jemalloc
fi
if
[
-f
${
build_dir
}
/lib/libjemalloc.so.2
]
;
then
cp
${
build_dir
}
/lib/libjemalloc.so.2
${
install_dir
}
/jemalloc/lib
ln
-sf
libjemalloc.so.2
${
install_dir
}
/jemalloc/lib/libjemalloc.so
fi
if
[
-f
${
build_dir
}
/lib/libjemalloc.a
]
;
then
cp
${
build_dir
}
/lib/libjemalloc.a
${
install_dir
}
/jemalloc/lib
fi
if
[
-f
${
build_dir
}
/lib/libjemalloc_pic.a
]
;
then
cp
${
build_dir
}
/lib/libjemalloc_pic.a
${
install_dir
}
/jemalloc/lib
fi
if
[
-f
${
build_dir
}
/lib/pkgconfig/jemalloc.pc
]
;
then
cp
${
build_dir
}
/lib/pkgconfig/jemalloc.pc
${
install_dir
}
/jemalloc/lib/pkgconfig
fi
if
[
-f
${
build_dir
}
/share/doc/jemalloc/jemalloc.html
]
;
then
cp
${
build_dir
}
/share/doc/jemalloc/jemalloc.html
${
install_dir
}
/jemalloc/share/doc/jemalloc
fi
if
[
-f
${
build_dir
}
/share/man/man3/jemalloc.3
]
;
then
cp
${
build_dir
}
/share/man/man3/jemalloc.3
${
install_dir
}
/jemalloc/share/man/man3
fi
fi
sed
-i
'/dataDir/ {s/taos/power/g}'
${
install_dir
}
/cfg/taos.cfg
sed
-i
'/dataDir/ {s/taos/power/g}'
${
install_dir
}
/cfg/taos.cfg
sed
-i
'/logDir/ {s/taos/power/g}'
${
install_dir
}
/cfg/taos.cfg
sed
-i
'/logDir/ {s/taos/power/g}'
${
install_dir
}
/cfg/taos.cfg
sed
-i
"s/TDengine/PowerDB/g"
${
install_dir
}
/cfg/taos.cfg
sed
-i
"s/TDengine/PowerDB/g"
${
install_dir
}
/cfg/taos.cfg
...
@@ -77,11 +110,11 @@ if [ "$osType" != "Darwin" ]; then
...
@@ -77,11 +110,11 @@ if [ "$osType" != "Darwin" ]; then
strip
${
build_dir
}
/bin/taos
strip
${
build_dir
}
/bin/taos
cp
${
build_dir
}
/bin/taos
${
install_dir
}
/bin/power
cp
${
build_dir
}
/bin/taos
${
install_dir
}
/bin/power
cp
${
script_dir
}
/remove_power.sh
${
install_dir
}
/bin
cp
${
script_dir
}
/remove_power.sh
${
install_dir
}
/bin
else
else
cp
${
build_dir
}
/bin/taos
${
install_dir
}
/bin/power
cp
${
build_dir
}
/bin/taos
${
install_dir
}
/bin/power
cp
${
script_dir
}
/remove_power.sh
${
install_dir
}
/bin
cp
${
script_dir
}
/remove_power.sh
${
install_dir
}
/bin
cp
${
build_dir
}
/bin/taosdemo
${
install_dir
}
/bin/powerdemo
cp
${
build_dir
}
/bin/taosdemo
${
install_dir
}
/bin/powerdemo
cp
${
build_dir
}
/bin/taosdump
${
install_dir
}
/bin/powerdump
cp
${
build_dir
}
/bin/taosdump
${
install_dir
}
/bin/powerdump
cp
${
script_dir
}
/set_core.sh
${
install_dir
}
/bin
cp
${
script_dir
}
/set_core.sh
${
install_dir
}
/bin
cp
${
script_dir
}
/get_client.sh
${
install_dir
}
/bin
cp
${
script_dir
}
/get_client.sh
${
install_dir
}
/bin
cp
${
script_dir
}
/taosd-dump-cfg.gdb
${
install_dir
}
/bin
cp
${
script_dir
}
/taosd-dump-cfg.gdb
${
install_dir
}
/bin
...
@@ -158,15 +191,15 @@ if [[ "$pagMode" != "lite" ]] && [[ "$cpuType" != "aarch32" ]]; then
...
@@ -158,15 +191,15 @@ if [[ "$pagMode" != "lite" ]] && [[ "$cpuType" != "aarch32" ]]; then
cp
-r
${
examples_dir
}
/JDBC
${
install_dir
}
/examples
cp
-r
${
examples_dir
}
/JDBC
${
install_dir
}
/examples
cp
-r
${
examples_dir
}
/matlab
${
install_dir
}
/examples
cp
-r
${
examples_dir
}
/matlab
${
install_dir
}
/examples
sed
-i
'/password/ {s/taosdata/powerdb/g}'
${
install_dir
}
/examples/matlab/TDengineDemo.m
sed
-i
'/password/ {s/taosdata/powerdb/g}'
${
install_dir
}
/examples/matlab/TDengineDemo.m
cp
-r
${
examples_dir
}
/python
${
install_dir
}
/examples
cp
-r
${
examples_dir
}
/python
${
install_dir
}
/examples
sed
-i
'/password/ {s/taosdata/powerdb/g}'
${
install_dir
}
/examples/python/read_example.py
sed
-i
'/password/ {s/taosdata/powerdb/g}'
${
install_dir
}
/examples/python/read_example.py
cp
-r
${
examples_dir
}
/R
${
install_dir
}
/examples
cp
-r
${
examples_dir
}
/R
${
install_dir
}
/examples
sed
-i
'/password/ {s/taosdata/powerdb/g}'
${
install_dir
}
/examples/R/command.txt
sed
-i
'/password/ {s/taosdata/powerdb/g}'
${
install_dir
}
/examples/R/command.txt
cp
-r
${
examples_dir
}
/go
${
install_dir
}
/examples
cp
-r
${
examples_dir
}
/go
${
install_dir
}
/examples
sed
-i
'/root/ {s/taosdata/powerdb/g}'
${
install_dir
}
/examples/go/taosdemo.go
sed
-i
'/root/ {s/taosdata/powerdb/g}'
${
install_dir
}
/examples/go/taosdemo.go
fi
fi
# Copy driver
# Copy driver
mkdir
-p
${
install_dir
}
/driver
mkdir
-p
${
install_dir
}
/driver
cp
${
lib_files
}
${
install_dir
}
/driver
cp
${
lib_files
}
${
install_dir
}
/driver
# Copy connector
# Copy connector
...
@@ -188,11 +221,11 @@ if [[ "$pagMode" != "lite" ]] && [[ "$cpuType" != "aarch32" ]]; then
...
@@ -188,11 +221,11 @@ if [[ "$pagMode" != "lite" ]] && [[ "$cpuType" != "aarch32" ]]; then
echo
"WARNING: go connector not found, please check if want to use it!"
echo
"WARNING: go connector not found, please check if want to use it!"
fi
fi
cp
-r
${
connector_dir
}
/python
${
install_dir
}
/connector
cp
-r
${
connector_dir
}
/python
${
install_dir
}
/connector
sed
-i
'/password/ {s/taosdata/powerdb/g}'
${
install_dir
}
/connector/python/taos/cinterface.py
sed
-i
'/password/ {s/taosdata/powerdb/g}'
${
install_dir
}
/connector/python/taos/cinterface.py
sed
-i
'/password/ {s/taosdata/powerdb/g}'
${
install_dir
}
/connector/python/taos/subscription.py
sed
-i
'/password/ {s/taosdata/powerdb/g}'
${
install_dir
}
/connector/python/taos/subscription.py
sed
-i
'/self._password/ {s/taosdata/powerdb/g}'
${
install_dir
}
/connector/python/taos/connection.py
sed
-i
'/self._password/ {s/taosdata/powerdb/g}'
${
install_dir
}
/connector/python/taos/connection.py
fi
fi
# Copy release note
# Copy release note
...
@@ -200,7 +233,7 @@ fi
...
@@ -200,7 +233,7 @@ fi
# exit 1
# exit 1
cd
${
release_dir
}
cd
${
release_dir
}
if
[
"
$verMode
"
==
"cluster"
]
;
then
if
[
"
$verMode
"
==
"cluster"
]
;
then
pkg_name
=
${
install_dir
}
-
${
osType
}
-
${
cpuType
}
pkg_name
=
${
install_dir
}
-
${
osType
}
-
${
cpuType
}
...
@@ -217,8 +250,8 @@ fi
...
@@ -217,8 +250,8 @@ fi
if
[
"
$verType
"
==
"beta"
]
;
then
if
[
"
$verType
"
==
"beta"
]
;
then
pkg_name
=
${
pkg_name
}
-
${
verType
}
pkg_name
=
${
pkg_name
}
-
${
verType
}
elif
[
"
$verType
"
==
"stable"
]
;
then
elif
[
"
$verType
"
==
"stable"
]
;
then
pkg_name
=
${
pkg_name
}
pkg_name
=
${
pkg_name
}
else
else
echo
"unknow verType, nor stable or beta"
echo
"unknow verType, nor stable or beta"
exit
1
exit
1
...
...
src/client/src/tscSubquery.c
浏览文件 @
195ce6d1
...
@@ -711,6 +711,15 @@ static void updateQueryTimeRange(SQueryInfo* pQueryInfo, STimeWindow* win) {
...
@@ -711,6 +711,15 @@ static void updateQueryTimeRange(SQueryInfo* pQueryInfo, STimeWindow* win) {
pQueryInfo
->
window
=
*
win
;
pQueryInfo
->
window
=
*
win
;
}
}
int32_t
tagValCompar
(
const
void
*
p1
,
const
void
*
p2
)
{
const
STidTags
*
t1
=
(
const
STidTags
*
)
varDataVal
(
p1
);
const
STidTags
*
t2
=
(
const
STidTags
*
)
varDataVal
(
p2
);
__compar_fn_t
func
=
getComparFunc
(
t1
->
padding
,
0
);
return
func
(
t1
->
tag
,
t2
->
tag
);
}
int32_t
tidTagsCompar
(
const
void
*
p1
,
const
void
*
p2
)
{
int32_t
tidTagsCompar
(
const
void
*
p1
,
const
void
*
p2
)
{
const
STidTags
*
t1
=
(
const
STidTags
*
)
(
p1
);
const
STidTags
*
t1
=
(
const
STidTags
*
)
(
p1
);
const
STidTags
*
t2
=
(
const
STidTags
*
)
(
p2
);
const
STidTags
*
t2
=
(
const
STidTags
*
)
(
p2
);
...
@@ -719,28 +728,7 @@ int32_t tidTagsCompar(const void* p1, const void* p2) {
...
@@ -719,28 +728,7 @@ int32_t tidTagsCompar(const void* p1, const void* p2) {
return
(
t1
->
vgId
>
t2
->
vgId
)
?
1
:
-
1
;
return
(
t1
->
vgId
>
t2
->
vgId
)
?
1
:
-
1
;
}
}
tstr
*
tag1
=
(
tstr
*
)
t1
->
tag
;
return
tagValCompar
(
p1
,
p2
);
tstr
*
tag2
=
(
tstr
*
)
t2
->
tag
;
if
(
tag1
->
len
!=
tag2
->
len
)
{
return
(
tag1
->
len
>
tag2
->
len
)
?
1
:
-
1
;
}
return
strncmp
(
tag1
->
data
,
tag2
->
data
,
tag1
->
len
);
}
int32_t
tagValCompar
(
const
void
*
p1
,
const
void
*
p2
)
{
const
STidTags
*
t1
=
(
const
STidTags
*
)
varDataVal
(
p1
);
const
STidTags
*
t2
=
(
const
STidTags
*
)
varDataVal
(
p2
);
tstr
*
tag1
=
(
tstr
*
)
t1
->
tag
;
tstr
*
tag2
=
(
tstr
*
)
t2
->
tag
;
if
(
tag1
->
len
!=
tag2
->
len
)
{
return
(
tag1
->
len
>
tag2
->
len
)
?
1
:
-
1
;
}
return
memcmp
(
tag1
->
data
,
tag2
->
data
,
tag1
->
len
);
}
}
void
tscBuildVgroupTableInfo
(
SSqlObj
*
pSql
,
STableMetaInfo
*
pTableMetaInfo
,
SArray
*
tables
)
{
void
tscBuildVgroupTableInfo
(
SSqlObj
*
pSql
,
STableMetaInfo
*
pTableMetaInfo
,
SArray
*
tables
)
{
...
@@ -870,6 +858,12 @@ static bool checkForDuplicateTagVal(SSchema* pColSchema, SJoinSupporter* p1, SSq
...
@@ -870,6 +858,12 @@ static bool checkForDuplicateTagVal(SSchema* pColSchema, SJoinSupporter* p1, SSq
return
true
;
return
true
;
}
}
static
void
setTidTagType
(
SJoinSupporter
*
p
,
uint8_t
type
)
{
for
(
int32_t
i
=
0
;
i
<
p
->
num
;
++
i
)
{
STidTags
*
tag
=
(
STidTags
*
)
varDataVal
(
p
->
pIdTagList
+
i
*
p
->
tagSize
);
tag
->
padding
=
type
;
}
}
static
int32_t
getIntersectionOfTableTuple
(
SQueryInfo
*
pQueryInfo
,
SSqlObj
*
pParentSql
,
SArray
*
resList
)
{
static
int32_t
getIntersectionOfTableTuple
(
SQueryInfo
*
pQueryInfo
,
SSqlObj
*
pParentSql
,
SArray
*
resList
)
{
int16_t
joinNum
=
pParentSql
->
subState
.
numOfSub
;
int16_t
joinNum
=
pParentSql
->
subState
.
numOfSub
;
...
@@ -889,6 +883,8 @@ static int32_t getIntersectionOfTableTuple(SQueryInfo* pQueryInfo, SSqlObj* pPar
...
@@ -889,6 +883,8 @@ static int32_t getIntersectionOfTableTuple(SQueryInfo* pQueryInfo, SSqlObj* pPar
for
(
int32_t
i
=
0
;
i
<
joinNum
;
i
++
)
{
for
(
int32_t
i
=
0
;
i
<
joinNum
;
i
++
)
{
SJoinSupporter
*
p
=
pParentSql
->
pSubs
[
i
]
->
param
;
SJoinSupporter
*
p
=
pParentSql
->
pSubs
[
i
]
->
param
;
setTidTagType
(
p
,
pColSchema
->
type
);
ctxlist
[
i
].
p
=
p
;
ctxlist
[
i
].
p
=
p
;
ctxlist
[
i
].
res
=
taosArrayInit
(
p
->
num
,
size
);
ctxlist
[
i
].
res
=
taosArrayInit
(
p
->
num
,
size
);
...
...
src/kit/taosdemo/taosdemo.c
浏览文件 @
195ce6d1
...
@@ -1140,7 +1140,6 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
...
@@ -1140,7 +1140,6 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
if
(
arguments
->
disorderRatio
)
{
if
(
arguments
->
disorderRatio
)
{
printf
(
"# Data order: %d
\n
"
,
arguments
->
disorderRatio
);
printf
(
"# Data order: %d
\n
"
,
arguments
->
disorderRatio
);
printf
(
"# Data out of order rate: %d
\n
"
,
arguments
->
disorderRange
);
printf
(
"# Data out of order rate: %d
\n
"
,
arguments
->
disorderRange
);
}
}
printf
(
"# Delete method: %d
\n
"
,
arguments
->
method_of_delete
);
printf
(
"# Delete method: %d
\n
"
,
arguments
->
method_of_delete
);
printf
(
"# Answer yes when prompt: %d
\n
"
,
arguments
->
answer_yes
);
printf
(
"# Answer yes when prompt: %d
\n
"
,
arguments
->
answer_yes
);
...
@@ -2185,7 +2184,6 @@ static void printfQuerySystemInfo(TAOS * taos) {
...
@@ -2185,7 +2184,6 @@ static void printfQuerySystemInfo(TAOS * taos) {
snprintf
(
buffer
,
MAX_QUERY_SQL_LENGTH
,
"show %s.stables;"
,
dbInfos
[
i
]
->
name
);
snprintf
(
buffer
,
MAX_QUERY_SQL_LENGTH
,
"show %s.stables;"
,
dbInfos
[
i
]
->
name
);
res
=
taos_query
(
taos
,
buffer
);
res
=
taos_query
(
taos
,
buffer
);
xDumpResultToFile
(
filename
,
res
);
xDumpResultToFile
(
filename
,
res
);
free
(
dbInfos
[
i
]);
free
(
dbInfos
[
i
]);
}
}
...
...
src/query/src/qTsbuf.c
浏览文件 @
195ce6d1
...
@@ -267,6 +267,10 @@ static void writeDataToDisk(STSBuf* pTSBuf) {
...
@@ -267,6 +267,10 @@ static void writeDataToDisk(STSBuf* pTSBuf) {
if
(
pBlock
->
tag
.
nType
==
TSDB_DATA_TYPE_BINARY
||
pBlock
->
tag
.
nType
==
TSDB_DATA_TYPE_NCHAR
)
{
if
(
pBlock
->
tag
.
nType
==
TSDB_DATA_TYPE_BINARY
||
pBlock
->
tag
.
nType
==
TSDB_DATA_TYPE_NCHAR
)
{
metaLen
+=
(
int32_t
)
fwrite
(
&
pBlock
->
tag
.
nLen
,
1
,
sizeof
(
pBlock
->
tag
.
nLen
),
pTSBuf
->
f
);
metaLen
+=
(
int32_t
)
fwrite
(
&
pBlock
->
tag
.
nLen
,
1
,
sizeof
(
pBlock
->
tag
.
nLen
),
pTSBuf
->
f
);
metaLen
+=
(
int32_t
)
fwrite
(
pBlock
->
tag
.
pz
,
1
,
(
size_t
)
pBlock
->
tag
.
nLen
,
pTSBuf
->
f
);
metaLen
+=
(
int32_t
)
fwrite
(
pBlock
->
tag
.
pz
,
1
,
(
size_t
)
pBlock
->
tag
.
nLen
,
pTSBuf
->
f
);
}
else
if
(
pBlock
->
tag
.
nType
==
TSDB_DATA_TYPE_FLOAT
)
{
metaLen
+=
(
int32_t
)
fwrite
(
&
pBlock
->
tag
.
nLen
,
1
,
sizeof
(
pBlock
->
tag
.
nLen
),
pTSBuf
->
f
);
float
tfloat
=
(
float
)
pBlock
->
tag
.
dKey
;
metaLen
+=
(
int32_t
)
fwrite
(
&
tfloat
,
1
,
(
size_t
)
pBlock
->
tag
.
nLen
,
pTSBuf
->
f
);
}
else
if
(
pBlock
->
tag
.
nType
!=
TSDB_DATA_TYPE_NULL
)
{
}
else
if
(
pBlock
->
tag
.
nType
!=
TSDB_DATA_TYPE_NULL
)
{
metaLen
+=
(
int32_t
)
fwrite
(
&
pBlock
->
tag
.
nLen
,
1
,
sizeof
(
pBlock
->
tag
.
nLen
),
pTSBuf
->
f
);
metaLen
+=
(
int32_t
)
fwrite
(
&
pBlock
->
tag
.
nLen
,
1
,
sizeof
(
pBlock
->
tag
.
nLen
),
pTSBuf
->
f
);
metaLen
+=
(
int32_t
)
fwrite
(
&
pBlock
->
tag
.
i64
,
1
,
(
size_t
)
pBlock
->
tag
.
nLen
,
pTSBuf
->
f
);
metaLen
+=
(
int32_t
)
fwrite
(
&
pBlock
->
tag
.
i64
,
1
,
(
size_t
)
pBlock
->
tag
.
nLen
,
pTSBuf
->
f
);
...
@@ -351,6 +355,11 @@ STSBlock* readDataFromDisk(STSBuf* pTSBuf, int32_t order, bool decomp) {
...
@@ -351,6 +355,11 @@ STSBlock* readDataFromDisk(STSBuf* pTSBuf, int32_t order, bool decomp) {
sz
=
fread
(
pBlock
->
tag
.
pz
,
(
size_t
)
pBlock
->
tag
.
nLen
,
1
,
pTSBuf
->
f
);
sz
=
fread
(
pBlock
->
tag
.
pz
,
(
size_t
)
pBlock
->
tag
.
nLen
,
1
,
pTSBuf
->
f
);
UNUSED
(
sz
);
UNUSED
(
sz
);
}
else
if
(
pBlock
->
tag
.
nType
==
TSDB_DATA_TYPE_FLOAT
)
{
float
tfloat
=
0
;
sz
=
fread
(
&
tfloat
,
(
size_t
)
pBlock
->
tag
.
nLen
,
1
,
pTSBuf
->
f
);
pBlock
->
tag
.
dKey
=
(
double
)
tfloat
;
UNUSED
(
sz
);
}
else
if
(
pBlock
->
tag
.
nType
!=
TSDB_DATA_TYPE_NULL
)
{
//TODO check the return value
}
else
if
(
pBlock
->
tag
.
nType
!=
TSDB_DATA_TYPE_NULL
)
{
//TODO check the return value
sz
=
fread
(
&
pBlock
->
tag
.
i64
,
(
size_t
)
pBlock
->
tag
.
nLen
,
1
,
pTSBuf
->
f
);
sz
=
fread
(
&
pBlock
->
tag
.
i64
,
(
size_t
)
pBlock
->
tag
.
nLen
,
1
,
pTSBuf
->
f
);
UNUSED
(
sz
);
UNUSED
(
sz
);
...
...
src/tsdb/src/tsdbRead.c
浏览文件 @
195ce6d1
...
@@ -3698,6 +3698,10 @@ static void* doFreeColumnInfoData(SArray* pColumnInfoData) {
...
@@ -3698,6 +3698,10 @@ static void* doFreeColumnInfoData(SArray* pColumnInfoData) {
}
}
static
void
*
destroyTableCheckInfo
(
SArray
*
pTableCheckInfo
)
{
static
void
*
destroyTableCheckInfo
(
SArray
*
pTableCheckInfo
)
{
if
(
pTableCheckInfo
==
NULL
)
{
return
NULL
;
}
size_t
size
=
taosArrayGetSize
(
pTableCheckInfo
);
size_t
size
=
taosArrayGetSize
(
pTableCheckInfo
);
for
(
int32_t
i
=
0
;
i
<
size
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
size
;
++
i
)
{
STableCheckInfo
*
p
=
taosArrayGet
(
pTableCheckInfo
,
i
);
STableCheckInfo
*
p
=
taosArrayGet
(
pTableCheckInfo
,
i
);
...
...
tests/pytest/query/queryPerformance.py
浏览文件 @
195ce6d1
...
@@ -73,10 +73,11 @@ class taosdemoQueryPerformace:
...
@@ -73,10 +73,11 @@ class taosdemoQueryPerformace:
sql
=
"select avg(f1), max(f2), min(f3) from meters where ts <= '2017-07-15 10:40:01.000' and ts <= '2017-07-15 14:00:40.000'"
sql
=
"select avg(f1), max(f2), min(f3) from meters where ts <= '2017-07-15 10:40:01.000' and ts <= '2017-07-15 14:00:40.000'"
tableid
=
8
tableid
=
8
cursor
.
execute
(
"create table if not exists %s%d using %s tags(%d,
\"
%s
\"
)"
%
(
self
.
tbPerfix
,
tableid
,
self
.
stbName
,
tableid
,
sql
))
cursor
.
execute
(
"create table if not exists %s%d using %s tags(%d,
\"
%s
\"
)"
%
(
self
.
tbPerfix
,
tableid
,
self
.
stbName
,
tableid
,
sql
))
sql
=
"select last(*) from meters"
sql
=
"select last(*) from meters"
tableid
=
9
tableid
=
9
cursor
.
execute
(
"create table if not exists %s%d using %s tags(%d, '%s')"
%
(
self
.
tbPerfix
,
tableid
,
self
.
stbName
,
tableid
,
sql
))
cursor
.
execute
(
"create table if not exists %s%d using %s tags(%d, '%s')"
%
(
self
.
tbPerfix
,
tableid
,
self
.
stbName
,
tableid
,
sql
))
cursor
.
close
()
cursor
.
close
()
def
query
(
self
):
def
query
(
self
):
...
...
tests/pytest/tools/taosdemoPerformance.py
浏览文件 @
195ce6d1
...
@@ -19,7 +19,6 @@ import json
...
@@ -19,7 +19,6 @@ import json
from
util.log
import
tdLog
from
util.log
import
tdLog
from
util.sql
import
tdSql
from
util.sql
import
tdSql
class
taosdemoPerformace
:
class
taosdemoPerformace
:
def
__init__
(
self
,
commitID
,
dbName
):
def
__init__
(
self
,
commitID
,
dbName
):
self
.
commitID
=
commitID
self
.
commitID
=
commitID
...
@@ -124,6 +123,7 @@ class taosdemoPerformace:
...
@@ -124,6 +123,7 @@ class taosdemoPerformace:
def
insertData
(
self
):
def
insertData
(
self
):
tdSql
.
prepare
()
tdSql
.
prepare
()
buildPath
=
self
.
getBuildPath
()
buildPath
=
self
.
getBuildPath
()
if
(
buildPath
==
""
):
if
(
buildPath
==
""
):
tdLog
.
exit
(
"taosdemo not found!"
)
tdLog
.
exit
(
"taosdemo not found!"
)
...
...
tests/pytest/tools/taosdumpTest.py
浏览文件 @
195ce6d1
...
@@ -105,7 +105,6 @@ class TDTestCase:
...
@@ -105,7 +105,6 @@ class TDTestCase:
# 6--days,7--keep0,keep1,keep, 12--block,
# 6--days,7--keep0,keep1,keep, 12--block,
isCommunity
=
self
.
checkCommunity
()
isCommunity
=
self
.
checkCommunity
()
print
(
"iscommunity: %d"
%
isCommunity
)
print
(
"iscommunity: %d"
%
isCommunity
)
for
i
in
range
(
len
(
dbresult
)):
for
i
in
range
(
len
(
dbresult
)):
if
dbresult
[
i
][
0
]
==
'db'
:
if
dbresult
[
i
][
0
]
==
'db'
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录