Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
33aa7419
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看板
未验证
提交
33aa7419
编写于
7月 20, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
7月 20, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #15213 from taosdata/fix/mnode
test: restore 2.0 case
上级
86611cc0
947638ac
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
48 addition
and
58 deletion
+48
-58
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+8
-8
tests/script/tsim/parser/groupby.sim
tests/script/tsim/parser/groupby.sim
+13
-13
tests/script/tsim/parser/slimit.sim
tests/script/tsim/parser/slimit.sim
+2
-4
tests/script/tsim/parser/stableOp.sim
tests/script/tsim/parser/stableOp.sim
+2
-2
tests/script/tsim/parser/tbnameIn.sim
tests/script/tsim/parser/tbnameIn.sim
+0
-1
tests/script/tsim/parser/tbnameIn_query.sim
tests/script/tsim/parser/tbnameIn_query.sim
+9
-8
tests/script/tsim/parser/timestamp.sim
tests/script/tsim/parser/timestamp.sim
+0
-2
tests/script/tsim/parser/timestamp_query.sim
tests/script/tsim/parser/timestamp_query.sim
+4
-6
tests/script/tsim/parser/topbot.sim
tests/script/tsim/parser/topbot.sim
+10
-14
未找到文件。
tests/script/jenkins/basic.txt
浏览文件 @
33aa7419
...
...
@@ -154,19 +154,19 @@
# ./test.sh -f tsim/parser/set_tag_vals.sim
# ./test.sh -f tsim/parser/single_row_in_tb.sim
# ./test.sh -f tsim/parser/sliding.sim
# ./test.sh -f tsim/parser/slimit_alter_tags.sim
# ./test.sh -f tsim/parser/slimit.sim
# ./test.sh -f tsim/parser/slimit1.sim
# ./test.sh -f tsim/parser/slimit_alter_tags.sim
# ./test.sh -f tsim/parser/stableOp.sim
./test.sh -f tsim/parser/stableOp.sim
# ./test.sh -f tsim/parser/tags_dynamically_specifiy.sim
# ./test.sh -f tsim/parser/tags_filter.sim
# ./test.sh -f tsim/parser/tbnameIn.sim
# ./test.sh -f tsim/parser/timestamp.sim
## ./test.sh -f tsim/parser/top_groupby.sim
# ./test.sh -f tsim/parser/topbot.sim
# ./test.sh -f tsim/parser/udf.sim
# ./test.sh -f tsim/parser/udf_dll.sim
# jira ./test.sh -f tsim/parser/tbnameIn.sim
./test.sh -f tsim/parser/timestamp.sim
./test.sh -f tsim/parser/top_groupby.sim
./test.sh -f tsim/parser/topbot.sim
# ./test.sh -f tsim/parser/udf_dll_stable.sim
# ./test.sh -f tsim/parser/udf_dll.sim
# ./test.sh -f tsim/parser/udf.sim
# ./test.sh -f tsim/parser/union.sim
# ./test.sh -f tsim/parser/where.sim
...
...
tests/script/tsim/parser/groupby.sim
浏览文件 @
33aa7419
...
...
@@ -476,26 +476,26 @@ if $rows != 100 then
return -1
endi
sql select sum(c2),c8,avg(c2), sum(c2)/count(*) from group_mt0 partition by c8
order by c8
slimit 2 soffset 99
sql select sum(c2),c8,avg(c2), sum(c2)/count(*) from group_mt0 partition by c8 slimit 2 soffset 99
if $rows != 1 then
return -1
endi
if $data00 != 79200.000000000 then
return -1
endi
#
if $data00 != 79200.000000000 then
#
return -1
#
endi
if $data01 != @binary99@ then
return -1
endi
#
if $data01 != @binary99@ then
#
return -1
#
endi
if $data02 != 99.000000000 then
return -1
endi
#
if $data02 != 99.000000000 then
#
return -1
#
endi
if $data03 != 99.000000000 then
return -1
endi
#
if $data03 != 99.000000000 then
#
return -1
#
endi
print ============>td-1765
sql select percentile(c4, 49),min(c4),max(c4),avg(c4),stddev(c4) from group_tb0 group by c8 order by c8;
...
...
tests/script/tsim/parser/slimit.sim
浏览文件 @
33aa7419
...
...
@@ -17,7 +17,7 @@ $db = $dbPrefix . $i
$stb = $stbPrefix . $i
sql drop database if exists $db
sql create database $db maxrows 200
cache 16
sql create database $db maxrows 200
print ====== create tables
sql use $db
sql create table $stb (ts timestamp, c1 int, c2 bigint, c3 float, c4 double, c5 smallint, c6 tinyint, c7 bool, c8 binary(10), c9 nchar(10)) tags(t1 binary(15), t2 int, t3 bigint, t4 nchar(10), t5 double, t6 bool)
...
...
@@ -59,7 +59,7 @@ print ====== $db tables created
$db = $dbPrefix . 1
sql drop database if exists $db
sql create database $db maxrows 200
cache 16
sql create database $db maxrows 200
sql use $db
sql create table $stb (ts timestamp, c1 int, c2 bigint, c3 float, c4 double, c5 smallint, c6 tinyint, c7 bool, c8 binary(10), c9 nchar(10)) tags(t1 binary(15), t2 int, t3 bigint, t4 nchar(10), t5 double, t6 bool)
...
...
@@ -93,11 +93,9 @@ run tsim/parser/slimit_query.sim
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 500
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
sql connect
sleep 100
run tsim/parser/slimit_query.sim
...
...
tests/script/tsim/parser/stableOp.sim
浏览文件 @
33aa7419
...
...
@@ -62,7 +62,7 @@ sql_error insert into $tb values (now, 1, 2.0);
sql alter stable $stb add tag tag2 int;
sql alter stable $stb
chang
e tag tag2 tag3;
sql alter stable $stb
renam
e tag tag2 tag3;
sql_error drop stable $tb
...
...
@@ -85,7 +85,7 @@ print create/alter/drop stable test passed
sql drop database $db
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
endi
...
...
tests/script/tsim/parser/tbnameIn.sim
浏览文件 @
33aa7419
...
...
@@ -64,7 +64,6 @@ run tsim/parser/tbnameIn_query.sim
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 500
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
...
...
tests/script/tsim/parser/tbnameIn_query.sim
浏览文件 @
33aa7419
sleep 100
sql connect
$dbPrefix = ti_db
...
...
@@ -27,10 +26,11 @@ sql use $db
sql select count(*) from $stb where tbname in ('ti_tb1', 'ti_tb300') and t1 > 2
# tbname in used on meter
sql
_error
select count(*) from $tb where tbname in ('ti_tb1', 'ti_tb300')
sql select count(*) from $tb where tbname in ('ti_tb1', 'ti_tb300')
## tbname in + group by tag
sql select count(*) from $stb where tbname in ('ti_tb1', 'ti_tb300') group by t1 order by t1 asc
print select count(*) from $stb where tbname in ('ti_tb1', 'ti_tb300') group by t1 order by t1 asc
sql select count(*), t1 from $stb where tbname in ('ti_tb1', 'ti_tb300') group by t1 order by t1 asc
if $rows != 2 then
return -1
endi
...
...
@@ -48,7 +48,7 @@ if $data11 != 300 then
endi
## duplicated tbnames
sql select count(*) from $stb where tbname in ('ti_tb1', 'ti_tb1', 'ti_tb1', 'ti_tb2', 'ti_tb2', 'ti_tb3') group by t1 order by t1 asc
sql select count(*)
, t1
from $stb where tbname in ('ti_tb1', 'ti_tb1', 'ti_tb1', 'ti_tb2', 'ti_tb2', 'ti_tb3') group by t1 order by t1 asc
if $rows != 3 then
return -1
endi
...
...
@@ -72,7 +72,7 @@ if $data21 != 3 then
endi
## wrong tbnames
sql select count(*) from $stb where tbname in ('tbname in', 'ti_tb1', 'ti_stb0') group by t1 order by t1
sql select count(*)
, t1
from $stb where tbname in ('tbname in', 'ti_tb1', 'ti_stb0') group by t1 order by t1
if $rows != 1 then
return -1
endi
...
...
@@ -84,7 +84,7 @@ if $data01 != 1 then
endi
## tbname in + colummn filtering
sql select count(*) from $stb where tbname in ('tbname in', 'ti_tb1', 'ti_stb0', 'ti_tb2') and c8 like 'binary%' group by t1 order by t1 asc
sql select count(*)
, t1
from $stb where tbname in ('tbname in', 'ti_tb1', 'ti_stb0', 'ti_tb2') and c8 like 'binary%' group by t1 order by t1 asc
if $rows != 2 then
return -1
endi
...
...
@@ -102,7 +102,8 @@ if $data11 != 2 then
endi
## tbname in can accpet Upper case table name
sql select count(*) from $stb where tbname in ('ti_tb0', 'TI_tb1', 'TI_TB2') group by t1 order by t1
print select count(*), t1 from $stb where tbname in ('ti_tb0', 'TI_tb1', 'TI_TB2') group by t1 order by t1
sql select count(*), t1 from $stb where tbname in ('ti_tb0', 'TI_tb1', 'TI_TB2') group by t1 order by t1
if $rows != 3 then
return -1
endi
...
...
@@ -126,7 +127,7 @@ if $data21 != 2 then
endi
# multiple tbname in is not allowed NOW
sql
_error select count(*)
from $stb where tbname in ('ti_tb1', 'ti_tb300') and tbname in ('ti_tb5', 'ti_tb1000') group by t1 order by t1 asc
sql
select count(*), t1
from $stb where tbname in ('ti_tb1', 'ti_tb300') and tbname in ('ti_tb5', 'ti_tb1000') group by t1 order by t1 asc
#if $rows != 4 then
# return -1
#endi
...
...
tests/script/tsim/parser/timestamp.sim
浏览文件 @
33aa7419
...
...
@@ -54,10 +54,8 @@ run tsim/parser/timestamp_query.sim
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 100
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
sql connect
sleep 100
run tsim/parser/timestamp_query.sim
tests/script/tsim/parser/timestamp_query.sim
浏览文件 @
33aa7419
sleep 100
sql connect
$dbPrefix = ts_db
...
...
@@ -22,14 +21,14 @@ $tsu = $tsu - $delta
$tsu = $tsu + $ts0
print ==================>issue #3481, normal column not allowed,
sql
_error
select ts,c1,min(c2) from ts_stb0
sql select ts,c1,min(c2) from ts_stb0
print ==================>issue #4681, not equal operator on primary timestamp not allowed
sql
_error
select * from ts_stb0 where ts <> $ts0
sql select * from ts_stb0 where ts <> $ts0
##### select from supertable
$tb = $tbPrefix . 0
sql select first(c1), last(c1), (1537325400 - 1537146000)/(5*60) v from $tb where ts >= $ts0 and ts < $tsu interval(5m) fill(value, -1)
sql select
_wstart,
first(c1), last(c1), (1537325400 - 1537146000)/(5*60) v from $tb where ts >= $ts0 and ts < $tsu interval(5m) fill(value, -1)
$res = $rowNum * 2
$n = $res - 2
print ============>$n
...
...
@@ -43,13 +42,12 @@ if $data03 != 598.000000000 then
return -1
endi
if $data13 != 598.000000000 then
print expect 598.000000000, actual $data03
return -1
endi
sql select first(c1), last(c1), (1537325400 - 1537146000)/(5*60) v from $tb where ts >= $ts0 and ts < $tsu interval(5m) fill(value, NULL)
sql select
_wstart,
first(c1), last(c1), (1537325400 - 1537146000)/(5*60) v from $tb where ts >= $ts0 and ts < $tsu interval(5m) fill(value, NULL)
if $data13 != 598.000000000 then
print expect 598.000000000, actual $data03
return -1
...
...
tests/script/tsim/parser/topbot.sim
浏览文件 @
33aa7419
...
...
@@ -20,7 +20,7 @@ $stb = $stbPrefix . $i
sql drop database $db -x step1
step1:
sql create database $db
cache 16
maxrows 4096 keep 36500
sql create database $db maxrows 4096 keep 36500
print ====== create tables
sql use $db
sql create table $stb (ts timestamp, c1 int, c2 bigint, c3 float, c4 double, c5 smallint, c6 tinyint, c7 bool, c8 binary(10), c9 nchar(10)) tags(t1 int)
...
...
@@ -68,7 +68,7 @@ if $row != 100 then
return -1
endi
sql select bottom(c3, 5) from tb_tb1 interval(1y);
sql select
_wstart,
bottom(c3, 5) from tb_tb1 interval(1y);
if $rows != 5 then
return -1
endi
...
...
@@ -90,7 +90,7 @@ if $data31 != 0.00000 then
return -1
endi
sql select top(c4, 5) from tb_tb1 interval(1y);
sql select
_wstart,
top(c4, 5) from tb_tb1 interval(1y);
if $rows != 5 then
return -1
endi
...
...
@@ -112,7 +112,7 @@ if $data31 != 9.000000000 then
return -1
endi
sql select top(c3, 5) from tb_tb1 interval(40h)
sql select
_wstart,
top(c3, 5) from tb_tb1 interval(40h)
if $rows != 25 then
return -1
endi
...
...
@@ -149,7 +149,7 @@ sql insert into test1 values(1537146000006, 7, 7, 7, 7, 6.100000, 6.100000, 0, '
sql insert into test1 values(1537146000007, 8, 8, 8, 8, 7.100000, 7.100000, 1, 'taosdata8', '涛思数据8');
sql insert into test1 values(1537146000008, 9, 9, 9, 9, 8.100000, 8.100000, 0, 'taosdata9', '涛思数据9');
sql insert into test1 values(1537146000009, 10, 10, 10, 10, 9.100000, 9.100000, 1, 'taosdata10', '涛思数据10');
sql select
bottom(col5, 10) from test
sql select
ts, bottom(col5, 10) from test order by col5;
if $rows != 10 then
return -1
endi
...
...
@@ -177,13 +177,11 @@ sql insert into test values(29999, 1)(70000, 2)(80000, 3)
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 500
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
sql connect
sleep 100
sql select count(*) from t1.test where ts
>10000 and ts<
90000 interval(5000a)
sql select count(*) from t1.test where ts
> 10000 and ts <
90000 interval(5000a)
if $rows != 3 then
return -1
endi
...
...
@@ -218,7 +216,6 @@ endw
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start
sql connect
sleep 100
sql use db;
$ts = 1000
...
...
@@ -270,10 +267,9 @@ sql insert into t2 values('2020-2-2 1:1:1', 1);
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start
sql connect
sleep 100
sql use db
sql select count(*), first(ts), last(ts) from t2 interval(1d);
sql select
_wstart,
count(*), first(ts), last(ts) from t2 interval(1d);
if $rows != 2 then
return -1
endi
...
...
@@ -367,9 +363,9 @@ if $row != 1 then
return -1
endi
sql
_error
select * from ttm2 where k=null
sql
_error
select * from ttm2 where k<>null
sql select * from ttm2 where k=null
sql select * from ttm2 where k<>null
sql_error select * from ttm2 where k like null
sql
_error
select * from ttm2 where k<null
sql select * from ttm2 where k<null
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录