Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b08ba7c1
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b08ba7c1
编写于
7月 27, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: valgrind case
上级
537666d4
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
34 addition
and
258 deletion
+34
-258
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+4
-4
tests/script/tsim/query/charScalarFunction.sim
tests/script/tsim/query/charScalarFunction.sim
+0
-20
tests/script/tsim/query/complex_group.sim
tests/script/tsim/query/complex_group.sim
+0
-19
tests/script/tsim/query/complex_having.sim
tests/script/tsim/query/complex_having.sim
+0
-19
tests/script/tsim/query/complex_limit.sim
tests/script/tsim/query/complex_limit.sim
+0
-19
tests/script/tsim/query/complex_select.sim
tests/script/tsim/query/complex_select.sim
+0
-19
tests/script/tsim/query/complex_where.sim
tests/script/tsim/query/complex_where.sim
+0
-19
tests/script/tsim/query/crash_sql.sim
tests/script/tsim/query/crash_sql.sim
+0
-19
tests/script/tsim/query/diff.sim
tests/script/tsim/query/diff.sim
+0
-20
tests/script/tsim/query/explain.sim
tests/script/tsim/query/explain.sim
+0
-2
tests/script/tsim/query/interval-offset.sim
tests/script/tsim/query/interval-offset.sim
+0
-1
tests/script/tsim/query/interval.sim
tests/script/tsim/query/interval.sim
+0
-3
tests/script/tsim/query/read.sim
tests/script/tsim/query/read.sim
+0
-6
tests/script/tsim/query/scalarFunction.sim
tests/script/tsim/query/scalarFunction.sim
+0
-20
tests/script/tsim/query/scalarNull.sim
tests/script/tsim/query/scalarNull.sim
+0
-6
tests/script/tsim/query/session.sim
tests/script/tsim/query/session.sim
+0
-20
tests/script/tsim/query/stddev.sim
tests/script/tsim/query/stddev.sim
+0
-19
tests/script/tsim/query/time_process.sim
tests/script/tsim/query/time_process.sim
+0
-19
tests/script/tsim/valgrind/basic1.sim
tests/script/tsim/valgrind/basic1.sim
+11
-1
tests/script/tsim/valgrind/checkError6.sim
tests/script/tsim/valgrind/checkError6.sim
+19
-3
未找到文件。
tests/script/jenkins/basic.txt
浏览文件 @
b08ba7c1
...
...
@@ -165,13 +165,13 @@
# TD-17661 ./test.sh -f tsim/parser/where.sim
# ---- query
./test.sh -f tsim/query/interval.sim
./test.sh -f tsim/query/interval-offset.sim
./test.sh -f tsim/query/scalarFunction.sim
./test.sh -f tsim/query/charScalarFunction.sim
./test.sh -f tsim/query/explain.sim
./test.sh -f tsim/query/session.sim
./test.sh -f tsim/query/interval-offset.sim
./test.sh -f tsim/query/interval.sim
./test.sh -f tsim/query/scalarFunction.sim
./test.sh -f tsim/query/scalarNull.sim
./test.sh -f tsim/query/session.sim
./test.sh -f tsim/query/udf.sim
# ---- qnode
...
...
tests/script/tsim/query/charScalarFunction.sim
浏览文件 @
b08ba7c1
#### length, char_length, lower, upper, ltrim, rtrim, concat, concat_ws, substr.
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
sql connect
$vgroups = 4
...
...
tests/script/tsim/query/complex_group.sim
浏览文件 @
b08ba7c1
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
sql connect
print =============== create database
...
...
tests/script/tsim/query/complex_having.sim
浏览文件 @
b08ba7c1
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
sql connect
print =============== create database
...
...
tests/script/tsim/query/complex_limit.sim
浏览文件 @
b08ba7c1
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
sql connect
print =============== create database
...
...
tests/script/tsim/query/complex_select.sim
浏览文件 @
b08ba7c1
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
sql connect
print =============== create database
...
...
tests/script/tsim/query/complex_where.sim
浏览文件 @
b08ba7c1
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
sql connect
print =============== create database
...
...
tests/script/tsim/query/crash_sql.sim
浏览文件 @
b08ba7c1
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
sql connect
print =============== create database
...
...
tests/script/tsim/query/diff.sim
浏览文件 @
b08ba7c1
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
sql connect
$dbPrefix = db
...
...
tests/script/tsim/query/explain.sim
浏览文件 @
b08ba7c1
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
print ========= start dnode1 as leader
system sh/exec.sh -n dnode1 -s start
sql connect
...
...
tests/script/tsim/query/interval-offset.sim
浏览文件 @
b08ba7c1
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sleep 500
sql connect
print =============== create database
...
...
tests/script/tsim/query/interval.sim
浏览文件 @
b08ba7c1
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c wal -v 1
system sh/exec.sh -n dnode1 -s start
sleep 500
sql connect
$dbPrefix = m_in_db
...
...
tests/script/tsim/query/read.sim
浏览文件 @
b08ba7c1
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c wallevel -v 2
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 1
print ========= start dnode1 as leader
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql create database abc1 vgroups 2;
...
...
tests/script/tsim/query/scalarFunction.sim
浏览文件 @
b08ba7c1
#### abs, log, pow, sqrt, sin, cos, tan, asin, acos, atan, ceil, floor, round
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
sql connect
$vgroups = 4
...
...
tests/script/tsim/query/scalarNull.sim
浏览文件 @
b08ba7c1
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c wallevel -v 2
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 1
print ========= start dnode1 as leader
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
print ======== step1
...
...
tests/script/tsim/query/session.sim
浏览文件 @
b08ba7c1
#### session windows
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
sql connect
$vgroups = 4
...
...
tests/script/tsim/query/stddev.sim
浏览文件 @
b08ba7c1
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
sql connect
print =============== create database
...
...
tests/script/tsim/query/time_process.sim
浏览文件 @
b08ba7c1
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
sql connect
print =============== create database
...
...
tests/script/tsim/valgrind/basic1.sim
浏览文件 @
b08ba7c1
...
...
@@ -45,7 +45,17 @@ while $i < $tbNum
endw
print =============== step3: tb
sql select count(1) from tb1
sql explain analyze select ts from stb where -2;
sql explain analyze select ts from tb1;
sql explain analyze select ts from stb order by ts;
sql explain analyze select * from information_schema.user_stables;
sql explain analyze select count(*),sum(tbcol) from tb1;
sql explain analyze select count(*),sum(tbcol) from stb;
sql explain analyze select count(*),sum(tbcol) from stb group by tbcol;
sql explain analyze select * from information_schema.user_stables;
sql explain analyze verbose true select * from information_schema.user_stables where db_name='db2';
sql explain analyze verbose true select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from stb where ts <= 1601481840000 and ts >= 1601481800000 partition by tgcol interval(1m) fill(value, 0)
sql explain select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from stb where ts <= 1601481840000 and ts >= 1601481800000 partition by tgcol interval(1m) fill(value, 0)
_OVER:
system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
...
tests/script/tsim/valgrind/checkError6.sim
浏览文件 @
b08ba7c1
...
...
@@ -29,7 +29,7 @@ $rowNum = 10
print =============== step2: prepare data
sql create database db vgroups 2
sql use db
sql create table if not exists stb (ts timestamp, tbcol int, tbcol2 float, tbcol3 double) tags (tgcol int unsigned)
sql create table if not exists stb (ts timestamp, tbcol int, tbcol2 float, tbcol3 double
, tbcol4 binary(30), tbcol5 binary(30)
) tags (tgcol int unsigned)
$i = 0
while $i < $tbNum
...
...
@@ -39,13 +39,13 @@ while $i < $tbNum
while $x < $rowNum
$cc = $x * 60000
$ms = 1601481600000 + $cc
sql insert into $tb values ($ms , $x , $x , $x )
sql insert into $tb values ($ms , $x , $x , $x
, "abcd1234=-+*" , "123456 0"
)
$x = $x + 1
endw
$cc = $x * 60000
$ms = 1601481600000 + $cc
sql insert into $tb values ($ms , NULL , NULL , NULL )
sql insert into $tb values ($ms , NULL , NULL , NULL
, NULL , NULL
)
$i = $i + 1
endw
...
...
@@ -68,6 +68,13 @@ sql select first(tbcol), last(tbcol) as b from tb1 where ts <= 1601481840000 int
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), sum(tbcol), stddev(tbcol) from tb1 where ts <= 1601481840000 partition by tgcol interval(1m)
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from tb1 where ts <= 1601481840000 and ts >= 1601481800000 partition by tgcol interval(1m) fill(value, 0)
sql select last_row(*) from tb1 where tbcol > 5 and tbcol < 20
sql select _wstart, _wend, _wduration, _qstart, _qend, count(*) from tb1 interval(10s, 2s) sliding(10s)
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from tb1 where ts <= 1601481840000 and ts >= 1601481800000 partition by tgcol interval(1m) fill(value, 0)
sql select log(tbcol), abs(tbcol), pow(tbcol, 2), sqrt(tbcol), sin(tbcol), cos(tbcol), tan(tbcol), asin(tbcol), acos(tbcol), atan(tbcol), ceil(tbcol), floor(tbcol), round(tbcol), atan(tbcol) from tb1
sql select length("abcd1234"), char_length("abcd1234=-+*") from tb1
sql select tbcol4, length(tbcol4), lower(tbcol4), upper(tbcol4), ltrim(tbcol4), rtrim(tbcol4), concat(tbcol4, tbcol5), concat_ws('_', tbcol4, tbcol5), substr(tbcol4, 1, 4) from tb1
sql select * from tb1 where tbcol not in (1,2,3,null);
sql select * from tb1 where tbcol + 3 <> null;
print =============== step4: stb
sql select avg(tbcol) as c from stb
...
...
@@ -88,6 +95,15 @@ sql select first(tbcol), last(tbcol) as b from stb where ts <= 1601481840000 par
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), sum(tbcol), stddev(tbcol) from stb where ts <= 1601481840000 partition by tgcol interval(1m)
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from stb where ts <= 1601481840000 and ts >= 1601481800000 partition by tgcol interval(1m) fill(value, 0)
sql select last_row(tbcol), stddev(tbcol) from stb where tbcol > 5 and tbcol < 20 group by tgcol
sql select _wstart, _wend, _wduration, _qstart, _qend, count(*) from stb interval(10s, 2s) sliding(10s)
sql select log(tbcol), abs(tbcol), pow(tbcol, 2), sqrt(tbcol), sin(tbcol), cos(tbcol), tan(tbcol), asin(tbcol), acos(tbcol), atan(tbcol), ceil(tbcol), floor(tbcol), round(tbcol), atan(tbcol) from stb
sql select length("abcd1234"), char_length("abcd1234=-+*") from stb
sql select tbcol4, length(tbcol4), lower(tbcol4), upper(tbcol4), ltrim(tbcol4), rtrim(tbcol4), concat(tbcol4, tbcol5), concat_ws('_', tbcol4, tbcol5), substr(tbcol4, 1, 4) from stb
sql select * from stb where tbcol not in (1,2,3,null);
sql select * from stb where tbcol + 3 <> null;
print =============== step5: explain
_OVER:
system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录