Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
d02fb4e0
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
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看板
未验证
提交
d02fb4e0
编写于
7月 14, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
7月 14, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #14897 from taosdata/fix/dnode
test: restore some 2.0 case
上级
1c261c31
13230df9
变更
86
隐藏空白更改
内联
并排
Showing
86 changed file
with
387 addition
and
697 deletion
+387
-697
tests/script/general/insert/testSuite.sim
tests/script/general/insert/testSuite.sim
+0
-9
tests/script/general/table/testSuite.sim
tests/script/general/table/testSuite.sim
+0
-27
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+50
-15
tests/script/tsim/cache/new_metrics.sim
tests/script/tsim/cache/new_metrics.sim
+0
-4
tests/script/tsim/cache/restart_metrics.sim
tests/script/tsim/cache/restart_metrics.sim
+0
-2
tests/script/tsim/cache/restart_table.sim
tests/script/tsim/cache/restart_table.sim
+0
-2
tests/script/tsim/compress/commitlog.sim
tests/script/tsim/compress/commitlog.sim
+1
-9
tests/script/tsim/compute/avg.sim
tests/script/tsim/compute/avg.sim
+9
-11
tests/script/tsim/compute/block_dist.sim
tests/script/tsim/compute/block_dist.sim
+0
-2
tests/script/tsim/compute/bottom.sim
tests/script/tsim/compute/bottom.sim
+12
-14
tests/script/tsim/compute/count.sim
tests/script/tsim/compute/count.sim
+13
-16
tests/script/tsim/compute/diff.sim
tests/script/tsim/compute/diff.sim
+8
-10
tests/script/tsim/compute/diff2.sim
tests/script/tsim/compute/diff2.sim
+35
-35
tests/script/tsim/compute/first.sim
tests/script/tsim/compute/first.sim
+13
-15
tests/script/tsim/compute/interval.sim
tests/script/tsim/compute/interval.sim
+16
-16
tests/script/tsim/compute/last.sim
tests/script/tsim/compute/last.sim
+13
-15
tests/script/tsim/compute/last_row.sim
tests/script/tsim/compute/last_row.sim
+1
-4
tests/script/tsim/compute/leastsquare.sim
tests/script/tsim/compute/leastsquare.sim
+6
-8
tests/script/tsim/compute/max.sim
tests/script/tsim/compute/max.sim
+13
-15
tests/script/tsim/compute/min.sim
tests/script/tsim/compute/min.sim
+0
-2
tests/script/tsim/compute/null.sim
tests/script/tsim/compute/null.sim
+4
-3
tests/script/tsim/compute/percentile.sim
tests/script/tsim/compute/percentile.sim
+0
-2
tests/script/tsim/compute/stddev.sim
tests/script/tsim/compute/stddev.sim
+0
-2
tests/script/tsim/compute/sum.sim
tests/script/tsim/compute/sum.sim
+0
-2
tests/script/tsim/compute/top.sim
tests/script/tsim/compute/top.sim
+0
-2
tests/script/tsim/insert/backquote.sim
tests/script/tsim/insert/backquote.sim
+1
-18
tests/script/tsim/insert/basic.sim
tests/script/tsim/insert/basic.sim
+0
-4
tests/script/tsim/insert/basic0.sim
tests/script/tsim/insert/basic0.sim
+0
-17
tests/script/tsim/insert/basic1.sim
tests/script/tsim/insert/basic1.sim
+1
-0
tests/script/tsim/insert/commit-merge0.sim
tests/script/tsim/insert/commit-merge0.sim
+0
-18
tests/script/tsim/insert/insert_drop.sim
tests/script/tsim/insert/insert_drop.sim
+1
-13
tests/script/tsim/insert/null.sim
tests/script/tsim/insert/null.sim
+72
-92
tests/script/tsim/insert/query_block1_file.sim
tests/script/tsim/insert/query_block1_file.sim
+1
-6
tests/script/tsim/insert/query_block1_memory.sim
tests/script/tsim/insert/query_block1_memory.sim
+1
-6
tests/script/tsim/insert/query_block2_file.sim
tests/script/tsim/insert/query_block2_file.sim
+2
-15
tests/script/tsim/insert/query_block2_memory.sim
tests/script/tsim/insert/query_block2_memory.sim
+1
-6
tests/script/tsim/insert/query_file_memory.sim
tests/script/tsim/insert/query_file_memory.sim
+2
-14
tests/script/tsim/insert/query_multi_file.sim
tests/script/tsim/insert/query_multi_file.sim
+2
-14
tests/script/tsim/insert/tcp.sim
tests/script/tsim/insert/tcp.sim
+1
-4
tests/script/tsim/table/autocreate.sim
tests/script/tsim/table/autocreate.sim
+1
-2
tests/script/tsim/table/back_insert.sim
tests/script/tsim/table/back_insert.sim
+0
-0
tests/script/tsim/table/basic1.sim
tests/script/tsim/table/basic1.sim
+0
-17
tests/script/tsim/table/basic2.sim
tests/script/tsim/table/basic2.sim
+3
-4
tests/script/tsim/table/basic3.sim
tests/script/tsim/table/basic3.sim
+1
-2
tests/script/tsim/table/bigint.sim
tests/script/tsim/table/bigint.sim
+1
-4
tests/script/tsim/table/binary.sim
tests/script/tsim/table/binary.sim
+1
-4
tests/script/tsim/table/bool.sim
tests/script/tsim/table/bool.sim
+1
-4
tests/script/tsim/table/column2.sim
tests/script/tsim/table/column2.sim
+1
-4
tests/script/tsim/table/column_name.sim
tests/script/tsim/table/column_name.sim
+1
-4
tests/script/tsim/table/column_num.sim
tests/script/tsim/table/column_num.sim
+1
-4
tests/script/tsim/table/column_value.sim
tests/script/tsim/table/column_value.sim
+1
-4
tests/script/tsim/table/createmulti.sim
tests/script/tsim/table/createmulti.sim
+1
-2
tests/script/tsim/table/date.sim
tests/script/tsim/table/date.sim
+9
-12
tests/script/tsim/table/db.table.sim
tests/script/tsim/table/db.table.sim
+1
-4
tests/script/tsim/table/delete_reuse1.sim
tests/script/tsim/table/delete_reuse1.sim
+0
-0
tests/script/tsim/table/delete_reuse2.sim
tests/script/tsim/table/delete_reuse2.sim
+0
-0
tests/script/tsim/table/delete_writing.sim
tests/script/tsim/table/delete_writing.sim
+0
-0
tests/script/tsim/table/describe.sim
tests/script/tsim/table/describe.sim
+1
-4
tests/script/tsim/table/double.sim
tests/script/tsim/table/double.sim
+1
-4
tests/script/tsim/table/float.sim
tests/script/tsim/table/float.sim
+1
-4
tests/script/tsim/table/int.sim
tests/script/tsim/table/int.sim
+24
-31
tests/script/tsim/table/limit.sim
tests/script/tsim/table/limit.sim
+3
-8
tests/script/tsim/table/smallint.sim
tests/script/tsim/table/smallint.sim
+19
-24
tests/script/tsim/table/table.sim
tests/script/tsim/table/table.sim
+3
-7
tests/script/tsim/table/table_len.sim
tests/script/tsim/table/table_len.sim
+1
-4
tests/script/tsim/table/tinyint.sim
tests/script/tsim/table/tinyint.sim
+18
-23
tests/script/tsim/table/vgroup.sim
tests/script/tsim/table/vgroup.sim
+14
-18
tests/script/tsim/tag/bigint.sim
tests/script/tsim/tag/bigint.sim
+0
-1
tests/script/tsim/tag/binary.sim
tests/script/tsim/tag/binary.sim
+0
-1
tests/script/tsim/tag/bool.sim
tests/script/tsim/tag/bool.sim
+0
-1
tests/script/tsim/tag/double.sim
tests/script/tsim/tag/double.sim
+0
-1
tests/script/tsim/tag/float.sim
tests/script/tsim/tag/float.sim
+0
-1
tests/script/tsim/tag/int.sim
tests/script/tsim/tag/int.sim
+0
-1
tests/script/tsim/tag/smallint.sim
tests/script/tsim/tag/smallint.sim
+0
-1
tests/script/tsim/tag/tinyint.sim
tests/script/tsim/tag/tinyint.sim
+0
-1
tests/script/tsim/vector/metrics_field.sim
tests/script/tsim/vector/metrics_field.sim
+0
-2
tests/script/tsim/vector/metrics_mix.sim
tests/script/tsim/vector/metrics_mix.sim
+0
-2
tests/script/tsim/vector/metrics_query.sim
tests/script/tsim/vector/metrics_query.sim
+0
-2
tests/script/tsim/vector/metrics_tag.sim
tests/script/tsim/vector/metrics_tag.sim
+0
-2
tests/script/tsim/vector/metrics_time.sim
tests/script/tsim/vector/metrics_time.sim
+0
-2
tests/script/tsim/vector/multi.sim
tests/script/tsim/vector/multi.sim
+0
-2
tests/script/tsim/vector/single.sim
tests/script/tsim/vector/single.sim
+0
-2
tests/script/tsim/vector/table_field.sim
tests/script/tsim/vector/table_field.sim
+0
-2
tests/script/tsim/vector/table_mix.sim
tests/script/tsim/vector/table_mix.sim
+0
-2
tests/script/tsim/vector/table_query.sim
tests/script/tsim/vector/table_query.sim
+0
-2
tests/script/tsim/vector/table_time.sim
tests/script/tsim/vector/table_time.sim
+0
-2
未找到文件。
tests/script/general/insert/testSuite.sim
已删除
100644 → 0
浏览文件 @
1c261c31
run general/insert/basic.sim
run general/insert/insert_drop.sim
run general/insert/query_block1_memory.sim
run general/insert/query_block2_memory.sim
run general/insert/query_block1_file.sim
run general/insert/query_block2_file.sim
run general/insert/query_file_memory.sim
run general/insert/query_multi_file.sim
run general/insert/tcp.sim
tests/script/general/table/testSuite.sim
已删除
100644 → 0
浏览文件 @
1c261c31
run general/table/autocreate.sim
run general/table/basic1.sim
run general/table/basic2.sim
run general/table/basic3.sim
run general/table/bigint.sim
run general/table/binary.sim
run general/table/bool.sim
run general/table/column_name.sim
run general/table/column_num.sim
run general/table/column_value.sim
run general/table/column2.sim
run general/table/date.sim
run general/table/db.table.sim
run general/table/delete_reuse1.sim
run general/table/delete_reuse2.sim
run general/table/delete_writing.sim
run general/table/describe.sim
run general/table/double.sim
run general/table/fill.sim
run general/table/float.sim
run general/table/int.sim
run general/table/limit.sim
run general/table/smallint.sim
run general/table/table_len.sim
run general/table/table.sim
run general/table/tinyint.sim
run general/table/vgroup.sim
tests/script/jenkins/basic.txt
浏览文件 @
d02fb4e0
...
@@ -52,13 +52,22 @@
...
@@ -52,13 +52,22 @@
./test.sh -f tsim/import/replica1.sim
./test.sh -f tsim/import/replica1.sim
# ---- insert
# ---- insert
./test.sh -f tsim/insert/backquote.sim
./test.sh -f tsim/insert/basic.sim
./test.sh -f tsim/insert/basic0.sim
./test.sh -f tsim/insert/basic0.sim
./test.sh -f tsim/insert/basic1.sim
./test.sh -f tsim/insert/basic1.sim
./test.sh -f tsim/insert/backquote.sim
./test.sh -f tsim/insert/null.sim
./test.sh -f tsim/insert/update0.sim
./test.sh -f tsim/insert/commit-merge0.sim
./test.sh -f tsim/insert/commit-merge0.sim
./test.sh -f tsim/insert/insert_drop.sim
./test.sh -f tsim/insert/insert_select.sim
./test.sh -f tsim/insert/insert_select.sim
./test.sh -f tsim/insert/null.sim
./test.sh -f tsim/insert/query_block1_file.sim
./test.sh -f tsim/insert/query_block1_memory.sim
./test.sh -f tsim/insert/query_block2_file.sim
./test.sh -f tsim/insert/query_block2_memory.sim
./test.sh -f tsim/insert/query_file_memory.sim
./test.sh -f tsim/insert/query_multi_file.sim
#./test.sh -f tsim/insert/tcp.sim
./test.sh -f tsim/insert/update0.sim
# ---- parser
# ---- parser
./test.sh -f tsim/parser/groupby-basic.sim
./test.sh -f tsim/parser/groupby-basic.sim
...
@@ -94,7 +103,33 @@
...
@@ -94,7 +103,33 @@
./test.sh -f tsim/show/basic.sim
./test.sh -f tsim/show/basic.sim
# ---- table
# ---- table
./test.sh -f tsim/table/autocreate.sim
./test.sh -f tsim/table/basic1.sim
./test.sh -f tsim/table/basic1.sim
./test.sh -f tsim/table/basic2.sim
./test.sh -f tsim/table/basic3.sim
./test.sh -f tsim/table/bigint.sim
./test.sh -f tsim/table/binary.sim
./test.sh -f tsim/table/bool.sim
./test.sh -f tsim/table/column_name.sim
./test.sh -f tsim/table/column_num.sim
./test.sh -f tsim/table/column_value.sim
./test.sh -f tsim/table/column2.sim
./test.sh -f tsim/table/createmulti.sim
./test.sh -f tsim/table/date.sim
./test.sh -f tsim/table/db.table.sim
# ./test.sh -f tsim/table/delete_reuse1.sim
# ./test.sh -f tsim/table/delete_reuse2.sim
# ./test.sh -f tsim/table/delete_writing.sim
./test.sh -f tsim/table/describe.sim
./test.sh -f tsim/table/double.sim
./test.sh -f tsim/table/float.sim
./test.sh -f tsim/table/int.sim
./test.sh -f tsim/table/limit.sim
./test.sh -f tsim/table/smallint.sim
./test.sh -f tsim/table/table_len.sim
./test.sh -f tsim/table/table.sim
./test.sh -f tsim/table/tinyint.sim
./test.sh -f tsim/table/vgroup.sim
# ---- stream
# ---- stream
./test.sh -f tsim/stream/basic0.sim
./test.sh -f tsim/stream/basic0.sim
...
@@ -228,23 +263,23 @@
...
@@ -228,23 +263,23 @@
./test.sh -f tsim/compress/uncompress.sim
./test.sh -f tsim/compress/uncompress.sim
# ---- compute
# ---- compute
#
./test.sh -f tsim/compute/avg.sim
./test.sh -f tsim/compute/avg.sim
#./test.sh -f tsim/compute/block_dist.sim
#./test.sh -f tsim/compute/block_dist.sim
#
./test.sh -f tsim/compute/bottom.sim
./test.sh -f tsim/compute/bottom.sim
#
./test.sh -f tsim/compute/count.sim
./test.sh -f tsim/compute/count.sim
#
./test.sh -f tsim/compute/diff.sim
./test.sh -f tsim/compute/diff.sim
#
./test.sh -f tsim/compute/diff2.sim
./test.sh -f tsim/compute/diff2.sim
#
./test.sh -f tsim/compute/first.sim
./test.sh -f tsim/compute/first.sim
#
./test.sh -f tsim/compute/interval.sim
./test.sh -f tsim/compute/interval.sim
#./test.sh -f tsim/compute/last_row.sim
#./test.sh -f tsim/compute/last_row.sim
#
./test.sh -f tsim/compute/last.sim
./test.sh -f tsim/compute/last.sim
#
./test.sh -f tsim/compute/leastsquare.sim
./test.sh -f tsim/compute/leastsquare.sim
#
./test.sh -f tsim/compute/max.sim
./test.sh -f tsim/compute/max.sim
#
./test.sh -f tsim/compute/min.sim
./test.sh -f tsim/compute/min.sim
#./test.sh -f tsim/compute/null.sim
#./test.sh -f tsim/compute/null.sim
./test.sh -f tsim/compute/percentile.sim
./test.sh -f tsim/compute/percentile.sim
./test.sh -f tsim/compute/stddev.sim
./test.sh -f tsim/compute/stddev.sim
#
./test.sh -f tsim/compute/sum.sim
./test.sh -f tsim/compute/sum.sim
./test.sh -f tsim/compute/top.sim
./test.sh -f tsim/compute/top.sim
# ---- field
# ---- field
...
...
tests/script/tsim/cache/new_metrics.sim
浏览文件 @
d02fb4e0
...
@@ -83,10 +83,6 @@ while $i < 10
...
@@ -83,10 +83,6 @@ while $i < 10
$i = $i + 1
$i = $i + 1
endw
endw
print ==> sleep 1 seconds to renew cache
sql reset query cache
sleep 1000
print =============== step5
print =============== step5
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
print ===>rows $rows, data $data01
print ===>rows $rows, data $data01
...
...
tests/script/tsim/cache/restart_metrics.sim
浏览文件 @
d02fb4e0
...
@@ -48,9 +48,7 @@ system sh/deploy.sh -n dnode1 -i 1
...
@@ -48,9 +48,7 @@ system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
print =============== step3
print =============== step3
print ==> sleep 1 seconds to renew cache
sql reset query cache
sql reset query cache
sleep 1000
print =============== step4
print =============== step4
sql create database $db
sql create database $db
...
...
tests/script/tsim/cache/restart_table.sim
浏览文件 @
d02fb4e0
...
@@ -32,9 +32,7 @@ system sh/deploy.sh -n dnode1 -i 1
...
@@ -32,9 +32,7 @@ system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
print =============== step3
print =============== step3
print ==> sleep 1 seconds to renew cache
sql reset query cache
sql reset query cache
sleep 1000
print =============== step4
print =============== step4
sql create database $db
sql create database $db
...
...
tests/script/tsim/compress/commitlog.sim
浏览文件 @
d02fb4e0
...
@@ -57,15 +57,7 @@ $tb = $tbPrefix . $i
...
@@ -57,15 +57,7 @@ $tb = $tbPrefix . $i
sql create database $db
sql create database $db
sql use $db
sql use $db
sql create table $tb (ts timestamp, b bool, t tinyint, s smallint, i int, big bigint, f float, d double, str binary(256))
$x = 0
step3:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table $tb (ts timestamp, b bool, t tinyint, s smallint, i int, big bigint, f float, d double, str binary(256)) -x step3
$count = 0
$count = 0
while $count < $N
while $count < $N
...
...
tests/script/tsim/compute/avg.sim
浏览文件 @
d02fb4e0
...
@@ -38,8 +38,6 @@ while $i < $tbNum
...
@@ -38,8 +38,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
@@ -69,13 +67,13 @@ endi
...
@@ -69,13 +67,13 @@ endi
print =============== step5
print =============== step5
sql select avg(tbcol) as b from $tb interval(1m)
sql select avg(tbcol) as b from $tb interval(1m)
print ===> $data01
print ===> $data01
if $data1
1
!= 1.000000000 then
if $data1
0
!= 1.000000000 then
return -1
return -1
endi
endi
sql select avg(tbcol) as b from $tb interval(1d)
sql select avg(tbcol) as b from $tb interval(1d)
print ===> $data01
print ===> $data01
if $data0
1
!= 9.500000000 then
if $data0
0
!= 9.500000000 then
return -1
return -1
endi
endi
...
@@ -84,7 +82,7 @@ $cc = 4 * 60000
...
@@ -84,7 +82,7 @@ $cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select avg(tbcol) as b from $tb where ts <= $ms interval(1m)
sql select avg(tbcol) as b from $tb where ts <= $ms interval(1m)
print ===> $data01
print ===> $data01
if $data4
1
!= 4.000000000 then
if $data4
0
!= 4.000000000 then
return -1
return -1
endi
endi
if $rows != 5 then
if $rows != 5 then
...
@@ -123,14 +121,14 @@ endi
...
@@ -123,14 +121,14 @@ endi
print =============== step9
print =============== step9
sql select avg(tbcol) as b from $mt interval(1m)
sql select avg(tbcol) as b from $mt interval(1m)
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1.000000000 then
if $data1
0
!= 1.000000000 then
return -1
return -1
endi
endi
sql select avg(tbcol) as b from $mt interval(1d)
sql select avg(tbcol) as b from $mt interval(1d)
print ===> $data01
print ===> $data01
if $data0
1
!= 9.500000000 then
if $data0
0
!= 9.500000000 then
return -1
return -1
endi
endi
...
@@ -148,9 +146,9 @@ endi
...
@@ -148,9 +146,9 @@ endi
print =============== step11
print =============== step11
$cc = 4 * 60000
$cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select avg(tbcol) as b from $mt where ts <= $ms
interval(1m) group by tgcol
sql select avg(tbcol) as b from $mt where ts <= $ms
partition by tgcol interval(1m)
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1.000000000 then
if $data1
0
!= 1.000000000 then
return -1
return -1
endi
endi
if $rows != 50 then
if $rows != 50 then
...
...
tests/script/tsim/compute/block_dist.sim
浏览文件 @
d02fb4e0
...
@@ -47,8 +47,6 @@ while $x < $rowNum
...
@@ -47,8 +47,6 @@ while $x < $rowNum
$x = $x + 1
$x = $x + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 0
$i = 0
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
...
tests/script/tsim/compute/bottom.sim
浏览文件 @
d02fb4e0
...
@@ -38,15 +38,13 @@ while $i < $tbNum
...
@@ -38,15 +38,13 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
sql select bottom(tbcol, 1) from $tb
sql select bottom(tbcol, 1) from $tb
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 0 then
if $data0
0
!= 0 then
return -1
return -1
endi
endi
...
@@ -54,25 +52,25 @@ print =============== step3
...
@@ -54,25 +52,25 @@ print =============== step3
$cc = 4 * 60000
$cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select bottom(tbcol, 1) from $tb where ts > $ms
sql select bottom(tbcol, 1) from $tb where ts > $ms
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 5 then
if $data0
0
!= 5 then
return -1
return -1
endi
endi
print =============== step4
print =============== step4
sql select bottom(tbcol, 1) as b from $tb
sql select bottom(tbcol, 1) as b from $tb
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 0 then
if $data0
0
!= 0 then
return -1
return -1
endi
endi
print =============== step5
print =============== step5
sql select bottom(tbcol, 2) as b from $tb
sql select bottom(tbcol, 2) as b from $tb
print ===> $data0
1 $data11
print ===> $data0
0 $data10
if $data0
1 != 0
then
if $data0
0 != 1
then
return -1
return -1
endi
endi
if $data1
1 != 1
then
if $data1
0 != 0
then
return -1
return -1
endi
endi
...
@@ -80,11 +78,11 @@ print =============== step6
...
@@ -80,11 +78,11 @@ print =============== step6
$cc = 4 * 60000
$cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select bottom(tbcol, 2) as b from $tb where ts > $ms
sql select bottom(tbcol, 2) as b from $tb where ts > $ms
print ===> $data0
1 $data11
print ===> $data0
0 $data10
if $data0
1 != 5
then
if $data0
0 != 6
then
return -1
return -1
endi
endi
if $data1
1 != 6
then
if $data1
0 != 5
then
return -1
return -1
endi
endi
...
...
tests/script/tsim/compute/count.sim
浏览文件 @
d02fb4e0
...
@@ -38,13 +38,10 @@ while $i < $tbNum
...
@@ -38,13 +38,10 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
sql select count(*) from $tb
sql select count(*) from $tb
print ===> select count(*) from $tb => $data00
print ===> select count(*) from $tb => $data00
if $data00 != $rowNum then
if $data00 != $rowNum then
...
@@ -81,14 +78,14 @@ endi
...
@@ -81,14 +78,14 @@ endi
print =============== step5
print =============== step5
sql select count(tbcol) as b from $tb interval(1m)
sql select count(tbcol) as b from $tb interval(1m)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 1 then
if $data0
0
!= 1 then
return -1
return -1
endi
endi
sql select count(tbcol) as b from $tb interval(1d)
sql select count(tbcol) as b from $tb interval(1d)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= $rowNum then
if $data0
0
!= $rowNum then
return -1
return -1
endi
endi
...
@@ -96,8 +93,8 @@ print =============== step6
...
@@ -96,8 +93,8 @@ print =============== step6
$cc = 4 * 60000
$cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select count(tbcol) as b from $tb where ts <= $ms interval(1m)
sql select count(tbcol) as b from $tb where ts <= $ms interval(1m)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 1 then
if $data0
0
!= 1 then
return -1
return -1
endi
endi
if $rows != 5 then
if $rows != 5 then
...
@@ -149,17 +146,17 @@ endi
...
@@ -149,17 +146,17 @@ endi
print =============== step9
print =============== step9
sql select count(tbcol) as b from $mt interval(1m)
sql select count(tbcol) as b from $mt interval(1m)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 10 then
if $data0
0
!= 10 then
return -1
return -1
endi
endi
if $data1
1
!= 10 then
if $data1
0
!= 10 then
return -1
return -1
endi
endi
sql select count(tbcol) as b from $mt interval(1d)
sql select count(tbcol) as b from $mt interval(1d)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 200 then
if $data0
0
!= 200 then
return -1
return -1
endi
endi
...
@@ -177,9 +174,9 @@ endi
...
@@ -177,9 +174,9 @@ endi
print =============== step11
print =============== step11
$cc = 4 * 60000
$cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select count(tbcol) as b from $mt where ts <= $ms
interval(1m) group by tgcol
sql select count(tbcol) as b from $mt where ts <= $ms
partition by tgcol interval(1m)
print ===> $data01
print ===> $data01
if $data0
1
!= 1 then
if $data0
0
!= 1 then
return -1
return -1
endi
endi
if $rows != 50 then
if $rows != 50 then
...
...
tests/script/tsim/compute/diff.sim
浏览文件 @
d02fb4e0
...
@@ -37,15 +37,13 @@ while $i < $tbNum
...
@@ -37,15 +37,13 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
sql select diff(tbcol) from $tb
sql select diff(tbcol) from $tb
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
...
@@ -53,23 +51,23 @@ print =============== step3
...
@@ -53,23 +51,23 @@ print =============== step3
$cc = 4 * 60000
$cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select diff(tbcol) from $tb where ts > $ms
sql select diff(tbcol) from $tb where ts > $ms
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
$cc = 4 * 60000
$cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select diff(tbcol) from $tb where ts <= $ms
sql select diff(tbcol) from $tb where ts <= $ms
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
print =============== step4
print =============== step4
sql select diff(tbcol) as b from $tb
sql select diff(tbcol) as b from $tb
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
...
...
tests/script/tsim/compute/diff2.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c debugflag -v 131
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sql connect
sql connect
...
@@ -39,91 +40,90 @@ while $i < $tbNum
...
@@ -39,91 +40,90 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
sql select diff(c1) from $tb
sql select diff(c1) from $tb
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
sql select diff(c2) from $tb
sql select diff(c2) from $tb
print ===> $data1
1
print ===> $data1
0
if $data1
1 != 1.
00000 then
if $data1
0 != 1.0000
00000 then
return -1
return -1
endi
endi
sql select diff(c3) from $tb
sql select diff(c3) from $tb
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
sql select diff(c4) from $tb
sql select diff(c4) from $tb
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
sql select diff(c5) from $tb
sql select diff(c5) from $tb
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 0 then
if $data1
0
!= 0 then
return -1
return -1
endi
endi
sql select diff(c6) from $tb
sql select diff(c6) from $tb
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1.000000000 then
if $data1
0
!= 1.000000000 then
return -1
return -1
endi
endi
sql_error select diff(c7) from $tb
sql select diff(c7) from $tb
sql_error select diff(c8) from $tb
sql_error select diff(c8) from $tb
sql_error select diff(c9) from $tb
sql_error select diff(c9) from $tb
sql_error select diff(ts) from $tb
sql_error select diff(ts) from $tb
sql_error select diff(c1), diff(c2) from $tb
sql_error select diff(c1), diff(c2) from $tb
#sql_error select 2+diff(c1) from $tb
sql_error select diff(c1+2) from $tb
sql select 2+diff(c1) from $tb
sql select diff(c1+2) from $tb
sql_error select diff(c1) from $tb where ts > 0 and ts < now + 100m interval(10m)
sql_error select diff(c1) from $tb where ts > 0 and ts < now + 100m interval(10m)
sql
_error
select diff(c1) from $mt
sql select diff(c1) from $mt
sql_error select diff(diff(c1)) from $tb
sql_error select diff(diff(c1)) from $tb
sql_error select diff(c1) from m_di_tb1 where c2 like '2%'
sql_error select diff(c1) from m_di_tb1 where c2 like '2%'
print =============== step3
print =============== step3
sql select diff(c1) from $tb where c1 > 5
sql select diff(c1) from $tb where c1 > 5
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
sql select diff(c2) from $tb where c2 > 5
sql select diff(c2) from $tb where c2 > 5
print ===> $data1
1
print ===> $data1
0
if $data1
1 != 1.
00000 then
if $data1
0 != 1.0000
00000 then
return -1
return -1
endi
endi
sql select diff(c3) from $tb where c3 > 5
sql select diff(c3) from $tb where c3 > 5
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
sql select diff(c4) from $tb where c4 > 5
sql select diff(c4) from $tb where c4 > 5
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
sql select diff(c5) from $tb where c5 > 5
sql select diff(c5) from $tb where c5 > 5
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 0 then
if $data1
0
!= 0 then
return -1
return -1
endi
endi
sql select diff(c6) from $tb where c6 > 5
sql select diff(c6) from $tb where c6 > 5
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1.000000000 then
if $data1
0
!= 1.000000000 then
return -1
return -1
endi
endi
print =============== step4
print =============== step4
sql select diff(c1) from $tb where c1 > 5 and c2 < $rowNum
sql select diff(c1) from $tb where c1 > 5 and c2 < $rowNum
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
...
@@ -131,8 +131,8 @@ sql select diff(c1) from $tb where c9 like '%9' and c1 <= 20
...
@@ -131,8 +131,8 @@ sql select diff(c1) from $tb where c9 like '%9' and c1 <= 20
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
print ===> $data1
1
print ===> $data1
0
if $data0
1
!= 10 then
if $data0
0
!= 10 then
return -1
return -1
endi
endi
...
...
tests/script/tsim/compute/first.sim
浏览文件 @
d02fb4e0
...
@@ -38,8 +38,6 @@ while $i < $tbNum
...
@@ -38,8 +38,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
@@ -68,14 +66,14 @@ endi
...
@@ -68,14 +66,14 @@ endi
print =============== step5
print =============== step5
sql select first(tbcol) as b from $tb interval(1m)
sql select first(tbcol) as b from $tb interval(1m)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 0 then
if $data0
0
!= 0 then
return -1
return -1
endi
endi
sql select first(tbcol) as b from $tb interval(1d)
sql select first(tbcol) as b from $tb interval(1d)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 0 then
if $data0
0
!= 0 then
return -1
return -1
endi
endi
...
@@ -83,8 +81,8 @@ print =============== step6
...
@@ -83,8 +81,8 @@ print =============== step6
$cc = 4 * 60000
$cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select first(tbcol) as b from $tb where ts <= $ms interval(1m)
sql select first(tbcol) as b from $tb where ts <= $ms interval(1m)
print ===> $data0
1
print ===> $data0
0
if $data4
1
!= 4 then
if $data4
0
!= 4 then
return -1
return -1
endi
endi
if $rows != 5 then
if $rows != 5 then
...
@@ -124,14 +122,14 @@ endi
...
@@ -124,14 +122,14 @@ endi
print =============== step9
print =============== step9
sql select first(tbcol) as b from $mt interval(1m)
sql select first(tbcol) as b from $mt interval(1m)
print select first(tbcol) as b from $mt interval(1m)
print select first(tbcol) as b from $mt interval(1m)
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
sql select first(tbcol) as b from $mt interval(1d)
sql select first(tbcol) as b from $mt interval(1d)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 0 then
if $data0
0
!= 0 then
return -1
return -1
endi
endi
...
@@ -149,9 +147,9 @@ endi
...
@@ -149,9 +147,9 @@ endi
print =============== step11
print =============== step11
$cc = 4 * 60000
$cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select first(tbcol) as b from $mt where ts <= $ms
interval(1m) group by tgcol
sql select first(tbcol) as b from $mt where ts <= $ms
partition by tgcol interval(1m)
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
print ===> $rows
print ===> $rows
...
...
tests/script/tsim/compute/interval.sim
浏览文件 @
d02fb4e0
...
@@ -47,10 +47,10 @@ print ===> $rows
...
@@ -47,10 +47,10 @@ print ===> $rows
if $rows < $rowNum then
if $rows < $rowNum then
return -1
return -1
endi
endi
if $data0
1
!= 1 then
if $data0
0
!= 1 then
return -1
return -1
endi
endi
if $data0
5
!= 1 then
if $data0
4
!= 1 then
return -1
return -1
endi
endi
...
@@ -65,10 +65,10 @@ endi
...
@@ -65,10 +65,10 @@ endi
if $rows < 3 then
if $rows < 3 then
return -1
return -1
endi
endi
if $data0
1
!= 1 then
if $data0
0
!= 1 then
return -1
return -1
endi
endi
if $data0
5
!= 1 then
if $data0
4
!= 1 then
return -1
return -1
endi
endi
...
@@ -87,10 +87,10 @@ endi
...
@@ -87,10 +87,10 @@ endi
if $rows > 22 then
if $rows > 22 then
return -1
return -1
endi
endi
if $data0
1
!= 1 then
if $data0
0
!= 1 then
return -1
return -1
endi
endi
if $data0
5
!= 1 then
if $data0
4
!= 1 then
return -1
return -1
endi
endi
...
@@ -109,10 +109,10 @@ endi
...
@@ -109,10 +109,10 @@ endi
if $rows > 50 then
if $rows > 50 then
return -1
return -1
endi
endi
if $data2
1
!= 1 then
if $data2
0
!= 1 then
return -1
return -1
endi
endi
if $data2
5
!= 1 then
if $data2
4
!= 1 then
return -1
return -1
endi
endi
...
@@ -125,10 +125,10 @@ endi
...
@@ -125,10 +125,10 @@ endi
if $rows > 22 then
if $rows > 22 then
return -1
return -1
endi
endi
if $data1
1
> 15 then
if $data1
0
> 15 then
return -1
return -1
endi
endi
if $data1
1
< 5 then
if $data1
0
< 5 then
return -1
return -1
endi
endi
...
@@ -143,10 +143,10 @@ endi
...
@@ -143,10 +143,10 @@ endi
if $rows > 7 then
if $rows > 7 then
return -1
return -1
endi
endi
if $data1
1
> 15 then
if $data1
0
> 15 then
return -1
return -1
endi
endi
if $data1
1
< 5 then
if $data1
0
< 5 then
return -1
return -1
endi
endi
...
@@ -165,10 +165,10 @@ endi
...
@@ -165,10 +165,10 @@ endi
if $rows > 22 then
if $rows > 22 then
return -1
return -1
endi
endi
if $data1
1
> 15 then
if $data1
0
> 15 then
return -1
return -1
endi
endi
if $data1
1
< 5 then
if $data1
0
< 5 then
return -1
return -1
endi
endi
...
@@ -186,10 +186,10 @@ endi
...
@@ -186,10 +186,10 @@ endi
if $rows > 50 then
if $rows > 50 then
return -1
return -1
endi
endi
if $data1
1
> 15 then
if $data1
0
> 15 then
return -1
return -1
endi
endi
if $data1
1
< 5 then
if $data1
0
< 5 then
return -1
return -1
endi
endi
...
...
tests/script/tsim/compute/last.sim
浏览文件 @
d02fb4e0
...
@@ -38,8 +38,6 @@ while $i < $tbNum
...
@@ -38,8 +38,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
@@ -69,14 +67,14 @@ endi
...
@@ -69,14 +67,14 @@ endi
print =============== step5
print =============== step5
sql select last(tbcol) as b from $tb interval(1m)
sql select last(tbcol) as b from $tb interval(1m)
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
sql select last(tbcol) as b from $tb interval(1d)
sql select last(tbcol) as b from $tb interval(1d)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 19 then
if $data0
0
!= 19 then
return -1
return -1
endi
endi
...
@@ -85,8 +83,8 @@ $cc = 4 * 60000
...
@@ -85,8 +83,8 @@ $cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select last(tbcol) as b from $tb where ts <= $ms interval(1m)
sql select last(tbcol) as b from $tb where ts <= $ms interval(1m)
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
if $rows != 5 then
if $rows != 5 then
...
@@ -127,14 +125,14 @@ endi
...
@@ -127,14 +125,14 @@ endi
print =============== step9
print =============== step9
sql select last(tbcol) as b from $mt interval(1m)
sql select last(tbcol) as b from $mt interval(1m)
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
sql select last(tbcol) as b from $mt interval(1d)
sql select last(tbcol) as b from $mt interval(1d)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 19 then
if $data0
0
!= 19 then
return -1
return -1
endi
endi
...
@@ -153,9 +151,9 @@ print =============== step11
...
@@ -153,9 +151,9 @@ print =============== step11
$cc = 4 * 60000
$cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select last(tbcol) as b from $mt where ts <= $ms
interval(1m) group by tgcol
sql select last(tbcol) as b from $mt where ts <= $ms
partition by tgcol interval(1m)
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
print ===> $rows
print ===> $rows
...
...
tests/script/tsim/compute/last_row.sim
浏览文件 @
d02fb4e0
...
@@ -38,8 +38,6 @@ while $i < $tbNum
...
@@ -38,8 +38,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
@@ -53,6 +51,7 @@ endi
...
@@ -53,6 +51,7 @@ endi
print =============== step3
print =============== step3
$cc = 4 * 60000
$cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
print select last_row(tbcol) from $tb where ts <= $ms
sql select last_row(tbcol) from $tb where ts <= $ms
sql select last_row(tbcol) from $tb where ts <= $ms
print ===> $data00
print ===> $data00
if $data00 != 4 then
if $data00 != 4 then
...
@@ -98,8 +97,6 @@ if $data00 != 4 then
...
@@ -98,8 +97,6 @@ if $data00 != 4 then
return -1
return -1
endi
endi
print =============== step10
print =============== step10
sql select last_row(tbcol) as b from $mt group by tgcol
sql select last_row(tbcol) as b from $mt group by tgcol
print ===> $data00
print ===> $data00
...
...
tests/script/tsim/compute/leastsquare.sim
浏览文件 @
d02fb4e0
...
@@ -37,8 +37,6 @@ while $i < $tbNum
...
@@ -37,8 +37,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
@@ -65,21 +63,21 @@ endi
...
@@ -65,21 +63,21 @@ endi
print =============== step5
print =============== step5
sql select leastsquares(tbcol, 1, 1) as b from $tb interval(1m)
sql select leastsquares(tbcol, 1, 1) as b from $tb interval(1m)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= @{slop:1.000000, intercept:1.000000}@ then
if $data0
0
!= @{slop:1.000000, intercept:1.000000}@ then
return -1
return -1
endi
endi
sql select leastsquares(tbcol, 1, 1) as b from $tb interval(1d)
sql select leastsquares(tbcol, 1, 1) as b from $tb interval(1d)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= @{slop:1.000000, intercept:1.000000}@ then
if $data0
0
!= @{slop:1.000000, intercept:1.000000}@ then
return -1
return -1
endi
endi
print =============== step6
print =============== step6
sql select leastsquares(tbcol, 1, 1) as b from $tb where ts < now + 4m interval(1m)
sql select leastsquares(tbcol, 1, 1) as b from $tb where ts < now + 4m interval(1m)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= @{slop:1.000000, intercept:1.000000}@ then
if $data0
0
!= @{slop:1.000000, intercept:1.000000}@ then
return -1
return -1
endi
endi
print ===> $rows
print ===> $rows
...
...
tests/script/tsim/compute/max.sim
浏览文件 @
d02fb4e0
...
@@ -38,8 +38,6 @@ while $i < $tbNum
...
@@ -38,8 +38,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
@@ -69,14 +67,14 @@ endi
...
@@ -69,14 +67,14 @@ endi
print =============== step5
print =============== step5
sql select max(tbcol) as b from $tb interval(1m)
sql select max(tbcol) as b from $tb interval(1m)
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
sql select max(tbcol) as b from $tb interval(1d)
sql select max(tbcol) as b from $tb interval(1d)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 19 then
if $data0
0
!= 19 then
return -1
return -1
endi
endi
...
@@ -85,8 +83,8 @@ $cc = 4 * 60000
...
@@ -85,8 +83,8 @@ $cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select max(tbcol) as b from $tb where ts <= $ms interval(1m)
sql select max(tbcol) as b from $tb where ts <= $ms interval(1m)
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
if $rows != 5 then
if $rows != 5 then
...
@@ -127,14 +125,14 @@ endi
...
@@ -127,14 +125,14 @@ endi
print =============== step9
print =============== step9
sql select max(tbcol) as b from $mt interval(1m)
sql select max(tbcol) as b from $mt interval(1m)
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
sql select max(tbcol) as b from $mt interval(1d)
sql select max(tbcol) as b from $mt interval(1d)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 19 then
if $data0
0
!= 19 then
return -1
return -1
endi
endi
...
@@ -153,9 +151,9 @@ print =============== step11
...
@@ -153,9 +151,9 @@ print =============== step11
$cc = 4 * 60000
$cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select max(tbcol) as b from $mt where ts <= $ms
interval(1m) group by tgcol
sql select max(tbcol) as b from $mt where ts <= $ms
partition by tgcol interval(1m)
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
print ===> $rows
print ===> $rows
...
...
tests/script/tsim/compute/min.sim
浏览文件 @
d02fb4e0
...
@@ -38,8 +38,6 @@ while $i < $tbNum
...
@@ -38,8 +38,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
...
tests/script/tsim/compute/null.sim
浏览文件 @
d02fb4e0
...
@@ -100,9 +100,10 @@ if $rows != 1 then
...
@@ -100,9 +100,10 @@ if $rows != 1 then
return -1
return -1
endi
endi
sql_error select * from $tb where tbcol = NULL
sql select * from $tb where tbcol = NULL
if $rows != 0 then
return
return -1
endi
print =============== step5
print =============== step5
sql create table tt using $mt tags( NULL )
sql create table tt using $mt tags( NULL )
...
...
tests/script/tsim/compute/percentile.sim
浏览文件 @
d02fb4e0
...
@@ -38,8 +38,6 @@ while $i < $tbNum
...
@@ -38,8 +38,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
...
tests/script/tsim/compute/stddev.sim
浏览文件 @
d02fb4e0
...
@@ -38,8 +38,6 @@ while $i < $tbNum
...
@@ -38,8 +38,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
...
tests/script/tsim/compute/sum.sim
浏览文件 @
d02fb4e0
...
@@ -38,8 +38,6 @@ while $i < $tbNum
...
@@ -38,8 +38,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
...
tests/script/tsim/compute/top.sim
浏览文件 @
d02fb4e0
...
@@ -38,8 +38,6 @@ while $i < $tbNum
...
@@ -38,8 +38,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
...
tests/script/tsim/insert/backquote.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 50
sql connect
sql connect
print =============== create database
print =============== create database
sql create database `database`
sql create database `database`
sql create database `DataBase`
sql create database `DataBase`
...
@@ -184,23 +184,6 @@ print =============== stop and restart taosd
...
@@ -184,23 +184,6 @@ print =============== stop and restart taosd
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start
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 show databases
sql show databases
print rows: $rows
print rows: $rows
print $data00 $data01
print $data00 $data01
...
...
tests/script/
general
/insert/basic.sim
→
tests/script/
tsim
/insert/basic.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
...
tests/script/tsim/insert/basic0.sim
浏览文件 @
d02fb4e0
...
@@ -271,23 +271,6 @@ print =============== stop and restart taosd, then again do query above
...
@@ -271,23 +271,6 @@ print =============== stop and restart taosd, then again do query above
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start
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
print =============== query data from child table
print =============== query data from child table
sql select * from ct1
sql select * from ct1
print rows: $rows
print rows: $rows
...
...
tests/script/tsim/insert/basic1.sim
浏览文件 @
d02fb4e0
...
@@ -2,6 +2,7 @@ system sh/stop_dnodes.sh
...
@@ -2,6 +2,7 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sql connect
sql connect
print =============== create database
print =============== create database
sql create database d1
sql create database d1
sql show databases
sql show databases
...
...
tests/script/tsim/insert/commit-merge0.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 50
sql connect
sql connect
print =============== create database
print =============== create database
...
@@ -64,23 +63,6 @@ reboot_and_check:
...
@@ -64,23 +63,6 @@ reboot_and_check:
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start
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
print =============== insert duplicated records to memory - loop $reboot_max - $reboot_cnt
print =============== insert duplicated records to memory - loop $reboot_max - $reboot_cnt
sql use db
sql use db
sql insert into ct1 values ('2022-05-01 18:30:27.001', 0.0);
sql insert into ct1 values ('2022-05-01 18:30:27.001', 0.0);
...
...
tests/script/
general
/insert/insert_drop.sim
→
tests/script/
tsim
/insert/insert_drop.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$tbNum = 10
$tbNum = 10
...
@@ -19,7 +15,7 @@ $stb = stb
...
@@ -19,7 +15,7 @@ $stb = stb
sql drop database $db -x step1
sql drop database $db -x step1
step1:
step1:
sql create database $db
ctime 30
sql create database $db
print ====== create tables
print ====== create tables
sql use $db
sql use $db
sql create table $stb (ts timestamp, c1 int) tags(t1 int)
sql create table $stb (ts timestamp, c1 int) tags(t1 int)
...
@@ -43,13 +39,9 @@ print ====== tables created
...
@@ -43,13 +39,9 @@ print ====== tables created
print ================== restart server to commit data into disk
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 3000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
print ================== server restart completed
sql reset query cache
sleep 1000
sql use $db
sql use $db
sql drop table tb5
sql drop table tb5
$i = 0
$i = 0
...
@@ -69,13 +61,9 @@ endw
...
@@ -69,13 +61,9 @@ endw
print ================== restart server to commit data into disk
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 3000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
print ================== server restart completed
sql reset query cache
sleep 1000
sql use $db
sql use $db
sql create table tb5 using $stb tags(5)
sql create table tb5 using $stb tags(5)
...
...
tests/script/tsim/insert/null.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 50
sql connect
sql connect
print =============== create database
print =============== create database
...
@@ -211,66 +210,48 @@ endi
...
@@ -211,66 +210,48 @@ endi
#===================================================================
#===================================================================
#print =============== query data from stb
#print =============== query data from stb
#sql select * from stb
sql select * from stb
#print ===>
print ===>
#print ===> rows: $rows
print ===> rows: $rows
#print ===> rows0: $data00 $data01 $data02 $data03 $data04
print ===> rows0: $data00 $data01 $data02 $data03 $data04
#if $rows != 4 then
if $rows != 12 then
# return -1
return -1
#endi
endi
#print =============== select count(*) from supter table
#print =============== select count(*) from supter table
#
sql select count(*) from stb
sql select count(*) from stb
#
print $data00 $data01 $data02
print $data00 $data01 $data02
#
if $rows != 1 then
if $rows != 1 then
#
return -1
return -1
#
endi
endi
#
if $data00 != 12 then
if $data00 != 12 then
#
return -1
return -1
#
endi
endi
#print =============== select count(column) from supter table
#print =============== select count(column) from supter table
#
sql select count(ts), count(c1), count(c2), count(c3) from stb
sql select count(ts), count(c1), count(c2), count(c3) from stb
#
print $data00 $data01 $data02 $data03
print $data00 $data01 $data02 $data03
#
if $data00 != 12 then
if $data00 != 12 then
#
return -1
return -1
#
endi
endi
#
if $data01 != 8 then
if $data01 != 8 then
#
return -1
return -1
#
endi
endi
#
if $data02 != 8 then
if $data02 != 8 then
#
return -1
return -1
#
endi
endi
#
if $data03 != 8 then
if $data03 != 8 then
#
return -1
return -1
#
endi
endi
#===================================================================
#===================================================================
#===================================================================
print =============== stop and restart taosd, then again do query above
print =============== stop and restart taosd, then again do query above
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
print ===> waiting dnode ready
$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
#===================================================================
#===================================================================
#===================================================================
print =============== query data from child table
print =============== query data from child table
sql select * from ct1
sql select * from ct1
print ===> select * from ct1
print ===> select * from ct1
...
@@ -292,15 +273,15 @@ endi
...
@@ -292,15 +273,15 @@ endi
if $data03 != 3.000000000 then
if $data03 != 3.000000000 then
return -1
return -1
endi
endi
#if $data41 != -14
then
if $data41 != 12
then
#
return -1
return -1
#
endi
endi
#if $data42 != -2.4
0000 then
if $data42 != 2.2
0000 then
#
return -1
return -1
#
endi
endi
#if $data43 != -3.400000000
then
if $data43 != NULL
then
#
return -1
return -1
#
endi
endi
print =============== select count(*) from child table
print =============== select count(*) from child table
sql select count(*) from ct1
sql select count(*) from ct1
...
@@ -435,40 +416,39 @@ if $data92 != 3.600000000 then
...
@@ -435,40 +416,39 @@ if $data92 != 3.600000000 then
return -1
return -1
endi
endi
#===================================================================
#===================================================================
#===================================================================
#
print =============== query data from stb
print =============== query data from stb
#
sql select * from stb
sql select * from stb
#
print ===>
print ===>
#
print ===> rows: $rows
print ===> rows: $rows
#
print ===> rows0: $data00 $data01 $data02 $data03 $data04
print ===> rows0: $data00 $data01 $data02 $data03 $data04
#if $rows != 4
then
if $rows != 12
then
#
return -1
return -1
#
endi
endi
#
print =============== select count(*) from supter table
print =============== select count(*) from supter table
#
sql select count(*) from stb
sql select count(*) from stb
#
print $data00 $data01 $data02
print $data00 $data01 $data02
#
if $rows != 1 then
if $rows != 1 then
#
return -1
return -1
#
endi
endi
#
if $data00 != 12 then
if $data00 != 12 then
#
return -1
return -1
#
endi
endi
#
print =============== select count(column) from supter table
print =============== select count(column) from supter table
#
sql select count(ts), count(c1), count(c2), count(c3) from stb
sql select count(ts), count(c1), count(c2), count(c3) from stb
#
print $data00 $data01 $data02 $data03
print $data00 $data01 $data02 $data03
#
if $data00 != 12 then
if $data00 != 12 then
#
return -1
return -1
#
endi
endi
#
if $data01 != 8 then
if $data01 != 8 then
#
return -1
return -1
#
endi
endi
#
if $data02 != 8 then
if $data02 != 8 then
#
return -1
return -1
#
endi
endi
#
if $data03 != 8 then
if $data03 != 8 then
#
return -1
return -1
#
endi
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
tests/script/
general
/insert/query_block1_file.sim
→
tests/script/
tsim
/insert/query_block1_file.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -190,7 +185,7 @@ clear:
...
@@ -190,7 +185,7 @@ clear:
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/insert/query_block1_memory.sim
→
tests/script/
tsim
/insert/query_block1_memory.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -175,7 +170,7 @@ clear:
...
@@ -175,7 +170,7 @@ clear:
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/insert/query_block2_file.sim
→
tests/script/
tsim
/insert/query_block2_file.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -19,15 +14,7 @@ sql drop database -x step1
...
@@ -19,15 +14,7 @@ sql drop database -x step1
step1:
step1:
sql create database $db
sql create database $db
sql use $db
sql use $db
sql create table $tb (ts timestamp, speed int)
$x = 0
create1:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table $tb (ts timestamp, speed int) -x create1
#commit to file will trigger if insert 82 rows
#commit to file will trigger if insert 82 rows
$N = 82
$N = 82
...
@@ -204,7 +191,7 @@ clear:
...
@@ -204,7 +191,7 @@ clear:
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/insert/query_block2_memory.sim
→
tests/script/
tsim
/insert/query_block2_memory.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -167,7 +162,7 @@ endi
...
@@ -167,7 +162,7 @@ endi
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/insert/query_file_memory.sim
→
tests/script/
tsim
/insert/query_file_memory.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -20,14 +15,7 @@ step1:
...
@@ -20,14 +15,7 @@ step1:
sql create database $db
sql create database $db
sql use $db
sql use $db
$x = 0
sql create table $tb (ts timestamp, speed int)
create1:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table $tb (ts timestamp, speed int) -x create1
#commit to file will trigger if insert 82 rows
#commit to file will trigger if insert 82 rows
...
@@ -202,7 +190,7 @@ clear:
...
@@ -202,7 +190,7 @@ clear:
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/insert/query_multi_file.sim
→
tests/script/
tsim
/insert/query_multi_file.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -20,14 +15,7 @@ step1:
...
@@ -20,14 +15,7 @@ step1:
sql create database $db
sql create database $db
sql use $db
sql use $db
$x = 0
sql create table $tb (ts timestamp, speed int)
create1:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table $tb (ts timestamp, speed int) -x create1
$N = 20000
$N = 20000
...
@@ -49,7 +37,7 @@ endi
...
@@ -49,7 +37,7 @@ endi
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/insert/tcp.sim
→
tests/script/
tsim
/insert/tcp.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c
walLevel -v
1
system sh/cfg.sh -n dnode1 -c
debugflag -v 13
1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
sql create database d1;
sql create database d1;
...
...
tests/script/
general
/table/autocreate.sim
→
tests/script/
tsim
/table/autocreate.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
print =============== create database
print =============== create database
sql create database db
sql create database db
sql show databases
sql show databases
if $rows !=
1
then
if $rows !=
3
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/back_insert.sim
→
tests/script/
tsim
/table/back_insert.sim
浏览文件 @
d02fb4e0
文件已移动
tests/script/tsim/table/basic1.sim
浏览文件 @
d02fb4e0
...
@@ -213,23 +213,6 @@ endi
...
@@ -213,23 +213,6 @@ endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start
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
print =============== query data
print =============== query data
sql select * from c1
sql select * from c1
print rows: $rows
print rows: $rows
...
...
tests/script/
general
/table/basic2.sim
→
tests/script/
tsim
/table/basic2.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
print =============== one table
print =============== one table
...
@@ -21,11 +20,11 @@ endi
...
@@ -21,11 +20,11 @@ endi
print =============== show
print =============== show
sql show databases
sql show databases
if $data
0
2 != 2 then
if $data
2
2 != 2 then
return -1
return -1
endi
endi
if $data
03
!= 1 then
if $data
24
!= 1 then
return -1
return -1
endi
endi
...
@@ -34,7 +33,7 @@ if $data00 != 2 then
...
@@ -34,7 +33,7 @@ if $data00 != 2 then
return -1
return -1
endi
endi
if $data01 !=
2
then
if $data01 !=
d1
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/basic3.sim
→
tests/script/
tsim
/table/basic3.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
print =============== create database
print =============== create database
sql create database db
sql create database db
sql show databases
sql show databases
if $rows !=
1
then
if $rows !=
3
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/bigint.sim
→
tests/script/
tsim
/table/bigint.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -66,7 +63,7 @@ endi
...
@@ -66,7 +63,7 @@ endi
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/binary.sim
→
tests/script/
tsim
/table/binary.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -56,7 +53,7 @@ endi
...
@@ -56,7 +53,7 @@ endi
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/bool.sim
→
tests/script/
tsim
/table/bool.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -85,7 +82,7 @@ endi
...
@@ -85,7 +82,7 @@ endi
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/column2.sim
→
tests/script/
tsim
/table/column2.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
print =============== step1
print =============== step1
...
@@ -19,7 +16,7 @@ endi
...
@@ -19,7 +16,7 @@ endi
sql drop database db
sql drop database db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/column_name.sim
→
tests/script/
tsim
/table/column_name.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -79,7 +76,7 @@ endi
...
@@ -79,7 +76,7 @@ endi
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/column_num.sim
→
tests/script/
tsim
/table/column_num.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -78,7 +75,7 @@ endi
...
@@ -78,7 +75,7 @@ endi
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/column_value.sim
→
tests/script/
tsim
/table/column_value.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -68,7 +65,7 @@ endi
...
@@ -68,7 +65,7 @@ endi
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/createmulti.sim
→
tests/script/
tsim
/table/createmulti.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql connect
print =============== create database
print =============== create database
sql create database db
sql create database db
sql show databases
sql show databases
if $rows !=
1
then
if $rows !=
3
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/date.sim
→
tests/script/
tsim
/table/date.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -27,18 +24,18 @@ if $data00 != @17-01-01 08:00:00.001@ then
...
@@ -27,18 +24,18 @@ if $data00 != @17-01-01 08:00:00.001@ then
endi
endi
print =============== step2
print =============== step2
sql insert into $tb values ('2017-08-28 00:23:46.429+ 1a', 2)
sql
_error
insert into $tb values ('2017-08-28 00:23:46.429+ 1a', 2)
#sql
insert into $tb values ('2017-08-28 00:23:46cd .429', 2)
sql_error
insert into $tb values ('2017-08-28 00:23:46cd .429', 2)
sql select ts from $tb
sql select ts from $tb
if $rows !=
2
then
if $rows !=
1
then
return -1
return -1
endi
endi
print =============== step3
print =============== step3
#sql
insert into $tb values ('1970-01-01 08:00:00.000', 3)
sql_error
insert into $tb values ('1970-01-01 08:00:00.000', 3)
#sql
insert into $tb values ('1970-01-01 08:00:00.000', 3)
sql_error
insert into $tb values ('1970-01-01 08:00:00.000', 3)
sql select ts from $tb
sql select ts from $tb
if $rows !=
2
then
if $rows !=
1
then
return -1
return -1
endi
endi
...
@@ -57,7 +54,7 @@ print =============== step5
...
@@ -57,7 +54,7 @@ print =============== step5
sql_error insert into $tb values ('9999-12-31 213:59:59.999', 13)
sql_error insert into $tb values ('9999-12-31 213:59:59.999', 13)
sql select ts from $tb
sql select ts from $tb
print $rows
print $rows
if $rows !=
8
then
if $rows !=
7
then
return -1
return -1
endi
endi
...
@@ -65,7 +62,7 @@ print =============== step6
...
@@ -65,7 +62,7 @@ print =============== step6
sql_error insert into $tb values ('9999-12-99 23:59:59.999', 13)
sql_error insert into $tb values ('9999-12-99 23:59:59.999', 13)
sql select ts from $tb
sql select ts from $tb
if $rows !=
8
then
if $rows !=
7
then
return -1
return -1
endi
endi
...
@@ -83,7 +80,7 @@ endi
...
@@ -83,7 +80,7 @@ endi
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/db.table.sim
→
tests/script/
tsim
/table/db.table.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -40,7 +37,7 @@ sql drop table $table
...
@@ -40,7 +37,7 @@ sql drop table $table
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/delete_reuse1.sim
→
tests/script/
tsim
/table/delete_reuse1.sim
浏览文件 @
d02fb4e0
文件已移动
tests/script/
general
/table/delete_reuse2.sim
→
tests/script/
tsim
/table/delete_reuse2.sim
浏览文件 @
d02fb4e0
文件已移动
tests/script/
general
/table/delete_writing.sim
→
tests/script/
tsim
/table/delete_writing.sim
浏览文件 @
d02fb4e0
文件已移动
tests/script/
general
/table/describe.sim
→
tests/script/
tsim
/table/describe.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -42,7 +39,7 @@ endi
...
@@ -42,7 +39,7 @@ endi
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/double.sim
→
tests/script/
tsim
/table/double.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -91,7 +88,7 @@ endi
...
@@ -91,7 +88,7 @@ endi
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/float.sim
→
tests/script/
tsim
/table/float.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -91,7 +88,7 @@ endi
...
@@ -91,7 +88,7 @@ endi
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/int.sim
→
tests/script/
tsim
/table/int.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -27,12 +24,10 @@ if $data01 != NULL then
...
@@ -27,12 +24,10 @@ if $data01 != NULL then
endi
endi
print =============== step2
print =============== step2
sql insert into $tb values (now+1m, -2147483648) -x step2
sql insert into $tb values (now+1m, -2147483648)
return -1
sql insert into $tb values (now+2m, NULL)
step2:
sql insert into $tb values (now+1m, NULL)
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows !=
2
then
if $rows !=
3
then
return -1
return -1
endi
endi
if $data01 != NULL then
if $data01 != NULL then
...
@@ -40,9 +35,9 @@ if $data01 != NULL then
...
@@ -40,9 +35,9 @@ if $data01 != NULL then
endi
endi
print =============== step3
print =============== step3
sql insert into $tb values (now+
2
m, 2147483647)
sql insert into $tb values (now+
3
m, 2147483647)
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows !=
3
then
if $rows !=
4
then
return -1
return -1
endi
endi
if $data01 != 2147483647 then
if $data01 != 2147483647 then
...
@@ -50,12 +45,10 @@ if $data01 != 2147483647 then
...
@@ -50,12 +45,10 @@ if $data01 != 2147483647 then
endi
endi
print =============== step4
print =============== step4
sql insert into $tb values (now+3m, 2147483648) -x step4
sql_error insert into $tb values (now+4m, 2147483648)
return -1
sql insert into $tb values (now+5m, NULL)
step4:
sql insert into $tb values (now+3m, NULL)
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows !=
4
then
if $rows !=
5
then
return -1
return -1
endi
endi
if $data01 != NULL then
if $data01 != NULL then
...
@@ -63,10 +56,10 @@ if $data01 != NULL then
...
@@ -63,10 +56,10 @@ if $data01 != NULL then
endi
endi
print =============== step5
print =============== step5
sql_error insert into $tb values (now+
4
m, a2)
sql_error insert into $tb values (now+
6
m, a2)
sql insert into $tb values (now+
4
m, 0)
sql insert into $tb values (now+
7
m, 0)
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows !=
5
then
if $rows !=
6
then
return -1
return -1
endi
endi
if $data01 != 0 then
if $data01 != 0 then
...
@@ -74,10 +67,10 @@ if $data01 != 0 then
...
@@ -74,10 +67,10 @@ if $data01 != 0 then
endi
endi
print =============== step6
print =============== step6
sql_error insert into $tb values (now+
5
m, 2a)
sql_error insert into $tb values (now+
8
m, 2a)
sql insert into $tb values (now+
5
m, 2)
sql insert into $tb values (now+
9
m, 2)
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows !=
6
then
if $rows !=
7
then
return -1
return -1
endi
endi
if $data01 != 2 then
if $data01 != 2 then
...
@@ -85,10 +78,10 @@ if $data01 != 2 then
...
@@ -85,10 +78,10 @@ if $data01 != 2 then
endi
endi
print =============== step7
print =============== step7
sql_error insert into $tb values (now+
6
m, 2a'1)
sql_error insert into $tb values (now+
10
m, 2a'1)
sql insert into $tb values (now+
6
m, 2)
sql insert into $tb values (now+
11
m, 2)
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows !=
7
then
if $rows !=
8
then
return -1
return -1
endi
endi
if $data01 != 2 then
if $data01 != 2 then
...
@@ -96,9 +89,9 @@ if $data01 != 2 then
...
@@ -96,9 +89,9 @@ if $data01 != 2 then
endi
endi
print =============== step8
print =============== step8
sql insert into $tb values (now+
8
m, "NULL")
sql insert into $tb values (now+
12
m, "NULL")
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows !=
8
then
if $rows !=
9
then
return -1
return -1
endi
endi
if $data01 != NULL then
if $data01 != NULL then
...
@@ -106,9 +99,9 @@ if $data01 != NULL then
...
@@ -106,9 +99,9 @@ if $data01 != NULL then
endi
endi
print =============== step9
print =============== step9
sql insert into $tb values (now+
9
m, 'NULL')
sql insert into $tb values (now+
13
m, 'NULL')
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows !=
9
then
if $rows !=
10
then
return -1
return -1
endi
endi
if $data01 != NULL then
if $data01 != NULL then
...
@@ -116,9 +109,9 @@ if $data01 != NULL then
...
@@ -116,9 +109,9 @@ if $data01 != NULL then
endi
endi
print =============== step10
print =============== step10
sql insert into $tb values (now+1
0
m, -123)
sql insert into $tb values (now+1
4
m, -123)
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows != 1
0
then
if $rows != 1
1
then
return -1
return -1
endi
endi
if $data01 != -123 then
if $data01 != -123 then
...
@@ -127,7 +120,7 @@ endi
...
@@ -127,7 +120,7 @@ endi
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/limit.sim
→
tests/script/
tsim
/table/limit.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 129
system sh/cfg.sh -n dnode1 -c maxVgroupsPerDb -v 8
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
print ============================ dnode1 start
print ============================ dnode1 start
...
@@ -17,10 +12,10 @@ $db = $dbPrefix . $i
...
@@ -17,10 +12,10 @@ $db = $dbPrefix . $i
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
print =================== step 0
print =================== step 0
sql create database $db
sql create database $db
vgroups 8
sql use $db
sql use $db
sql show vgroups
sql show vgroups
if $rows !=
0
then
if $rows !=
8
then
return -1
return -1
endi
endi
...
@@ -87,7 +82,7 @@ endi
...
@@ -87,7 +82,7 @@ endi
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/smallint.sim
→
tests/script/
tsim
/table/smallint.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -28,12 +25,10 @@ if $data01 != NULL then
...
@@ -28,12 +25,10 @@ if $data01 != NULL then
endi
endi
print =============== step2
print =============== step2
sql insert into $tb values (now+1m, -32768) -x step2
sql insert into $tb values (now+1m, -32768)
return -1
sql insert into $tb values (now+2m, NULL)
step2:
sql insert into $tb values (now+1m, NULL)
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows !=
2
then
if $rows !=
3
then
return -1
return -1
endi
endi
if $data01 != NULL then
if $data01 != NULL then
...
@@ -41,9 +36,9 @@ if $data01 != NULL then
...
@@ -41,9 +36,9 @@ if $data01 != NULL then
endi
endi
print =============== step3
print =============== step3
sql insert into $tb values (now+
2
m, 32767)
sql insert into $tb values (now+
3
m, 32767)
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows !=
3
then
if $rows !=
4
then
return -1
return -1
endi
endi
if $data01 != 32767 then
if $data01 != 32767 then
...
@@ -51,12 +46,12 @@ if $data01 != 32767 then
...
@@ -51,12 +46,12 @@ if $data01 != 32767 then
endi
endi
print =============== step4
print =============== step4
sql insert into $tb values (now+
3
m, 32768) -x step4
sql insert into $tb values (now+
4
m, 32768) -x step4
return -1
return -1
step4:
step4:
sql insert into $tb values (now+
3
m, NULL)
sql insert into $tb values (now+
5
m, NULL)
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows !=
4
then
if $rows !=
5
then
return -1
return -1
endi
endi
if $data01 != NULL then
if $data01 != NULL then
...
@@ -64,10 +59,10 @@ if $data01 != NULL then
...
@@ -64,10 +59,10 @@ if $data01 != NULL then
endi
endi
print =============== step5
print =============== step5
sql_error insert into $tb values (now+
4
m, a2)
sql_error insert into $tb values (now+
6
m, a2)
sql insert into $tb values (now+
4
m, 0)
sql insert into $tb values (now+
7
m, 0)
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows !=
5
then
if $rows !=
6
then
return -1
return -1
endi
endi
if $data01 != 0 then
if $data01 != 0 then
...
@@ -75,10 +70,10 @@ if $data01 != 0 then
...
@@ -75,10 +70,10 @@ if $data01 != 0 then
endi
endi
print =============== step6
print =============== step6
sql_error insert into $tb values (now+
5
m, 2a)
sql_error insert into $tb values (now+
8
m, 2a)
sql insert into $tb values (now+
5
m, 2)
sql insert into $tb values (now+
9
m, 2)
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows !=
6
then
if $rows !=
7
then
return -1
return -1
endi
endi
if $data01 != 2 then
if $data01 != 2 then
...
@@ -86,19 +81,19 @@ if $data01 != 2 then
...
@@ -86,19 +81,19 @@ if $data01 != 2 then
endi
endi
print =============== step7
print =============== step7
sql_error insert into $tb values (now+
6
m, 2a'1)
sql_error insert into $tb values (now+
10
m, 2a'1)
sql insert into $tb values (now+
6
m, 2)
sql insert into $tb values (now+
11
m, 2)
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows !=
7
then
if $rows !=
8
then
return -1
return -1
endi
endi
if $data01 != 2 then
if $data01 != 2 then
return -1
return -1
endi
endi
return
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/table.sim
→
tests/script/
tsim
/table/table.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
print ============================ dnode1 start
print ============================ dnode1 start
...
@@ -200,16 +197,15 @@ if $data01 != 7 then
...
@@ -200,16 +197,15 @@ if $data01 != 7 then
endi
endi
print =============== step10
print =============== step10
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
sql create table $tb (ts timestamp, val tinyint, val2 tinyint)
sql
_error
create table $tb (ts timestamp, val tinyint, val2 tinyint)
sql show tables
sql show tables
if $rows != 7 then
if $rows != 7 then
return -1
return -1
endi
endi
print =============== step11
print =============== step11
sql create table $tb (ts timestamp, val float, val2 double)
sql
_error
create table $tb (ts timestamp, val float, val2 double)
sql show tables
sql show tables
if $rows != 7 then
if $rows != 7 then
return -1
return -1
...
@@ -217,7 +213,7 @@ endi
...
@@ -217,7 +213,7 @@ endi
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/table_len.sim
→
tests/script/
tsim
/table/table_len.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -98,7 +95,7 @@ step8:
...
@@ -98,7 +95,7 @@ step8:
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/tinyint.sim
→
tests/script/
tsim
/table/tinyint.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
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
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$i = 0
$i = 0
...
@@ -27,12 +24,10 @@ if $data01 != NULL then
...
@@ -27,12 +24,10 @@ if $data01 != NULL then
endi
endi
print =============== step2
print =============== step2
sql insert into $tb values (now+1m, -128) -x step2
sql insert into $tb values (now+1m, -128)
return -1
sql insert into $tb values (now+2m, NULL)
step2:
sql insert into $tb values (now+1m, NULL)
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows !=
2
then
if $rows !=
3
then
return -1
return -1
endi
endi
if $data01 != NULL then
if $data01 != NULL then
...
@@ -40,9 +35,9 @@ if $data01 != NULL then
...
@@ -40,9 +35,9 @@ if $data01 != NULL then
endi
endi
print =============== step3
print =============== step3
sql insert into $tb values (now+
2
m, 127)
sql insert into $tb values (now+
3
m, 127)
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows !=
3
then
if $rows !=
4
then
return -1
return -1
endi
endi
if $data01 != 127 then
if $data01 != 127 then
...
@@ -50,12 +45,12 @@ if $data01 != 127 then
...
@@ -50,12 +45,12 @@ if $data01 != 127 then
endi
endi
print =============== step4
print =============== step4
sql insert into $tb values (now+
3
m, 128) -x step4
sql insert into $tb values (now+
4
m, 128) -x step4
return -1
return -1
step4:
step4:
sql insert into $tb values (now+
3
m, NULL)
sql insert into $tb values (now+
5
m, NULL)
sql select * from $tb
sql select * from $tb
if $rows !=
4
then
if $rows !=
5
then
return -1
return -1
endi
endi
if $data01 != NULL then
if $data01 != NULL then
...
@@ -63,10 +58,10 @@ if $data01 != NULL then
...
@@ -63,10 +58,10 @@ if $data01 != NULL then
endi
endi
print =============== step5
print =============== step5
sql_error insert into $tb values (now+
4
m, a2)
sql_error insert into $tb values (now+
6
m, a2)
sql insert into $tb values (now+
4
m, 0)
sql insert into $tb values (now+
7
m, 0)
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows !=
5
then
if $rows !=
6
then
return -1
return -1
endi
endi
if $data01 != 0 then
if $data01 != 0 then
...
@@ -74,10 +69,10 @@ if $data01 != 0 then
...
@@ -74,10 +69,10 @@ if $data01 != 0 then
endi
endi
print =============== step6
print =============== step6
sql_error insert into $tb values (now+
5
m, 2a)
sql_error insert into $tb values (now+
8
m, 2a)
sql insert into $tb values (now+
5
m, 2)
sql insert into $tb values (now+
9
m, 2)
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows !=
6
then
if $rows !=
7
then
return -1
return -1
endi
endi
if $data01 != 2 then
if $data01 != 2 then
...
@@ -85,10 +80,10 @@ if $data01 != 2 then
...
@@ -85,10 +80,10 @@ if $data01 != 2 then
endi
endi
print =============== step7
print =============== step7
sql_error insert into $tb values (now+
6
m, 2a'1)
sql_error insert into $tb values (now+
10
m, 2a'1)
sql insert into $tb values (now+
6
m, 2)
sql insert into $tb values (now+
11
m, 2)
sql select * from $tb order by ts desc
sql select * from $tb order by ts desc
if $rows !=
7
then
if $rows !=
8
then
return -1
return -1
endi
endi
if $data01 != 2 then
if $data01 != 2 then
...
@@ -97,7 +92,7 @@ endi
...
@@ -97,7 +92,7 @@ endi
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/table/vgroup.sim
→
tests/script/
tsim
/table/vgroup.sim
浏览文件 @
d02fb4e0
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/cfg.sh -n dnode1 -c maxVgroupsPerDb -v 4
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
print ============================ dnode1 start
print ============================ dnode1 start
$i = 0
$i = 0
...
@@ -16,10 +12,10 @@ $db = $dbPrefix . $i
...
@@ -16,10 +12,10 @@ $db = $dbPrefix . $i
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
print =================== step 1
print =================== step 1
sql create database $db
sql create database $db
vgroups 4
sql use $db
sql use $db
sql show vgroups
sql show vgroups
if $rows !=
0
then
if $rows !=
4
then
return -1
return -1
endi
endi
...
@@ -28,7 +24,7 @@ sql create table table2 (ts timestamp, speed int)
...
@@ -28,7 +24,7 @@ sql create table table2 (ts timestamp, speed int)
sql create table table3 (ts timestamp, speed int)
sql create table table3 (ts timestamp, speed int)
sql create table table4 (ts timestamp, speed int)
sql create table table4 (ts timestamp, speed int)
sql show vgroups
sql show vgroups
if $rows !=
1
then
if $rows !=
4
then
return -1
return -1
endi
endi
...
@@ -37,7 +33,7 @@ sql create table table6 (ts timestamp, speed int)
...
@@ -37,7 +33,7 @@ sql create table table6 (ts timestamp, speed int)
sql create table table7 (ts timestamp, speed int)
sql create table table7 (ts timestamp, speed int)
sql create table table8 (ts timestamp, speed int)
sql create table table8 (ts timestamp, speed int)
sql show vgroups
sql show vgroups
if $rows !=
2
then
if $rows !=
4
then
return -1
return -1
endi
endi
...
@@ -46,7 +42,7 @@ sql create table table10 (ts timestamp, speed int)
...
@@ -46,7 +42,7 @@ sql create table table10 (ts timestamp, speed int)
sql create table table11 (ts timestamp, speed int)
sql create table table11 (ts timestamp, speed int)
sql create table table12 (ts timestamp, speed int)
sql create table table12 (ts timestamp, speed int)
sql show vgroups
sql show vgroups
if $rows !=
3
then
if $rows !=
4
then
return -1
return -1
endi
endi
...
@@ -58,7 +54,7 @@ endi
...
@@ -58,7 +54,7 @@ endi
sql drop table table13
sql drop table table13
sql show vgroups
sql show vgroups
if $rows !=
3
then
if $rows !=
4
then
return -1
return -1
endi
endi
...
@@ -72,10 +68,10 @@ print =================== step 2
...
@@ -72,10 +68,10 @@ print =================== step 2
$i = 1
$i = 1
$db = $dbPrefix . $i
$db = $dbPrefix . $i
sql create database $db
sql create database $db
vgroups 2
sql use $db
sql use $db
sql show vgroups
sql show vgroups
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
@@ -88,13 +84,13 @@ $db = $dbPrefix . $i
...
@@ -88,13 +84,13 @@ $db = $dbPrefix . $i
sql use $db
sql use $db
sql create table table2 (ts timestamp, speed int)
sql create table table2 (ts timestamp, speed int)
sql show vgroups
sql show vgroups
if $rows !=
1
then
if $rows !=
2
then
return -1
return -1
endi
endi
sql drop table table2
sql drop table table2
sql show vgroups
sql show vgroups
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
@@ -104,7 +100,7 @@ sql create table table3 (ts timestamp, speed int)
...
@@ -104,7 +100,7 @@ sql create table table3 (ts timestamp, speed int)
sql create table table4 (ts timestamp, speed int)
sql create table table4 (ts timestamp, speed int)
sql drop table table1
sql drop table table1
sql show vgroups
sql show vgroups
if $rows !=
1
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
@@ -133,7 +129,7 @@ sql create database $db
...
@@ -133,7 +129,7 @@ sql create database $db
sql use $db
sql use $db
sql show databases
sql show databases
if $rows !=
5
then
if $rows !=
7
then
return -1
return -1
endi
endi
...
@@ -144,7 +140,7 @@ while $i < 5
...
@@ -144,7 +140,7 @@ while $i < 5
$i = $i + 1
$i = $i + 1
endw
endw
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/tsim/tag/bigint.sim
浏览文件 @
d02fb4e0
...
@@ -46,7 +46,6 @@ while $i < 10
...
@@ -46,7 +46,6 @@ while $i < 10
endw
endw
print =============== step2
print =============== step2
sleep 100
sql select * from $tb
sql select * from $tb
if $rows != $rowNum then
if $rows != $rowNum then
return -1
return -1
...
...
tests/script/tsim/tag/binary.sim
浏览文件 @
d02fb4e0
...
@@ -46,7 +46,6 @@ while $i < 10
...
@@ -46,7 +46,6 @@ while $i < 10
endw
endw
print =============== step2
print =============== step2
sleep 100
sql select * from $tb
sql select * from $tb
if $rows != $rowNum then
if $rows != $rowNum then
return -1
return -1
...
...
tests/script/tsim/tag/bool.sim
浏览文件 @
d02fb4e0
...
@@ -46,7 +46,6 @@ while $i < 10
...
@@ -46,7 +46,6 @@ while $i < 10
endw
endw
print =============== step2
print =============== step2
sleep 100
sql select * from $tb
sql select * from $tb
if $rows != $rowNum then
if $rows != $rowNum then
return -1
return -1
...
...
tests/script/tsim/tag/double.sim
浏览文件 @
d02fb4e0
...
@@ -46,7 +46,6 @@ while $i < 10
...
@@ -46,7 +46,6 @@ while $i < 10
endw
endw
print =============== step2
print =============== step2
sleep 100
sql select * from $tb
sql select * from $tb
if $rows != $rowNum then
if $rows != $rowNum then
return -1
return -1
...
...
tests/script/tsim/tag/float.sim
浏览文件 @
d02fb4e0
...
@@ -46,7 +46,6 @@ while $i < 10
...
@@ -46,7 +46,6 @@ while $i < 10
endw
endw
print =============== step2
print =============== step2
sleep 100
sql select * from $tb
sql select * from $tb
if $rows != $rowNum then
if $rows != $rowNum then
return -1
return -1
...
...
tests/script/tsim/tag/int.sim
浏览文件 @
d02fb4e0
...
@@ -46,7 +46,6 @@ while $i < 10
...
@@ -46,7 +46,6 @@ while $i < 10
endw
endw
print =============== step2
print =============== step2
sleep 100
sql select * from $tb
sql select * from $tb
if $rows != $rowNum then
if $rows != $rowNum then
return -1
return -1
...
...
tests/script/tsim/tag/smallint.sim
浏览文件 @
d02fb4e0
...
@@ -46,7 +46,6 @@ while $i < 10
...
@@ -46,7 +46,6 @@ while $i < 10
endw
endw
print =============== step2
print =============== step2
sleep 100
sql select * from $tb
sql select * from $tb
if $rows != $rowNum then
if $rows != $rowNum then
return -1
return -1
...
...
tests/script/tsim/tag/tinyint.sim
浏览文件 @
d02fb4e0
...
@@ -46,7 +46,6 @@ while $i < 10
...
@@ -46,7 +46,6 @@ while $i < 10
endw
endw
print =============== step2
print =============== step2
sleep 100
sql select * from $tb
sql select * from $tb
if $rows != $rowNum then
if $rows != $rowNum then
return -1
return -1
...
...
tests/script/tsim/vector/metrics_field.sim
浏览文件 @
d02fb4e0
...
@@ -41,8 +41,6 @@ while $i < $tbNum
...
@@ -41,8 +41,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
...
tests/script/tsim/vector/metrics_mix.sim
浏览文件 @
d02fb4e0
...
@@ -37,8 +37,6 @@ while $i < $tbNum
...
@@ -37,8 +37,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
...
tests/script/tsim/vector/metrics_query.sim
浏览文件 @
d02fb4e0
...
@@ -37,8 +37,6 @@ while $i < $tbNum
...
@@ -37,8 +37,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
...
tests/script/tsim/vector/metrics_tag.sim
浏览文件 @
d02fb4e0
...
@@ -37,8 +37,6 @@ while $i < $tbNum
...
@@ -37,8 +37,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
...
tests/script/tsim/vector/metrics_time.sim
浏览文件 @
d02fb4e0
...
@@ -37,8 +37,6 @@ while $i < $tbNum
...
@@ -37,8 +37,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
...
tests/script/tsim/vector/multi.sim
浏览文件 @
d02fb4e0
...
@@ -37,8 +37,6 @@ while $i < $tbNum
...
@@ -37,8 +37,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
...
tests/script/tsim/vector/single.sim
浏览文件 @
d02fb4e0
...
@@ -37,8 +37,6 @@ while $i < $tbNum
...
@@ -37,8 +37,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
...
tests/script/tsim/vector/table_field.sim
浏览文件 @
d02fb4e0
...
@@ -37,8 +37,6 @@ while $i < $tbNum
...
@@ -37,8 +37,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
...
tests/script/tsim/vector/table_mix.sim
浏览文件 @
d02fb4e0
...
@@ -37,8 +37,6 @@ while $i < $tbNum
...
@@ -37,8 +37,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
...
tests/script/tsim/vector/table_query.sim
浏览文件 @
d02fb4e0
...
@@ -37,8 +37,6 @@ while $i < $tbNum
...
@@ -37,8 +37,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
...
tests/script/tsim/vector/table_time.sim
浏览文件 @
d02fb4e0
...
@@ -37,8 +37,6 @@ while $i < $tbNum
...
@@ -37,8 +37,6 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
sleep 100
print =============== step2
print =============== step2
$i = 1
$i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录