Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
49948f26
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
49948f26
编写于
5月 07, 2021
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into feature/TD-4038
上级
6df8ed9f
5b243759
变更
26
展开全部
隐藏空白更改
内联
并排
Showing
26 changed file
with
1003 addition
and
799 deletion
+1003
-799
.appveyor.yml
.appveyor.yml
+33
-14
.drone.yml
.drone.yml
+180
-0
.travis.yml
.travis.yml
+0
-298
cmake/version.inc
cmake/version.inc
+1
-1
documentation20/cn/08.connector/01.java/docs.md
documentation20/cn/08.connector/01.java/docs.md
+1
-2
documentation20/cn/11.administrator/docs.md
documentation20/cn/11.administrator/docs.md
+27
-27
documentation20/cn/12.taos-sql/docs.md
documentation20/cn/12.taos-sql/docs.md
+12
-2
snap/snapcraft.yaml
snap/snapcraft.yaml
+2
-2
src/connector/python/linux/python2/setup.py
src/connector/python/linux/python2/setup.py
+1
-1
src/connector/python/linux/python2/taos/cinterface.py
src/connector/python/linux/python2/taos/cinterface.py
+10
-4
src/connector/python/linux/python3/setup.py
src/connector/python/linux/python3/setup.py
+1
-1
src/connector/python/linux/python3/taos/cinterface.py
src/connector/python/linux/python3/taos/cinterface.py
+10
-4
src/connector/python/osx/python3/setup.py
src/connector/python/osx/python3/setup.py
+1
-1
src/connector/python/osx/python3/taos/cinterface.py
src/connector/python/osx/python3/taos/cinterface.py
+10
-4
src/connector/python/windows/python2/setup.py
src/connector/python/windows/python2/setup.py
+1
-1
src/connector/python/windows/python2/taos/cinterface.py
src/connector/python/windows/python2/taos/cinterface.py
+10
-4
src/connector/python/windows/python3/setup.py
src/connector/python/windows/python3/setup.py
+1
-1
src/connector/python/windows/python3/taos/cinterface.py
src/connector/python/windows/python3/taos/cinterface.py
+10
-4
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+380
-295
src/kit/taosdump/taosdump.c
src/kit/taosdump/taosdump.c
+124
-118
src/plugins/http/inc/httpInt.h
src/plugins/http/inc/httpInt.h
+1
-1
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+8
-3
src/rpc/src/rpcMain.c
src/rpc/src/rpcMain.c
+1
-1
src/util/src/tnettest.c
src/util/src/tnettest.c
+3
-2
tests/pytest/client/version.py
tests/pytest/client/version.py
+10
-8
tests/pytest/crash_gen/valgrind_taos.supp
tests/pytest/crash_gen/valgrind_taos.supp
+165
-0
未找到文件。
.appveyor.yml
浏览文件 @
49948f26
version
:
1.0.{build}
os
:
Visual Studio
2015
image
:
-
Visual Studio
2015
-
macos
environment
:
matrix
:
-
ARCH
:
amd64
-
ARCH
:
x86
matrix
:
exclude
:
-
image
:
macos
ARCH
:
x86
for
:
-
matrix
:
only
:
-
image
:
Visual Studio
2015
clone_folder
:
c:\dev\TDengine
clone_depth
:
1
clone_folder
:
c:\dev\TDengine
clone_depth
:
1
init
:
-
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %ARCH%
init
:
-
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %ARCH%
before_build
:
-
cd c:\dev\TDengine
-
md build
before_build
:
-
cd c:\dev\TDengine
-
md build
build_script
:
-
cd build
-
cmake -G "NMake Makefiles" ..
-
nmake install
build_script
:
-
cd build
-
cmake -G "NMake Makefiles" ..
-
nmake install
-
matrix
:
only
:
- image
:
macos
clone_depth
:
1
build_script
:
-
mkdir debug
-
cd debug
-
cmake .. > /dev/null
-
make > /dev/null
notifications
:
-
provider
:
Email
to
:
-
sangshuduo@gmail.com
on_build_success
:
true
on_build_failure
:
true
on_build_status_changed
:
true
.drone.yml
0 → 100644
浏览文件 @
49948f26
---
kind
:
pipeline
name
:
test_amd64
platform
:
os
:
linux
arch
:
amd64
steps
:
-
name
:
smoke_test
image
:
python:3.8
commands
:
-
apt-get update
-
apt-get install -y cmake build-essential gcc
-
pip3 install psutil
-
pip3 install guppy3
-
pip3 install src/connector/python/linux/python3/
-
mkdir debug
-
cd debug
-
cmake ..
-
make
-
cd ../tests
-
./test-all.sh smoke
when
:
branch
:
-
develop
-
master
-
name
:
crash_gen
image
:
python:3.8
commands
:
-
pip3 install requests
-
pip3 install src/connector/python/linux/python3/
-
pip3 install psutil
-
pip3 install guppy3
-
cd tests/pytest
-
./crash_gen.sh -a -p -t 4 -s
2000
when
:
branch
:
-
develop
-
master
---
kind
:
pipeline
name
:
test_arm64
platform
:
os
:
linux
arch
:
arm64
steps
:
-
name
:
build
image
:
gcc
commands
:
-
apt-get update
-
apt-get install -y cmake build-essential
-
mkdir debug
-
cd debug
-
cmake .. -DCPUTYPE=aarch64 > /dev/null
-
make
when
:
branch
:
-
develop
-
master
---
kind
:
pipeline
name
:
test_arm
platform
:
os
:
linux
arch
:
arm
steps
:
-
name
:
build
image
:
arm32v7/ubuntu:bionic
commands
:
-
apt-get update
-
apt-get install -y cmake build-essential
-
mkdir debug
-
cd debug
-
cmake .. -DCPUTYPE=aarch32 > /dev/null
-
make
when
:
branch
:
-
develop
-
master
---
kind
:
pipeline
name
:
build_trusty
platform
:
os
:
linux
arch
:
amd64
steps
:
-
name
:
build
image
:
ubuntu:trusty
commands
:
-
apt-get update
-
apt-get install -y gcc cmake3 build-essential git binutils-2.26
-
mkdir debug
-
cd debug
-
cmake ..
-
make
when
:
branch
:
-
develop
-
master
---
kind
:
pipeline
name
:
build_xenial
platform
:
os
:
linux
arch
:
amd64
steps
:
-
name
:
build
image
:
ubuntu:xenial
commands
:
-
apt-get update
-
apt-get install -y gcc cmake build-essential
-
mkdir debug
-
cd debug
-
cmake ..
-
make
when
:
branch
:
-
develop
-
master
---
kind
:
pipeline
name
:
build_bionic
platform
:
os
:
linux
arch
:
amd64
steps
:
-
name
:
build
image
:
ubuntu:bionic
commands
:
-
apt-get update
-
apt-get install -y gcc cmake build-essential
-
mkdir debug
-
cd debug
-
cmake ..
-
make
when
:
branch
:
-
develop
-
master
---
kind
:
pipeline
name
:
goodbye
platform
:
os
:
linux
arch
:
amd64
steps
:
-
name
:
64-bit
image
:
alpine
commands
:
-
echo 64-bit is good.
when
:
branch
:
-
develop
-
master
depends_on
:
-
test_arm64
-
test_amd64
\ No newline at end of file
.travis.yml
已删除
100644 → 0
浏览文件 @
6df8ed9f
#
# Configuration
#
#
# Build Matrix
#
branches
:
only
:
-
master
-
develop
-
coverity_scan
-
/^.*ci-.*$/
matrix
:
-
os
:
linux
dist
:
bionic
language
:
c
git
:
-
depth
:
1
compiler
:
gcc
env
:
DESC="linux/gcc build and test"
addons
:
apt
:
packages
:
-
build-essential
-
cmake
-
net-tools
-
python3.8
-
libc6-dbg
-
valgrind
-
psmisc
-
unixodbc
-
unixodbc-dev
-
mono-complete
before_script
:
-
export TZ=Asia/Harbin
-
date
-
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3.8 get-pip.py
-
python3.8 -m pip install --upgrade pip setuptools
-
cd ${TRAVIS_BUILD_DIR}
-
mkdir debug
-
cd debug
script
:
-
cmake .. > /dev/null
-
make > /dev/null
after_success
:
-
travis_wait
20
-
|-
case $TRAVIS_OS_NAME in
linux)
cd ${TRAVIS_BUILD_DIR}/debug
make install > /dev/null || travis_terminate $?
py3ver=`python3 --version|awk '{print $2}'|cut -d "." -f 1,2` && apt install python$py3ver-dev
pip3 install psutil
pip3 install guppy3
pip3 install --user ${TRAVIS_BUILD_DIR}/src/connector/python/linux/python3/
cd ${TRAVIS_BUILD_DIR}/tests/examples/C#/taosdemo
mcs -out:taosdemo *.cs || travis_terminate $?
pkill -TERM -x taosd
fuser -k -n tcp 6030
sleep 1
${TRAVIS_BUILD_DIR}/debug/build/bin/taosd -c ${TRAVIS_BUILD_DIR}/debug/test/cfg > /dev/null &
sleep 5
mono taosdemo -Q DEFAULT -y || travis_terminate $?
pkill -KILL -x taosd
fuser -k -n tcp 6030
sleep 1
cd ${TRAVIS_BUILD_DIR}/tests
./test-all.sh smoke || travis_terminate $?
sleep 1
cd ${TRAVIS_BUILD_DIR}/tests/pytest
pkill -TERM -x taosd
fuser -k -n tcp 6030
sleep 1
./crash_gen.sh -a -p -t 4 -s 2000|| travis_terminate $?
sleep 1
cd ${TRAVIS_BUILD_DIR}/tests/pytest
./valgrind-test.sh 2>&1 > mem-error-out.log
sleep 1
# Color setting
RED='\033[0;31m'
GREEN='\033[1;32m'
GREEN_DARK='\033[0;32m'
GREEN_UNDERLINE='\033[4;32m'
NC='\033[0m'
grep 'start to execute\|ERROR SUMMARY' mem-error-out.log|grep -v 'grep'|uniq|tee uniq-mem-error-out.log
for memError in `grep 'ERROR SUMMARY' uniq-mem-error-out.log | awk '{print $4}'`
do
if [ -n "$memError" ]; then
if [ "$memError" -gt 12 ]; then
echo -e "${RED} ## Memory errors number valgrind reports is $memError.\
More than our threshold! ## ${NC}"
travis_terminate $memError
fi
fi
done
grep 'start to execute\|definitely lost:' mem-error-out.log|grep -v 'grep'|uniq|tee uniq-definitely-lost-out.log
for defiMemError in `grep 'definitely lost:' uniq-definitely-lost-out.log | awk '{print $7}'`
do
if [ -n "$defiMemError" ]; then
if [ "$defiMemError" -gt 13 ]; then
echo -e "${RED} ## Memory errors number valgrind reports \
Definitely lost is $defiMemError. More than our threshold! ## ${NC}"
travis_terminate $defiMemError
fi
fi
done
;;
esac
-
os
:
linux
dist
:
bionic
language
:
c
compiler
:
gcc
env
:
COVERITY_SCAN=true
git
:
-
depth
:
1
script
:
-
echo "this job is for coverity scan"
addons
:
coverity_scan
:
# GitHub project metadata
# ** specific to your project **
project
:
name
:
TDengine
version
:
2.x
description
:
TDengine
# Where email notification of build analysis results will be sent
notification_email
:
sdsang@taosdata.com, slguan@taosdata.com
# Commands to prepare for build_command
# ** likely specific to your build **
build_command_prepend
:
cmake . > /dev/null
# The command that will be added as an argument to "cov-build" to compile your project for analysis,
# ** likely specific to your build **
build_command
:
make
# Pattern to match selecting branches that will run analysis. We recommend leaving this set to 'coverity_scan'.
# Take care in resource usage, and consider the build frequency allowances per
# https://scan.coverity.com/faq#frequency
branch_pattern
:
coverity_scan
-
os
:
linux
dist
:
trusty
language
:
c
git
:
-
depth
:
1
addons
:
apt
:
packages
:
-
build-essential
-
cmake
-
binutils-2.26
-
unixodbc
-
unixodbc-dev
env
:
-
DESC="trusty/gcc-4.8/bintuils-2.26 build"
before_script
:
-
export TZ=Asia/Harbin
-
date
-
cd ${TRAVIS_BUILD_DIR}
-
mkdir debug
-
cd debug
script
:
-
cmake .. > /dev/null
-
export PATH=/usr/lib/binutils-2.26/bin:$PATH && make
-
os
:
linux
dist
:
bionic
language
:
c
compiler
:
clang
env
:
DESC="linux/clang build"
git
:
-
depth
:
1
addons
:
apt
:
packages
:
-
build-essential
-
cmake
-
unixodbc
-
unixodbc-dev
before_script
:
-
export TZ=Asia/Harbin
-
date
-
cd ${TRAVIS_BUILD_DIR}
-
mkdir debug
-
cd debug
script
:
-
cmake .. > /dev/null
-
make > /dev/null
-
os
:
linux
arch
:
arm64
dist
:
bionic
language
:
c
compiler
:
clang
env
:
DESC="arm64 linux/clang build"
git
:
-
depth
:
1
addons
:
apt
:
packages
:
-
build-essential
-
cmake
before_script
:
-
export TZ=Asia/Harbin
-
date
-
cd ${TRAVIS_BUILD_DIR}
-
mkdir debug
-
cd debug
script
:
-
if [ "${TRAVIS_CPU_ARCH}" == "arm64" ]; then
cmake .. -DCPUTYPE=aarch64 > /dev/null;
else
cmake .. > /dev/null;
fi
-
make > /dev/null
-
os
:
linux
arch
:
arm64
dist
:
xenial
language
:
c
git
:
-
depth
:
1
addons
:
apt
:
packages
:
-
build-essential
-
cmake
-
unixodbc
-
unixodbc-dev
env
:
-
DESC="arm64 xenial build"
before_script
:
-
export TZ=Asia/Harbin
-
date
-
cd ${TRAVIS_BUILD_DIR}
-
mkdir debug
-
cd debug
script
:
-
if [ "${TRAVIS_CPU_ARCH}" == "arm64" ]; then
cmake .. -DCPUTYPE=aarch64 > /dev/null;
else
cmake .. > /dev/null;
fi
-
make > /dev/null
-
os
:
osx
osx_image
:
xcode11.4
language
:
c
compiler
:
clang
env
:
DESC="mac/clang build"
git
:
-
depth
:
1
addons
:
homebrew
:
-
cmake
-
unixodbc
script
:
-
cd ${TRAVIS_BUILD_DIR}
-
mkdir debug
-
cd debug
-
cmake .. > /dev/null
-
make > /dev/null
cmake/version.inc
浏览文件 @
49948f26
...
...
@@ -4,7 +4,7 @@ PROJECT(TDengine)
IF
(
DEFINED
VERNUMBER
)
SET
(
TD_VER_NUMBER
$
{
VERNUMBER
})
ELSE
()
SET
(
TD_VER_NUMBER
"2.
0.2
0.0"
)
SET
(
TD_VER_NUMBER
"2.
1.
0.0"
)
ENDIF
()
IF
(
DEFINED
VERCOMPATIBLE
)
...
...
documentation20/cn/08.connector/01.java/docs.md
浏览文件 @
49948f26
...
...
@@ -16,7 +16,6 @@ TDengine 的 JDBC 驱动实现尽可能与关系型数据库驱动保持一致
*
TDengine 目前不支持针对单条数据记录的删除操作。
*
目前不支持事务操作。
*
目前不支持表间的 union 操作。
*
目前不支持嵌套查询(nested query)。
*
对每个 Connection 的实例,至多只能有一个打开的 ResultSet 实例;如果在 ResultSet 还没关闭的情况下执行了新的查询,taos-jdbcdriver 会自动关闭上一个 ResultSet。
...
...
@@ -447,7 +446,7 @@ Query OK, 1 row(s) in set (0.000141s)
## TAOS-JDBCDriver 版本以及支持的 TDengine 版本和 JDK 版本
##
<a class="anchor" id="version"></a>
TAOS-JDBCDriver 版本以及支持的 TDengine 版本和 JDK 版本
| taos-jdbcdriver 版本 | TDengine 版本 | JDK 版本 |
| -------------------- | ----------------- | -------- |
...
...
documentation20/cn/11.administrator/docs.md
浏览文件 @
49948f26
...
...
@@ -144,7 +144,7 @@ TDengine集群中加入一个新的dnode时,涉及集群相关的一些参数
-
numOfMnodes:系统中管理节点个数。默认值:3。
-
balance:是否启动负载均衡。0:否,1:是。默认值:1。
-
mnodeEqualVnodeNum: 一个mnode等同于vnode消耗的个数。默认值:4。
-
offlineThreshold: dnode离线阈值,超过该时间将导致该dnode从集群中删除。单位为秒,默认值:86400
*
10
0(即10
0天)。
-
offlineThreshold: dnode离线阈值,超过该时间将导致该dnode从集群中删除。单位为秒,默认值:86400
*
10
(即1
0天)。
-
statusInterval: dnode向mnode报告状态时长。单位为秒,默认值:1。
-
maxTablesPerVnode: 每个vnode中能够创建的最大表个数。默认值:1000000。
-
maxVgroupsPerDb: 每个数据库中能够使用的最大vgroup个数。
...
...
@@ -462,31 +462,31 @@ TDengine的所有可执行文件默认存放在 _/usr/local/taos/bin_ 目录下
| 关键字列表 | | | | |
| ---------- | ----------- | ------------ | ---------- | --------- |
| ABLOCKS | CONNECTIONS | HAVING | MODULES | S
LIMIT
|
| ABORT | COPY | ID | NCHAR | S
MALLINT
|
| ACCOUNT | COUNT | IF | NE | S
PREAD
|
| ACCOUNTS | CREATE | IGNORE | NONE | STABLE
|
| ADD | CTIME | IMMEDIATE | NOT | STA
BLES
|
| AFTER | DATABASE | IMPORT | NOTNULL | STA
R
|
| ALL | DATABASES | IN | NOW | ST
ATEMENT
|
| ALTER | DAYS | INITIALLY | OF | ST
DDEV
|
| AND | DEFERRED | INSERT | OFFSET | STREAM
|
| AS | DELIMITERS | INSTEAD | OR | STR
EAMS
|
| ASC | DESC | INTEGER | ORDER | S
TRING
|
| ATTACH | DESCRIBE | INTERVAL | PASS |
SUM
|
| AVG | DETACH | INTO | PERCENTILE | TABLE
|
| BEFORE | DIFF | IP | PLUS | TA
BLES
|
| BEGIN | DISTINCT | IS | PRAGMA | TAG
|
| BETWEEN | DIVIDE | ISNULL | PREV | T
AGS
|
| BIGINT | DNODE | JOIN | PRIVILEGE | TB
LOCKS
|
| BINARY | DNODES | KEEP | QUERIES | T
BNAME
|
| BITAND | DOT | KEY | QUERY | TIMES
|
| BITNOT | DOUBLE | KILL | RAISE | TI
MESTAMP
|
| BITOR | DROP | LAST | REM | T
INYINT
|
| BOOL | EACH | LE | REPLACE | TOP
|
| BOTTOM | END | LEASTSQUARES | REPLICA | T
OPIC
|
| BY | EQ | LIKE | RESET |
TRIGGER
|
| CACHE | EXISTS | LIMIT | RESTRICT | U
MINUS
|
| ABLOCKS | CONNECTIONS | HAVING | MODULES | S
MALLINT
|
| ABORT | COPY | ID | NCHAR | S
PREAD
|
| ACCOUNT | COUNT | IF | NE | S
TABLE
|
| ACCOUNTS | CREATE | IGNORE | NONE | STABLE
S
|
| ADD | CTIME | IMMEDIATE | NOT | STA
R
|
| AFTER | DATABASE | IMPORT | NOTNULL | STA
TEMENT
|
| ALL | DATABASES | IN | NOW | ST
DDEV
|
| ALTER | DAYS | INITIALLY | OF | ST
REAM
|
| AND | DEFERRED | INSERT | OFFSET | STREAM
S
|
| AS | DELIMITERS | INSTEAD | OR | STR
ING
|
| ASC | DESC | INTEGER | ORDER | S
UM
|
| ATTACH | DESCRIBE | INTERVAL | PASS |
TABLE
|
| AVG | DETACH | INTO | PERCENTILE | TABLE
S
|
| BEFORE | DIFF | IP | PLUS | TA
G
|
| BEGIN | DISTINCT | IS | PRAGMA | TAG
S
|
| BETWEEN | DIVIDE | ISNULL | PREV | T
BLOCKS
|
| BIGINT | DNODE | JOIN | PRIVILEGE | TB
NAME
|
| BINARY | DNODES | KEEP | QUERIES | T
IMES
|
| BITAND | DOT | KEY | QUERY | TIMES
TAMP
|
| BITNOT | DOUBLE | KILL | RAISE | TI
NYINT
|
| BITOR | DROP | LAST | REM | T
OP
|
| BOOL | EACH | LE | REPLACE | TOP
IC
|
| BOTTOM | END | LEASTSQUARES | REPLICA | T
RIGGER
|
| BY | EQ | LIKE | RESET |
UMINUS
|
| CACHE | EXISTS | LIMIT | RESTRICT | U
NION
|
| CASCADE | EXPLAIN | LINEAR | ROW | UPLUS |
| CHANGE | FAIL | LOCAL | ROWS | USE |
| CLOG | FILL | LP | RP | USER |
...
...
@@ -498,5 +498,5 @@ TDengine的所有可执行文件默认存放在 _/usr/local/taos/bin_ 目录下
| CONCAT | GLOB | METRICS | SHOW | VIEW |
| CONFIGS | GRANTS | MIN | SLASH | WAVG |
| CONFLICT | GROUP | MINUS | SLIDING | WHERE |
| CONNECTION | GT | MNODES |
| |
| CONNECTION | GT | MNODES |
SLIMIT
| |
documentation20/cn/12.taos-sql/docs.md
浏览文件 @
49948f26
...
...
@@ -407,7 +407,7 @@ SELECT select_expr [, select_expr ...]
[INTERVAL (interval_val [, interval_offset])]
[SLIDING sliding_val]
[FILL fill_val]
[GROUP BY col_list
<!-- [HAVING having_condition] -->
]
[GROUP BY col_list]
[ORDER BY col_list { DESC | ASC }]
[SLIMIT limit_val [SOFFSET offset_val]]
[LIMIT limit_val [OFFSET offset_val]]
...
...
@@ -647,7 +647,7 @@ Query OK, 1 row(s) in set (0.001091s)
3. 从 2.0.17 版本开始,条件过滤开始支持 BETWEEN AND 语法,例如 `WHERE col2 BETWEEN 1.5 AND 3.25` 表示查询条件为“1.5 ≤ col2 ≤ 3.25”。
<!--
### GROUP BY 之后的 HAVING 过滤
###
<a class="anchor" id="having"></a>
GROUP BY 之后的 HAVING 过滤
从 2.0.20 版本开始,GROUP BY 之后允许再跟一个 HAVING 子句,对成组后的各组数据再做筛选。HAVING 子句可以使用聚合函数和选择函数作为过滤条件(但暂时不支持 LEASTSQUARES、TOP、BOTTOM、LAST_ROW)。
...
...
@@ -657,6 +657,16 @@ SELECT AVG(f1), SPREAD(f1, f2, st2.f1) FROM st2 WHERE f1 > 0 GROUP BY f1 HAVING
```
-->
### <a class="anchor" id="union"></a>UNION ALL 操作符
```
mysql
SELECT ...
UNION ALL SELECT ...
[UNION ALL SELECT ...]
```
TDengine 支持 UNION ALL 操作符。也就是说,如果多个 SELECT 子句返回结果集的结构完全相同(列名、列类型、列数、顺序),那么可以通过 UNION ALL 把这些结果集合并到一起。目前只支持 UNION ALL 模式,也即在结果集的合并过程中是不去重的。
### SQL 示例
- 对于下面的例子,表tb1用以下语句创建
...
...
snap/snapcraft.yaml
浏览文件 @
49948f26
name
:
tdengine
base
:
core18
version
:
'
2.
0.2
0.0'
version
:
'
2.
1.
0.0'
icon
:
snap/gui/t-dengine.svg
summary
:
an open-source big data platform designed and optimized for IoT.
description
:
|
...
...
@@ -72,7 +72,7 @@ parts:
-
usr/bin/taosd
-
usr/bin/taos
-
usr/bin/taosdemo
-
usr/lib/libtaos.so.2.
0.2
0.0
-
usr/lib/libtaos.so.2.
1.
0.0
-
usr/lib/libtaos.so.1
-
usr/lib/libtaos.so
...
...
src/connector/python/linux/python2/setup.py
浏览文件 @
49948f26
...
...
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools
.
setup
(
name
=
"taos"
,
version
=
"2.0.
8
"
,
version
=
"2.0.
9
"
,
author
=
"Taosdata Inc."
,
author_email
=
"support@taosdata.com"
,
description
=
"TDengine python client package"
,
...
...
src/connector/python/linux/python2/taos/cinterface.py
浏览文件 @
49948f26
...
...
@@ -21,11 +21,17 @@ def _crow_timestamp_to_python(data, num_of_rows, nbytes=None, micro=False):
_timestamp_converter
=
_convert_microsecond_to_datetime
if
num_of_rows
>
0
:
return
list
(
map
(
_timestamp_converter
,
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[:
abs
(
num_of_rows
)]))
return
[
None
if
ele
==
FieldType
.
C_BIGINT_NULL
else
_timestamp_converter
(
ele
)
for
ele
in
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[
:
abs
(
num_of_rows
)]]
else
:
return
list
(
map
(
_timestamp_converter
,
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[:
abs
(
num_of_rows
)]))
return
[
None
if
ele
==
FieldType
.
C_BIGINT_NULL
else
_timestamp_converter
(
ele
)
for
ele
in
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[
:
abs
(
num_of_rows
)]]
def
_crow_bool_to_python
(
data
,
num_of_rows
,
nbytes
=
None
,
micro
=
False
):
...
...
src/connector/python/linux/python3/setup.py
浏览文件 @
49948f26
...
...
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools
.
setup
(
name
=
"taos"
,
version
=
"2.0.
7
"
,
version
=
"2.0.
9
"
,
author
=
"Taosdata Inc."
,
author_email
=
"support@taosdata.com"
,
description
=
"TDengine python client package"
,
...
...
src/connector/python/linux/python3/taos/cinterface.py
浏览文件 @
49948f26
...
...
@@ -21,11 +21,17 @@ def _crow_timestamp_to_python(data, num_of_rows, nbytes=None, micro=False):
_timestamp_converter
=
_convert_microsecond_to_datetime
if
num_of_rows
>
0
:
return
list
(
map
(
_timestamp_converter
,
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[:
abs
(
num_of_rows
)]))
return
[
None
if
ele
==
FieldType
.
C_BIGINT_NULL
else
_timestamp_converter
(
ele
)
for
ele
in
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[
:
abs
(
num_of_rows
)]]
else
:
return
list
(
map
(
_timestamp_converter
,
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[:
abs
(
num_of_rows
)]))
return
[
None
if
ele
==
FieldType
.
C_BIGINT_NULL
else
_timestamp_converter
(
ele
)
for
ele
in
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[
:
abs
(
num_of_rows
)]]
def
_crow_bool_to_python
(
data
,
num_of_rows
,
nbytes
=
None
,
micro
=
False
):
...
...
src/connector/python/osx/python3/setup.py
浏览文件 @
49948f26
...
...
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools
.
setup
(
name
=
"taos"
,
version
=
"2.0.
7
"
,
version
=
"2.0.
9
"
,
author
=
"Taosdata Inc."
,
author_email
=
"support@taosdata.com"
,
description
=
"TDengine python client package"
,
...
...
src/connector/python/osx/python3/taos/cinterface.py
浏览文件 @
49948f26
...
...
@@ -21,11 +21,17 @@ def _crow_timestamp_to_python(data, num_of_rows, nbytes=None, micro=False):
_timestamp_converter
=
_convert_microsecond_to_datetime
if
num_of_rows
>
0
:
return
list
(
map
(
_timestamp_converter
,
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[:
abs
(
num_of_rows
)]))
return
[
None
if
ele
==
FieldType
.
C_BIGINT_NULL
else
_timestamp_converter
(
ele
)
for
ele
in
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[
:
abs
(
num_of_rows
)]]
else
:
return
list
(
map
(
_timestamp_converter
,
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[:
abs
(
num_of_rows
)]))
return
[
None
if
ele
==
FieldType
.
C_BIGINT_NULL
else
_timestamp_converter
(
ele
)
for
ele
in
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[
:
abs
(
num_of_rows
)]]
def
_crow_bool_to_python
(
data
,
num_of_rows
,
nbytes
=
None
,
micro
=
False
):
...
...
src/connector/python/windows/python2/setup.py
浏览文件 @
49948f26
...
...
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools
.
setup
(
name
=
"taos"
,
version
=
"2.0.
7
"
,
version
=
"2.0.
9
"
,
author
=
"Taosdata Inc."
,
author_email
=
"support@taosdata.com"
,
description
=
"TDengine python client package"
,
...
...
src/connector/python/windows/python2/taos/cinterface.py
浏览文件 @
49948f26
...
...
@@ -21,11 +21,17 @@ def _crow_timestamp_to_python(data, num_of_rows, nbytes=None, micro=False):
_timestamp_converter
=
_convert_microsecond_to_datetime
if
num_of_rows
>
0
:
return
list
(
map
(
_timestamp_converter
,
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[:
abs
(
num_of_rows
)]))
return
[
None
if
ele
==
FieldType
.
C_BIGINT_NULL
else
_timestamp_converter
(
ele
)
for
ele
in
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[
:
abs
(
num_of_rows
)]]
else
:
return
list
(
map
(
_timestamp_converter
,
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[:
abs
(
num_of_rows
)]))
return
[
None
if
ele
==
FieldType
.
C_BIGINT_NULL
else
_timestamp_converter
(
ele
)
for
ele
in
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[
:
abs
(
num_of_rows
)]]
def
_crow_bool_to_python
(
data
,
num_of_rows
,
nbytes
=
None
,
micro
=
False
):
...
...
src/connector/python/windows/python3/setup.py
浏览文件 @
49948f26
...
...
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools
.
setup
(
name
=
"taos"
,
version
=
"2.0.
7"
,
version
=
"2.0.
9"
,
author
=
"Taosdata Inc."
,
author_email
=
"support@taosdata.com"
,
description
=
"TDengine python client package"
,
...
...
src/connector/python/windows/python3/taos/cinterface.py
浏览文件 @
49948f26
...
...
@@ -21,11 +21,17 @@ def _crow_timestamp_to_python(data, num_of_rows, nbytes=None, micro=False):
_timestamp_converter
=
_convert_microsecond_to_datetime
if
num_of_rows
>
0
:
return
list
(
map
(
_timestamp_converter
,
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[:
abs
(
num_of_rows
)]))
return
[
None
if
ele
==
FieldType
.
C_BIGINT_NULL
else
_timestamp_converter
(
ele
)
for
ele
in
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[
:
abs
(
num_of_rows
)]]
else
:
return
list
(
map
(
_timestamp_converter
,
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[:
abs
(
num_of_rows
)]))
return
[
None
if
ele
==
FieldType
.
C_BIGINT_NULL
else
_timestamp_converter
(
ele
)
for
ele
in
ctypes
.
cast
(
data
,
ctypes
.
POINTER
(
ctypes
.
c_int64
))[
:
abs
(
num_of_rows
)]]
def
_crow_bool_to_python
(
data
,
num_of_rows
,
nbytes
=
None
,
micro
=
False
):
...
...
src/kit/taosdemo/taosdemo.c
浏览文件 @
49948f26
此差异已折叠。
点击以展开。
src/kit/taosdump/taosdump.c
浏览文件 @
49948f26
此差异已折叠。
点击以展开。
src/plugins/http/inc/httpInt.h
浏览文件 @
49948f26
...
...
@@ -171,7 +171,7 @@ typedef struct HttpThread {
EpollFd
pollFd
;
int32_t
numOfContexts
;
int32_t
threadId
;
char
label
[
HTTP_LABEL_SIZE
];
char
label
[
HTTP_LABEL_SIZE
<<
1
];
bool
(
*
processData
)(
HttpContext
*
pContext
);
}
HttpThread
;
...
...
src/query/src/qExecutor.c
浏览文件 @
49948f26
...
...
@@ -4466,13 +4466,18 @@ SArray* getOrderCheckColumns(SQueryAttr* pQuery) {
for
(
int32_t
i
=
0
;
i
<
numOfCols
;
++
i
)
{
SColIndex
*
index
=
taosArrayGet
(
pOrderColumns
,
i
);
for
(
int32_t
j
=
0
;
j
<
pQuery
->
numOfOutput
;
++
j
)
{
if
(
index
->
colId
==
pQuery
->
pExpr1
[
j
].
base
.
colInfo
.
colId
)
{
SSqlExpr
*
pExpr
=
&
pQuery
->
pExpr1
[
j
].
base
;
int32_t
functionId
=
pExpr
->
functionId
;
if
(
index
->
colId
==
pExpr
->
colInfo
.
colId
&&
(
functionId
==
TSDB_FUNC_PRJ
||
functionId
==
TSDB_FUNC_TAG
||
functionId
==
TSDB_FUNC_TS
))
{
index
->
colIndex
=
j
;
index
->
colId
=
p
Query
->
pExpr1
[
j
].
base
.
resColId
;
index
->
colId
=
p
Expr
->
resColId
;
}
}
}
}
return
pOrderColumns
;
}
...
...
@@ -4804,7 +4809,7 @@ static SSDataBlock* doArithmeticOperation(void* param, bool* newgroup) {
}
// Return result of the previous group in the firstly.
if
(
newgroup
&&
pRes
->
info
.
rows
>
0
)
{
if
(
*
newgroup
&&
pRes
->
info
.
rows
>
0
)
{
pArithInfo
->
existDataBlock
=
pBlock
;
clearNumOfRes
(
pInfo
->
pCtx
,
pOperator
->
numOfOutput
);
return
pInfo
->
pRes
;
...
...
src/rpc/src/rpcMain.c
浏览文件 @
49948f26
...
...
@@ -295,7 +295,7 @@ void *rpcOpen(const SRpcInit *pInit) {
return
NULL
;
}
}
else
{
pRpc
->
pCache
=
rpcOpenConnCache
(
pRpc
->
sessions
,
rpcCloseConn
,
pRpc
->
tmrCtrl
,
pRpc
->
idleTime
*
3
0
);
pRpc
->
pCache
=
rpcOpenConnCache
(
pRpc
->
sessions
,
rpcCloseConn
,
pRpc
->
tmrCtrl
,
pRpc
->
idleTime
*
2
0
);
if
(
pRpc
->
pCache
==
NULL
)
{
tError
(
"%s failed to init connection cache"
,
pRpc
->
label
);
rpcClose
(
pRpc
);
...
...
src/util/src/tnettest.c
浏览文件 @
49948f26
...
...
@@ -539,7 +539,7 @@ static void taosNetTestServer(char *host, int32_t startPort, int32_t pkgLen) {
}
void
taosNetTest
(
char
*
role
,
char
*
host
,
int32_t
port
,
int32_t
pkgLen
)
{
//
tscEmbedded = 1;
tscEmbedded
=
1
;
if
(
host
==
NULL
)
host
=
tsLocalFqdn
;
if
(
port
==
0
)
port
=
tsServerPort
;
if
(
pkgLen
<=
10
)
pkgLen
=
1000
;
...
...
@@ -550,6 +550,7 @@ void taosNetTest(char *role, char *host, int32_t port, int32_t pkgLen) {
}
else
if
(
0
==
strcmp
(
"server"
,
role
))
{
taosNetTestServer
(
host
,
port
,
pkgLen
);
}
else
if
(
0
==
strcmp
(
"rpc"
,
role
))
{
tscEmbedded
=
0
;
taosNetTestRpc
(
host
,
port
,
pkgLen
);
}
else
if
(
0
==
strcmp
(
"sync"
,
role
))
{
taosNetCheckSync
(
host
,
port
);
...
...
@@ -559,5 +560,5 @@ void taosNetTest(char *role, char *host, int32_t port, int32_t pkgLen) {
taosNetTestStartup
(
host
,
port
);
}
//
tscEmbedded = 0;
tscEmbedded
=
0
;
}
tests/pytest/client/version.py
浏览文件 @
49948f26
...
...
@@ -28,20 +28,22 @@ class TDTestCase:
sql
=
"select server_version()"
ret
=
tdSql
.
query
(
sql
)
version
=
tdSql
.
getData
(
0
,
0
)[
0
:
3
]
expectedVersion
=
"2.0"
if
(
version
==
expectedVersion
):
tdLog
.
info
(
"sql:%s, row:%d col:%d data:%s == expect:%s"
%
(
sql
,
0
,
0
,
version
,
expectedVersion
))
expectedVersion_dev
=
"2.0"
expectedVersion_master
=
"2.1"
if
(
version
==
expectedVersion_dev
or
version
==
expectedVersion_master
):
tdLog
.
info
(
"sql:%s, row:%d col:%d data:%s == expect"
%
(
sql
,
0
,
0
,
version
))
else
:
tdLog
.
exit
(
"sql:%s, row:%d col:%d data:%s != expect:%s
"
%
(
sql
,
0
,
0
,
version
,
expectedVersion
))
tdLog
.
exit
(
"sql:%s, row:%d col:%d data:%s != expect:%s
or %s "
%
(
sql
,
0
,
0
,
version
,
expectedVersion_dev
,
expectedVersion_master
))
sql
=
"select client_version()"
ret
=
tdSql
.
query
(
sql
)
version
=
tdSql
.
getData
(
0
,
0
)[
0
:
3
]
expectedVersion
=
"2.0"
if
(
version
==
expectedVersion
):
tdLog
.
info
(
"sql:%s, row:%d col:%d data:%s == expect:%s"
%
(
sql
,
0
,
0
,
version
,
expectedVersion
))
expectedVersion_dev
=
"2.0"
expectedVersion_master
=
"2.1"
if
(
version
==
expectedVersion_dev
or
version
==
expectedVersion_master
):
tdLog
.
info
(
"sql:%s, row:%d col:%d data:%s == expect"
%
(
sql
,
0
,
0
,
version
))
else
:
tdLog
.
exit
(
"sql:%s, row:%d col:%d data:%s != expect:%s
"
%
(
sql
,
0
,
0
,
version
,
expectedVersion
))
tdLog
.
exit
(
"sql:%s, row:%d col:%d data:%s != expect:%s
or %s "
%
(
sql
,
0
,
0
,
version
,
expectedVersion_dev
,
expectedVersion_master
))
def
stop
(
self
):
...
...
tests/pytest/crash_gen/valgrind_taos.supp
浏览文件 @
49948f26
...
...
@@ -17332,3 +17332,168 @@
fun:PyVectorcall_Call
fun:_PyEval_EvalFrameDefault
}
{
<insert_a_suppression_name_here>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:lib_build_and_cache_attr
fun:lib_getattr
fun:_PyEval_EvalFrameDefault
fun:_PyFunction_Vectorcall
fun:_PyEval_EvalFrameDefault
fun:_PyEval_EvalCodeWithName
fun:PyEval_EvalCode
obj:/usr/bin/python3.8
obj:/usr/bin/python3.8
fun:PyVectorcall_Call
fun:_PyEval_EvalFrameDefault
}
{
<insert_a_suppression_name_here>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:lib_build_and_cache_attr
fun:lib_getattr
obj:/usr/bin/python3.8
fun:_PyEval_EvalFrameDefault
fun:_PyFunction_Vectorcall
fun:_PyEval_EvalFrameDefault
obj:/usr/bin/python3.8
fun:_PyEval_EvalFrameDefault
fun:PyEval_EvalCode
obj:/usr/bin/python3.8
fun:_PyEval_EvalFrameDefault
fun:_PyEval_EvalCodeWithName
}
{
<insert_a_suppression_name_here>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:_my_Py_InitModule
fun:lib_getattr
fun:b_init_cffi_1_0_external_module
obj:/usr/bin/python3.8
obj:/usr/bin/python3.8
obj:/usr/bin/python3.8
fun:PyObject_CallMethod
fun:_cffi_init
fun:PyInit__bcrypt
fun:_PyImport_LoadDynamicModuleWithSpec
obj:/usr/bin/python3.8
obj:/usr/bin/python3.8
fun:PyVectorcall_Call
fun:_PyEval_EvalFrameDefault
}
{
<insert_a_suppression_name_here>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:_PyObject_GC_New
fun:lib_getattr
fun:ffi_internal_new
fun:b_init_cffi_1_0_external_module
obj:/usr/bin/python3.8
obj:/usr/bin/python3.8
obj:/usr/bin/python3.8
fun:PyObject_CallMethod
fun:_cffi_init
fun:PyInit__bcrypt
fun:_PyImport_LoadDynamicModuleWithSpec
obj:/usr/bin/python3.8
obj:/usr/bin/python3.8
fun:PyVectorcall_Call
}
{
<insert_a_suppression_name_here>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:lib_build_cpython_func.isra.87
fun:lib_build_and_cache_attr
fun:lib_getattr
obj:/usr/bin/python3.8
fun:_PyEval_EvalFrameDefault
fun:_PyFunction_Vectorcall
fun:_PyEval_EvalFrameDefault
obj:/usr/bin/python3.8
fun:_PyEval_EvalFrameDefault
obj:/usr/bin/python3.8
fun:_PyEval_EvalFrameDefault
}
{
<insert_a_suppression_name_here>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:lib_build_and_cache_attr
fun:lib_getattr
obj:/usr/bin/python3.8
fun:_PyEval_EvalFrameDefault
fun:_PyFunction_Vectorcall
fun:_PyEval_EvalFrameDefault
obj:/usr/bin/python3.8
fun:_PyEval_EvalFrameDefault
obj:/usr/bin/python3.8
fun:_PyEval_EvalFrameDefault
fun:_PyEval_EvalCodeWithName
}
{
<insert_a_suppression_name_here>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:_my_Py_InitModule
fun:b_init_cffi_1_0_external_module
obj:/usr/bin/python3.8
obj:/usr/bin/python3.8
obj:/usr/bin/python3.8
fun:PyObject_CallMethod
fun:_cffi_init
fun:PyInit__bcrypt
fun:_PyImport_LoadDynamicModuleWithSpec
obj:/usr/bin/python3.8
obj:/usr/bin/python3.8
fun:PyVectorcall_Call
fun:_PyEval_EvalFrameDefault
}
{
<insert_a_suppression_name_here>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:_my_Py_InitModule
fun:b_init_cffi_1_0_external_module
obj:/usr/bin/python3.8
obj:/usr/bin/python3.8
obj:/usr/bin/python3.8
fun:PyObject_CallMethod
fun:PyInit__openssl
fun:_PyImport_LoadDynamicModuleWithSpec
obj:/usr/bin/python3.8
obj:/usr/bin/python3.8
fun:PyVectorcall_Call
fun:_PyEval_EvalFrameDefault
}
{
<insert_a_suppression_name_here>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:_PyObject_GC_New
fun:ffi_internal_new
fun:b_init_cffi_1_0_external_module
obj:/usr/bin/python3.8
obj:/usr/bin/python3.8
obj:/usr/bin/python3.8
fun:PyObject_CallMethod
fun:_cffi_init
fun:PyInit__bcrypt
fun:_PyImport_LoadDynamicModuleWithSpec
obj:/usr/bin/python3.8
obj:/usr/bin/python3.8
fun:PyVectorcall_Call
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录