Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
1129b525
T
TDengine
项目概览
taosdata
/
TDengine
接近 2 年 前同步成功
通知
1192
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1129b525
编写于
7月 22, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: add cases
上级
cda04a6a
变更
29
隐藏空白更改
内联
并排
Showing
29 changed file
with
84 addition
and
233 deletion
+84
-233
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+28
-31
tests/script/tsim/parser/col_arithmetic_query.sim
tests/script/tsim/parser/col_arithmetic_query.sim
+10
-94
tests/script/tsim/parser/columnValue_bigint.sim
tests/script/tsim/parser/columnValue_bigint.sim
+0
-1
tests/script/tsim/parser/columnValue_bool.sim
tests/script/tsim/parser/columnValue_bool.sim
+0
-1
tests/script/tsim/parser/columnValue_double.sim
tests/script/tsim/parser/columnValue_double.sim
+0
-2
tests/script/tsim/parser/columnValue_float.sim
tests/script/tsim/parser/columnValue_float.sim
+0
-2
tests/script/tsim/parser/columnValue_int.sim
tests/script/tsim/parser/columnValue_int.sim
+0
-1
tests/script/tsim/parser/columnValue_smallint.sim
tests/script/tsim/parser/columnValue_smallint.sim
+0
-2
tests/script/tsim/parser/columnValue_tinyint.sim
tests/script/tsim/parser/columnValue_tinyint.sim
+0
-2
tests/script/tsim/parser/columnValue_unsign.sim
tests/script/tsim/parser/columnValue_unsign.sim
+0
-2
tests/script/tsim/parser/first_last_query.sim
tests/script/tsim/parser/first_last_query.sim
+0
-1
tests/script/tsim/parser/groupby-basic.sim
tests/script/tsim/parser/groupby-basic.sim
+0
-26
tests/script/tsim/parser/interp_test.sim
tests/script/tsim/parser/interp_test.sim
+0
-1
tests/script/tsim/parser/join.sim
tests/script/tsim/parser/join.sim
+0
-4
tests/script/tsim/parser/limit.sim
tests/script/tsim/parser/limit.sim
+0
-3
tests/script/tsim/parser/limit1.sim
tests/script/tsim/parser/limit1.sim
+1
-1
tests/script/tsim/parser/limit1_tb.sim
tests/script/tsim/parser/limit1_tb.sim
+5
-2
tests/script/tsim/parser/limit2.sim
tests/script/tsim/parser/limit2.sim
+1
-2
tests/script/tsim/parser/limit2_query.sim
tests/script/tsim/parser/limit2_query.sim
+7
-5
tests/script/tsim/parser/limit_tb.sim
tests/script/tsim/parser/limit_tb.sim
+11
-9
tests/script/tsim/parser/projection_limit_offset.sim
tests/script/tsim/parser/projection_limit_offset.sim
+0
-2
tests/script/tsim/parser/single_row_in_tb.sim
tests/script/tsim/parser/single_row_in_tb.sim
+0
-1
tests/script/tsim/parser/slimit1.sim
tests/script/tsim/parser/slimit1.sim
+0
-2
tests/script/tsim/parser/slimit1_query.sim
tests/script/tsim/parser/slimit1_query.sim
+0
-1
tests/script/tsim/parser/slimit_alter_tags.sim
tests/script/tsim/parser/slimit_alter_tags.sim
+0
-8
tests/script/tsim/parser/slimit_query.sim
tests/script/tsim/parser/slimit_query.sim
+0
-1
tests/script/tsim/parser/union.sim
tests/script/tsim/parser/union.sim
+0
-3
tests/script/tsim/tag/column.sim
tests/script/tsim/tag/column.sim
+4
-4
tests/script/tsim/tag/commit.sim
tests/script/tsim/tag/commit.sim
+17
-19
未找到文件。
tests/script/jenkins/basic.txt
浏览文件 @
1129b525
...
...
@@ -88,13 +88,13 @@
./test.sh -f tsim/parser/alter_column.sim
./test.sh -f tsim/parser/alter_stable.sim
./test.sh -f tsim/parser/alter.sim
# ./test.sh -f tsim/parser/alter1.sim
#
TD-17661
./test.sh -f tsim/parser/alter1.sim
./test.sh -f tsim/parser/auto_create_tb_drop_tb.sim
./test.sh -f tsim/parser/auto_create_tb.sim
./test.sh -f tsim/parser/between_and.sim
./test.sh -f tsim/parser/binary_escapeCharacter.sim
# ./test.sh -f tsim/parser/col_arithmetic_operation.sim
# ./test.sh -f tsim/parser/columnValue.sim
#
TD-17738
./test.sh -f tsim/parser/col_arithmetic_operation.sim
#
TD-17661
./test.sh -f tsim/parser/columnValue.sim
./test.sh -f tsim/parser/commit.sim
# TD-17661 ./test.sh -f tsim/parser/condition.sim
./test.sh -f tsim/parser/constCol.sim
...
...
@@ -111,9 +111,9 @@
./test.sh -f tsim/parser/fourArithmetic-basic.sim
# TD-17659 ./test.sh -f tsim/parser/function.sim
./test.sh -f tsim/parser/groupby-basic.sim
#
./test.sh -f tsim/parser/groupby.sim
./test.sh -f tsim/parser/groupby.sim
# TD-17622 ./test.sh -f tsim/parser/having_child.sim
# ./test.sh -f tsim/parser/having.sim
#
TD-17622
./test.sh -f tsim/parser/having.sim
./test.sh -f tsim/parser/import_commit1.sim
./test.sh -f tsim/parser/import_commit2.sim
./test.sh -f tsim/parser/import_commit3.sim
...
...
@@ -121,49 +121,46 @@
./test.sh -f tsim/parser/import.sim
./test.sh -f tsim/parser/insert_multiTbl.sim
./test.sh -f tsim/parser/insert_tb.sim
# ./test.sh -f tsim/parser/interp.sim
#
TD-17038
./test.sh -f tsim/parser/interp.sim
./test.sh -f tsim/parser/join_manyblocks.sim
# ./test.sh -f tsim/parser/join_multitables.sim
#
TD-17713
./test.sh -f tsim/parser/join_multitables.sim
# TD-17713 ./test.sh -f tsim/parser/join_multivnode.sim
# TD-17707 ./test.sh -f tsim/parser/join.sim
./test.sh -f tsim/parser/last_cache.sim
./test.sh -f tsim/parser/last_groupby.sim
# TD-17
675
./test.sh -f tsim/parser/lastrow.sim
# TD-17
722
./test.sh -f tsim/parser/lastrow.sim
./test.sh -f tsim/parser/like.sim
# ./test.sh -f tsim/parser/limit.sim
# ./test.sh -f tsim/parser/limit1.sim
# ./test.sh -f tsim/parser/limit2.sim
#
TD-17464
./test.sh -f tsim/parser/limit.sim
#
TD-17464
./test.sh -f tsim/parser/limit1.sim
#
TD-17623
./test.sh -f tsim/parser/limit2.sim
./test.sh -f tsim/parser/mixed_blocks.sim
./test.sh -f tsim/parser/nchar.sim
# TD-17703 ./test.sh -f tsim/parser/nestquery.sim
# ./test.sh -f tsim/parser/null_char.sim
#
TD-17685
./test.sh -f tsim/parser/null_char.sim
./test.sh -f tsim/parser/precision_ns.sim
./test.sh -f tsim/parser/projection_limit_offset.sim
./test.sh -f tsim/parser/regex.sim
./test.sh -f tsim/parser/select_across_vnodes.sim
./test.sh -f tsim/parser/select_distinct_tag.sim
./test.sh -f tsim/parser/select_from_cache_disk.sim
# ./test.sh -f tsim/parser/select_with_tags.sim
#
TD-17659
./test.sh -f tsim/parser/select_with_tags.sim
./test.sh -f tsim/parser/selectResNum.sim
# TD-17685 ./test.sh -f tsim/parser/set_tag_vals.sim
./test.sh -f tsim/parser/single_row_in_tb.sim
# TD-17684 ./test.sh -f tsim/parser/sliding.sim
# ./test.sh -f tsim/parser/slimit_alter_tags.sim
# ./test.sh -f tsim/parser/slimit.sim
# ./test.sh -f tsim/parser/slimit1.sim
#
TD-17722
./test.sh -f tsim/parser/slimit_alter_tags.sim
#
TD-17722
./test.sh -f tsim/parser/slimit.sim
#
TD-17722
./test.sh -f tsim/parser/slimit1.sim
./test.sh -f tsim/parser/stableOp.sim
# ./test.sh -f tsim/parser/tags_dynamically_specifiy.sim
# ./test.sh -f tsim/parser/tags_filter.sim
#
TD-17661
./test.sh -f tsim/parser/tags_dynamically_specifiy.sim
#
TD-17661
./test.sh -f tsim/parser/tags_filter.sim
./test.sh -f tsim/parser/tbnameIn.sim
./test.sh -f tsim/parser/timestamp.sim
./test.sh -f tsim/parser/top_groupby.sim
./test.sh -f tsim/parser/topbot.sim
# ./test.sh -f tsim/parser/udf_dll_stable.sim
# ./test.sh -f tsim/parser/udf_dll.sim
# ./test.sh -f tsim/parser/udf.sim
./test.sh -f tsim/parser/union.sim
# TD-17704 ./test.sh -f tsim/parser/union_sysinfo.sim
# ./test.sh -f tsim/parser/where.sim
#
TD-17661
./test.sh -f tsim/parser/where.sim
# ---- query
./test.sh -f tsim/query/interval.sim
...
...
@@ -324,7 +321,7 @@
./test.sh -f tsim/vnode/stable_replica3_vnode3.sim
# --- sync
#
./test.sh -f tsim/sync/3Replica1VgElect.sim
./test.sh -f tsim/sync/3Replica1VgElect.sim
./test.sh -f tsim/sync/3Replica5VgElect.sim
./test.sh -f tsim/sync/oneReplica1VgElect.sim
./test.sh -f tsim/sync/oneReplica5VgElect.sim
...
...
@@ -422,18 +419,18 @@
./test.sh -f tsim/tag/bool_binary.sim
./test.sh -f tsim/tag/bool_int.sim
./test.sh -f tsim/tag/bool.sim
# ./test.sh -f tsim/tag/change.sim
#
./test.sh -f tsim/tag/column.sim
#
./test.sh -f tsim/tag/commit.sim
# ./test.sh -f tsim/tag/create.sim
# /test.sh -f tsim/tag/delete.sim
# ./test.sh -f tsim/tag/double.sim
# ./test.sh -f tsim/tag/filter.sim
#
TD-17661
./test.sh -f tsim/tag/change.sim
./test.sh -f tsim/tag/column.sim
./test.sh -f tsim/tag/commit.sim
#
TD-17661
./test.sh -f tsim/tag/create.sim
#
TD-17661 .
/test.sh -f tsim/tag/delete.sim
#
TD-17661
./test.sh -f tsim/tag/double.sim
#
TD-17661
./test.sh -f tsim/tag/filter.sim
# TD-17407 ./test.sh -f tsim/tag/float.sim
./test.sh -f tsim/tag/int_binary.sim
./test.sh -f tsim/tag/int_float.sim
./test.sh -f tsim/tag/int.sim
# ./test.sh -f tsim/tag/set.sim
#
TD-17661
./test.sh -f tsim/tag/set.sim
./test.sh -f tsim/tag/smallint.sim
./test.sh -f tsim/tag/tinyint.sim
...
...
tests/script/tsim/parser/col_arithmetic_query.sim
浏览文件 @
1129b525
...
...
@@ -36,28 +36,22 @@ sql select c1 *( 2 / 3 ), c1/c1 from $tb order by ts asc;
if $rows != 10000 then
return -1
endi
if $data00 != 0.000000000 then
return -1
endi
#if $data01 != -nan then
# print expect -nan, actual: $data01
# return -1
#endi
if $data10 != 0.666666667 then
return -1
endi
if $data11 != 1.000000000 then
return -1
endi
if $data90 != 6.000000000 then
return -1
endi
if $data91 != 1.000000000 then
return -1
endi
...
...
@@ -66,65 +60,49 @@ sql select (c1 * 2) % 7.9, c1*1, c1*1*1, c1*c1, c1*c1*c1 from $tb order by ts de
if $rows != 10000 then
return -1
endi
if $data00 != 2.200000000 then
print expect 2.200000000, actual:$data00
return -1
endi
if $data01 != 9.000000000 then
return -1
endi
if $data02 != 9.000000000 then
return -1
endi
if $data03 != 81.000000000 then
return -1
endi
if $data04 != 729.000000000 then
return -1
endi
if $data10 != 0.200000000 then
return -1
endi
if $data11 != 8.000000000 then
return -1
endi
if $data12 != 8.000000000 then
return -1
endi
if $data13 != 64.000000000 then
return -1
endi
if $data14 != 512.000000000 then
return -1
endi
if $data90 != 0.000000000 then
return -1
endi
if $data91 != 0.000000000 then
return -1
endi
if $data92 != 0.000000000 then
return -1
endi
if $data93 != 0.000000000 then
return -1
endi
if $data94 != 0.000000000 then
return -1
endi
...
...
@@ -134,20 +112,16 @@ sql select c1 * c2 /4 from $tb where ts < 1537166000000 and ts > 1537156000000
if $rows != 17 then
return -1
endi
if $data00 != 12.250000000 then
return -1
endi
if $data10 != 16.000000000 then
return -1
endi
if $data20 != 20.250000000 then
print expect 20.250000000, actual:$data21
return -1
endi
if $data30 != 0.000000000 then
return -1
endi
...
...
@@ -180,47 +154,36 @@ sql select c2-c1*1.1, c3/c2, c4*c3, c5%c4, (c6+c4)%22, c2-c2 from $tb
if $rows != 10000 then
return -1
endi
if $data00 != 0.000000000 then
return -1
endi
#if $data01 != -nan then
# return -1
#endi
if $data02 != 0.000000000 then
return -1
endi
if $data03 != NULL then
return -1
endi
if $data04 != 0.000000000 then
return -1
endi
if $data05 != 0.000000000 then
return -1
endi
if $data90 != -0.900000000 then
return -1
endi
if $data91 != 1.000000000 then
return -1
endi
if $data92 != 81.000000000 then
return -1
endi
if $data93 != 0.000000000 then
return -1
endi
if $data94 != 18.000000000 then
return -1
endi
...
...
@@ -237,10 +200,8 @@ sql select c8+c7, c9+c9+c8+c7/c6 from $tb
# arithmetic expression in join [d.7]==================================================
# arithmetic expression in union [d.8]=================================================
# arithmetic expression in group by [d.9]==============================================
# in group by tag, not support for normal table
sql_error select c5*99 from $tb group by t1
...
...
@@ -248,17 +209,14 @@ sql_error select c5*99 from $tb group by t1
# in group by column
sql_error select c6-(c6+c3)*12 from $tb group by c3;
# limit offset [d.10]==================================================================
sql select c6 * c1 + 12 from $tb limit 12 offset 99;
if $rows != 12 then
return -1
endi
if $data00 != 93.000000000 then
return -1
endi
if $data90 != 76.000000000 then
return -1
endi
...
...
@@ -267,7 +225,6 @@ sql select c4 / 99.123 from $tb limit 10 offset 9999;
if $rows != 1 then
return -1
endi
if $data00 != 0.090796283 then
return -1
endi
...
...
@@ -283,27 +240,21 @@ sql select c1, c2+c6, 12.9876545678, 1, 1.1 from $tb
if $rows != 10000 then
return -1
endi
if $data00 != 0 then
return -1
endi
if $data01 != 0.000000000 then
return -1
endi
if $data02 != 12.987654568 then
return -1
endi
if $data03 != 1 then
return -1
endi
if $data04 != 1.100000000 then
return -1
endi
if $data10 != 1 then
return -1
endi
...
...
@@ -313,27 +264,21 @@ sql select c1, c2+c6, 12.9876545678, 1, 1.1 from $tb where c1<2
if $rows != 2000 then
return -1
endi
if $data00 != 0 then
return -1
endi
if $data01 != 0.000000000 then
return -1
endi
if $data02 != 12.987654568 then
return -1
endi
if $data03 != 1 then
return -1
endi
if $data10 != 1 then
return -1
endi
if $data20 != 0 then
return -1
endi
...
...
@@ -377,7 +322,6 @@ sql select first(c1) * ( 2 / 3 ) from $stb order by ts asc;
if $rows != 1 then
return -1
endi
if $data00 != 0.000000000 then
return -1
endi
...
...
@@ -386,7 +330,6 @@ sql select first(c1) * (2/99) from $stb order by ts desc;
if $rows != 1 then
return -1
endi
if $data00 != 0.000000000 then
return -1
endi
...
...
@@ -395,15 +338,12 @@ sql select (count(c1) * 2) % 7.9, (count(c1) * 2), ( count(1)*2) from $stb
if $rows != 1 then
return -1
endi
if $data00 != 1.800000000 then
return -1
endi
if $data01 != 100000.000000000 then
return -1
endi
if $data02 != 200000.000000000 then
return -1
endi
...
...
@@ -412,16 +352,13 @@ sql select spread( c1 )/44, spread(c1), 0.204545455 * 44 from $stb
if $rows != 1 then
return -1
endi
if $data00 != 0.204545455 then
print expect 0.204545455, actual: $data00
return -1
endi
if $data01 != 9.000000000 then
return -1
endi
if $data02 != 9.000000020 then
return -1
endi
...
...
@@ -431,27 +368,21 @@ sql select min(c1) * max(c2) /4, sum(c1) * apercentile(c2, 20), apercentile(c4,
if $rows != 1 then
return -1
endi
if $data00 != 0.000000000 then
return -1
endi
if $data01 != 225000.000000000 then
return -1
endi
if $data02 != 8.077777778 then
return -1
endi
if $data03 != NULL then
return -1
endi
if $data04 != 0.444444444 then
return -1
endi
if $data05 != 450000.000000000 then
return -1
endi
...
...
@@ -487,35 +418,29 @@ sql_error select top(c1, 99) - bottom(c1, 99) from $stb
sql select c2-c1, c3/c2, c4*c3, c5%c4, c6+99%22 from $stb
# error case, ts/bool/binary/nchar not support arithmetic expression
sql
select first(c7)*12 from $stb
sql
select last(c8)/55 from $stb
sql
_error
select last_row(c9) + last_row(c8) from $stb
sql select first(c7)*12 from $stb
sql select last(c8)/55 from $stb
sql select last_row(c9) + last_row(c8) from $stb
# arithmetic expression in join [d.7]===============================================================
# arithmetic expression in union [d.8]===============================================================
# arithmetic expression in group by [d.9]===============================================================
# in group by tag
sql select avg(c4)*99
from $stb group
by t1
sql select avg(c4)*99
, t1 from $stb group by t1 order
by t1
if $rows != 10 then
return -1
endi
if $data00 != 445.500000000 then
return -1
endi
if $data01 != 0 then
return -1
endi
if $data90 != 445.500000000 then
return -1
endi
if $data91 != 9 then
return -1
endi
...
...
@@ -550,22 +475,19 @@ endi
# return -1
#endi
#
sql
_error
select first(c6) - last(c6) *12 / count(*) from $stb group by c3;
sql select first(c6) - last(c6) *12 / count(*) from $stb group by c3;
sql select first(c6) - last(c6) *12 / count(*) from $stb group by c5;
if $rows != 1
0
then
sql select first(c6) - last(c6) *12 / count(*) from $stb group by c5
order by c5
;
if $rows != 1
1
then
return -1
endi
if $data00 != 0.000000000 then
if $data10 != 0.000000000 then
return -1
endi
if $data10 != 0.997600000 then
if $data20 != 0.997600000 then
return -1
endi
if $data90 != 8.978400000 then
if $data90 != 7.980800000 then
return -1
endi
...
...
@@ -574,7 +496,6 @@ sql select first(c6) - sum(c6) + 12 from $stb limit 12 offset 0;
if $rows != 1 then
return -1
endi
if $data00 != -449988.000000000 then
return -1
endi
...
...
@@ -604,10 +525,8 @@ sql_error select first(c1) from $stb fill(value, 20);
# constant column. [d.13]===============================================================
# column value filter [d.14]===============================================================
# tag filter. [d.15]===============================================================
sql select sum(c2)+99 from $stb where t1=12;
...
...
@@ -633,7 +552,6 @@ sql select avg(c2)*count(c2), sum(c3)-first(c3), last(c4)+9 from $stb interval(1
if $rows != 10000 then
return -1
endi
if $data00 != @18-09-17 09:00:00.000@ then
return -1
endi
...
...
@@ -645,11 +563,9 @@ sql_error select first(c7)- last(c1) from $tb interval(2y)
# first/last query [d.19]===============================================================
# multiple retrieve [d.20]===============================================================
sql select c2-c2 from $tb
sql select first(c1)-last(c1), spread(c2), max(c3) - min(c3), avg(c4)*count(c4) from $tb
...
...
tests/script/tsim/parser/columnValue_bigint.sim
浏览文件 @
1129b525
sleep 100
sql connect
sql create database if not exists db
sql use db
...
...
tests/script/tsim/parser/columnValue_bool.sim
浏览文件 @
1129b525
sleep 100
sql connect
sql create database if not exists db
sql use db
...
...
tests/script/tsim/parser/columnValue_double.sim
浏览文件 @
1129b525
####
sleep 100
sql connect
sql create database if not exists db
sql use db
...
...
tests/script/tsim/parser/columnValue_float.sim
浏览文件 @
1129b525
####
sleep 100
sql connect
sql create database if not exists db
sql use db
...
...
tests/script/tsim/parser/columnValue_int.sim
浏览文件 @
1129b525
sleep 100
sql connect
sql create database if not exists db
sql use db
...
...
tests/script/tsim/parser/columnValue_smallint.sim
浏览文件 @
1129b525
sleep 100
sql connect
sql create database if not exists db
sql use db
...
...
tests/script/tsim/parser/columnValue_tinyint.sim
浏览文件 @
1129b525
sleep 100
sql connect
sql create database if not exists db
sql use db
...
...
tests/script/tsim/parser/columnValue_unsign.sim
浏览文件 @
1129b525
sleep 100
sql connect
sql create database if not exists db
sql use db
...
...
tests/script/tsim/parser/first_last_query.sim
浏览文件 @
1129b525
sleep 100
sql connect
$dbPrefix = first_db
...
...
tests/script/tsim/parser/groupby-basic.sim
浏览文件 @
1129b525
...
...
@@ -3,25 +3,6 @@ system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sql connect
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
sql connect
$dbPrefix = group_db
$tbPrefix = group_tb
$mtPrefix = group_mt
...
...
@@ -80,8 +61,6 @@ while $i < $tbNum
$tstart = 1640966400000
endw
sleep 100
$i1 = 1
$i2 = 0
...
...
@@ -752,12 +731,7 @@ sql insert into tm1 values('2020-2-1 1:1:1', 2, 10);
sql insert into tm1 values('2020-2-1 1:1:2', 2, 20);
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 100
system sh/exec.sh -n dnode1 -s start
sleep 100
sql connect
sleep 100
sql use group_db0;
print =========================>TD-4894
...
...
tests/script/tsim/parser/interp_test.sim
浏览文件 @
1129b525
sleep 100
sql connect
$dbPrefix = intp_db
...
...
tests/script/tsim/parser/join.sim
浏览文件 @
1129b525
...
...
@@ -54,8 +54,6 @@ while $i < $tbNum
$tstart = 100000
endw
sleep 100
$tstart = 100000
$mt = $mtPrefix . 1 . $i
sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 binary(10), c9 nchar(9)) TAGS(t1 int, t2 binary(12), t3 int)
...
...
@@ -99,8 +97,6 @@ while $i < $tbNum
$tstart = 100000
endw
sleep 100
$i1 = 1
$i2 = 0
...
...
tests/script/tsim/parser/limit.sim
浏览文件 @
1129b525
...
...
@@ -62,11 +62,8 @@ run tsim/parser/limit_stb.sim
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 500
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
sql connect
sleep 100
run tsim/parser/limit_tb.sim
run tsim/parser/limit_stb.sim
...
...
tests/script/tsim/parser/limit1.sim
浏览文件 @
1129b525
...
...
@@ -18,7 +18,7 @@ $stb = $stbPrefix . $i
sql drop database $db -x step1
step1:
sql create database $db
cache 16
sql create database $db
print ====== create tables
sql use $db
sql create table $stb (ts timestamp, c1 int, c2 bigint, c3 float, c4 double, c5 smallint, c6 tinyint, c7 bool, c8 binary(10), c9 nchar(10)) tags(t1 int)
...
...
tests/script/tsim/parser/limit1_tb.sim
浏览文件 @
1129b525
...
...
@@ -370,7 +370,8 @@ sql select top(c1, 1) from $tb where ts >= $ts0 and ts <= $tsu limit 5 offset 1
if $rows != 0 then
return -1
endi
sql select top(c1, 5) from $tb where ts >= $ts0 and ts <= $tsu limit 3 offset 1
sql select ts, top(c1, 5) from $tb where ts >= $ts0 and ts <= $tsu order by ts limit 3 offset 1
if $rows != 3 then
return -1
endi
...
...
@@ -392,6 +393,7 @@ endi
if $data21 != 9 then
return -1
endi
sql select top(c1, 5) from $tb where ts >= $ts0 and ts <= $tsu limit 3 offset 5
if $rows != 0 then
return -1
...
...
@@ -401,7 +403,8 @@ sql select bottom(c1, 1) from $tb where ts >= $ts0 and ts <= $tsu limit 5 offset
if $rows != 0 then
return -1
endi
sql select bottom(c1, 5) from $tb where ts >= $ts0 and ts <= $tsu limit 3 offset 1
sql select ts, bottom(c1, 5) from $tb where ts >= $ts0 and ts <= $tsu order by ts limit 3 offset 1
if $rows != 3 then
return -1
endi
...
...
tests/script/tsim/parser/limit2.sim
浏览文件 @
1129b525
...
...
@@ -61,11 +61,10 @@ while $i < $halfNum
endw
print ====== tables created
#
run tsim/parser/limit2_query.sim
run tsim/parser/limit2_query.sim
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 100
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
...
...
tests/script/tsim/parser/limit2_query.sim
浏览文件 @
1129b525
...
...
@@ -27,8 +27,8 @@ print select count(*) from $stb where t1 > $val1 and t1 < $val2 group by t1, t2,
sql select count(*), t1, t2, t3, t4, t5, t6 from $stb where t1 > $val1 and t1 < $val2 group by t1, t2, t3, t4, t5, t6 order by t1 asc limit 1 offset 0
$val = $tbNum - 3
print $rows
$val
if $rows !=
$val
then
print $rows
if $rows !=
1
then
return -1
endi
if $data00 != $rowNum then
...
...
@@ -51,7 +51,7 @@ if $data05 != 2 then
return -1
endi
sql select count(*)
from $stb where t2 like '%' and t1 > 2 and t1 < 5 group by t3, t4 order by t3 desc limit 1
offset 0
sql select count(*)
, t3, t4 from $stb where t2 like '%' and t1 > 2 and t1 < 5 group by t3, t4 order by t3 desc limit 2
offset 0
if $rows != 2 then
return -1
endi
...
...
@@ -70,15 +70,17 @@ endi
if $data12 != 3 then
return -1
endi
sql select count(*) from $stb where t2 like '%' and t1 > 2 and t1 < 5 group by t3, t4 order by t3 desc limit 1 offset 1
if $rows !=
0
then
if $rows !=
1
then
return -1
endi
## TBASE-348
sql_error select count(*) from $stb where t1 like 1
##### aggregation on tb + where + fill + limit offset
sql select max(c1) from $tb where ts >= $ts0 and ts <= $tsu interval(5m) fill(value, -1, -2) limit 10 offset 1
sql select
_wstart,
max(c1) from $tb where ts >= $ts0 and ts <= $tsu interval(5m) fill(value, -1, -2) limit 10 offset 1
if $rows != 10 then
return -1
endi
...
...
tests/script/tsim/parser/limit_tb.sim
浏览文件 @
1129b525
...
...
@@ -358,8 +358,8 @@ endi
print ========> TD-6017
sql select * from (select ts, top(c1, 5) from $tb where ts >= $ts0 and ts <= $tsu order by ts desc limit 3 offset 1)
sql select top(c1, 5) from $tb where ts >= $ts0 and ts <= $tsu order by ts desc limit 3 offset 1
print select top(c1, 5) from $tb where ts >= $ts0 and ts <= $tsu order by ts desc limit 3 offset 1
sql select t
s, t
op(c1, 5) from $tb where ts >= $ts0 and ts <= $tsu order by ts desc limit 3 offset 1
print select t
s, t
op(c1, 5) from $tb where ts >= $ts0 and ts <= $tsu order by ts desc limit 3 offset 1
print $data00 $data01
print $data10 $data11
print $data20 $data21
...
...
@@ -386,7 +386,7 @@ if $data21 != 6 then
return -1
endi
sql select top(c1, 5) from $tb where ts >= $ts0 and ts <= $tsu order by ts asc limit 3 offset 1
sql select t
s, t
op(c1, 5) from $tb where ts >= $ts0 and ts <= $tsu order by ts asc limit 3 offset 1
if $rows != 3 then
return -1
endi
...
...
@@ -418,7 +418,7 @@ sql select bottom(c1, 1) from $tb where ts >= $ts0 and ts <= $tsu limit 5 offset
if $rows != 0 then
return -1
endi
sql select
bottom(c1, 5) from $tb where ts >= $ts0 and ts <= $tsu
limit 3 offset 1
sql select
ts, bottom(c1, 5) from $tb where ts >= $ts0 and ts <= $tsu order by ts
limit 3 offset 1
if $rows != 3 then
return -1
endi
...
...
@@ -482,7 +482,7 @@ endi
if $data41 != 4 then
return -1
endi
sql select max(c1), max(c2), max(c3), max(c4), max(c5), max(c6) from $tb where ts >= $ts0 and ts <= $tsu interval(5m) limit 5 offset 1
sql select
_wstart,
max(c1), max(c2), max(c3), max(c4), max(c5), max(c6) from $tb where ts >= $ts0 and ts <= $tsu interval(5m) limit 5 offset 1
if $rows != 5 then
return -1
endi
...
...
@@ -518,7 +518,7 @@ if $data41 != 5 then
endi
## TBASE-334
sql select max(c1), max(c2), max(c3), max(c4), max(c5), max(c6) from $tb where ts >= $ts0 and ts <= $tsu interval(30m) limit 2 offset 1
sql select
_wstart,
max(c1), max(c2), max(c3), max(c4), max(c5), max(c6) from $tb where ts >= $ts0 and ts <= $tsu interval(30m) limit 2 offset 1
if $rows != 2 then
return -1
endi
...
...
@@ -634,7 +634,8 @@ sql select stddev(c1), stddev(c2), stddev(c3), stddev(c4), stddev(c5), stddev(c6
if $rows != 0 then
return -1
endi
sql select stddev(c1), stddev(c2), stddev(c3), stddev(c4), stddev(c5), stddev(c6) from $tb where ts >= $ts0 and ts <= $tsu interval(30m) limit 5 offset 1
sql select _wstart, stddev(c1), stddev(c2), stddev(c3), stddev(c4), stddev(c5), stddev(c6) from $tb where ts >= $ts0 and ts <= $tsu interval(30m) limit 5 offset 1
if $rows != 3 then
return -1
endi
...
...
@@ -670,6 +671,7 @@ endi
if $data31 != 3 then
return -1
endi
sql select count(c1), count(c2), count(c3), count(c4), count(c5), count(c6) from $tb where ts >= $ts0 and ts <= $tsu interval(27m) limit 5 offset 1
if $rows != 3 then
return -1
...
...
@@ -707,7 +709,8 @@ sql select first(c1), first(c2), first(c3), first(c4), first(c5), first(c6) from
if $rows != 0 then
return -1
endi
sql select first(c1), first(c2), first(c3), first(c4), first(c5), first(c6) from $tb where ts >= $ts0 and ts <= $tsu interval(30m) limit 3 offset 1
sql select _wstart, first(c1), first(c2), first(c3), first(c4), first(c5), first(c6) from $tb where ts >= $ts0 and ts <= $tsu interval(30m) limit 3 offset 1
if $rows != 3 then
return -1
endi
...
...
@@ -721,7 +724,6 @@ if $data23 != 9.00000 then
return -1
endi
sql select last(c1), last(c2), last(c3), last(c4), last(c5), last(c6) from $tb where ts >= $ts0 and ts <= $tsu limit 5 offset 1
if $rows != 0 then
return -1
...
...
tests/script/tsim/parser/projection_limit_offset.sim
浏览文件 @
1129b525
...
...
@@ -62,8 +62,6 @@ while $i < $half
$tstart = 100000
endw
sleep 100
$i1 = 1
$i2 = 0
...
...
tests/script/tsim/parser/single_row_in_tb.sim
浏览文件 @
1129b525
...
...
@@ -28,7 +28,6 @@ run tsim/parser/single_row_in_tb_query.sim
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 500
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
...
...
tests/script/tsim/parser/slimit1.sim
浏览文件 @
1129b525
...
...
@@ -52,11 +52,9 @@ run tsim/parser/slimit1_query.sim
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 500
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
sql connect
sleep 100
run tsim/parser/slimit1_query.sim
...
...
tests/script/tsim/parser/slimit1_query.sim
浏览文件 @
1129b525
sleep 100
sql connect
$dbPrefix = slm_alt_tg_db
...
...
tests/script/tsim/parser/slimit_alter_tags.sim
浏览文件 @
1129b525
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 2
system sh/exec.sh -n dnode1 -s start
sleep 100
sql connect
$dbPrefix = slm_alt_tg_db
...
...
@@ -93,7 +89,6 @@ if $data02 != tb0 then
return -1
endi
sleep 500
sql reset query cache
sql select count(*), first(ts) from stb group by tg_added order by tg_added asc slimit 5 soffset 3
if $rows != 5 then
...
...
@@ -171,11 +166,8 @@ endi
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 500
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
sql connect
sleep 100
sql use $db
### repeat above queries
...
...
tests/script/tsim/parser/slimit_query.sim
浏览文件 @
1129b525
sleep 100
sql connect
$dbPrefix = slm_db
...
...
tests/script/tsim/parser/union.sim
浏览文件 @
1129b525
...
...
@@ -95,9 +95,6 @@ while $i < $tbNum
$j = $j + 1
endw
print sleep 1sec.
sleep 100
$i = 1
$tb = $tbPrefix . $i
...
...
tests/script/tsim/tag/column.sim
浏览文件 @
1129b525
...
...
@@ -31,7 +31,7 @@ sql create table $tb using $mt tags( 0, '0' )
$i = 1
$tb = $tbPrefix . $i
sql create table $tb using $mt tags( 1,
1
)
sql create table $tb using $mt tags( 1,
'1'
)
$i = 2
$tb = $tbPrefix . $i
...
...
@@ -39,7 +39,7 @@ sql create table $tb using $mt tags( '2', '2' )
$i = 3
$tb = $tbPrefix . $i
sql create table $tb using $mt tags( '3',
3
)
sql create table $tb using $mt tags( '3',
'3'
)
sql show tables
if $rows != 4 then
...
...
@@ -54,7 +54,7 @@ sql insert into $tb values(now, 0, '0')
$i = 1
$tb = $tbPrefix . $i
sql insert into $tb values(now, 1,
1
)
sql insert into $tb values(now, 1,
'1'
)
$i = 2
$tb = $tbPrefix . $i
...
...
@@ -62,7 +62,7 @@ sql insert into $tb values(now, '2', '2')
$i = 3
$tb = $tbPrefix . $i
sql insert into $tb values(now, '3',
3
)
sql insert into $tb values(now, '3',
'3'
)
print =============== step4
sql select * from $mt where tgcol2 = '1'
...
...
tests/script/tsim/tag/commit.sim
浏览文件 @
1129b525
...
...
@@ -249,8 +249,8 @@ sql alter table $mt add tag tgcol6 binary(10)
sql reset query cache
sql alter table $tb set tag tgcol4=false
sql alter table $tb set tag tgcol5=
5
sql alter table $tb set tag tgcol6=
6
sql alter table $tb set tag tgcol5=
'5'
sql alter table $tb set tag tgcol6=
'6'
sql reset query cache
sql select * from $mt where tgcol5 = '5'
...
...
@@ -321,7 +321,7 @@ if $data04 != 3 then
return -1
endi
sql alter table $mt
chang
e tag tgcol1 tgcol4
sql alter table $mt
renam
e tag tgcol1 tgcol4
sql alter table $mt drop tag tgcol2
sql alter table $mt drop tag tgcol3
sql alter table $mt add tag tgcol5 bigint
...
...
@@ -382,14 +382,14 @@ if $data04 != 3 then
return -1
endi
sql alter table $mt
chang
e tag tgcol1 tgcol4
sql alter table $mt
renam
e tag tgcol1 tgcol4
sql alter table $mt drop tag tgcol2
sql alter table $mt drop tag tgcol3
sql alter table $mt add tag tgcol5 binary(17)
sql alter table $mt add tag tgcol6 bool
sql reset query cache
sql alter table $tb set tag tgcol4=4
sql alter table $tb set tag tgcol5=
5
sql alter table $tb set tag tgcol5=
'5'
sql alter table $tb set tag tgcol6=1
sql reset query cache
...
...
@@ -423,7 +423,7 @@ $i = 9
$mt = $mtPrefix . $i
$tb = $tbPrefix . $i
sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol1 double, tgcol2 binary(10), tgcol3 binary(10))
sql create table $tb using $mt tags( 1,
2
, '3' )
sql create table $tb using $mt tags( 1,
'2'
, '3' )
sql insert into $tb values(now, 1)
sql select * from $mt where tgcol2 = '2'
if $rows != 1 then
...
...
@@ -442,7 +442,7 @@ if $data04 != 3 then
return -1
endi
sql alter table $mt
chang
e tag tgcol1 tgcol4
sql alter table $mt
renam
e tag tgcol1 tgcol4
sql alter table $mt drop tag tgcol2
sql alter table $mt drop tag tgcol3
sql alter table $mt add tag tgcol5 bool
...
...
@@ -506,7 +506,7 @@ if $data05 != 4 then
return -1
endi
sql alter table $mt
chang
e tag tgcol1 tgcol4 -x step103
sql alter table $mt
renam
e tag tgcol1 tgcol4 -x step103
return -1
step103:
...
...
@@ -518,7 +518,7 @@ sql alter table $mt add tag tgcol4 binary(10)
sql alter table $mt add tag tgcol5 bool
sql reset query cache
sql alter table $tb set tag tgcol4=
4
sql alter table $tb set tag tgcol4=
'4'
sql alter table $tb set tag tgcol5=false
sql reset query cache
...
...
@@ -580,7 +580,7 @@ if $data06 != 5 then
return -1
endi
sql alter table $mt
chang
e tag tgcol1 tgcol4 -x step114
sql alter table $mt
renam
e tag tgcol1 tgcol4 -x step114
return -1
step114:
...
...
@@ -596,9 +596,9 @@ sql alter table $mt add tag tgcol7 bigint
sql alter table $mt add tag tgcol8 smallint
sql reset query cache
sql alter table $tb set tag tgcol4=
4
sql alter table $tb set tag tgcol4=
'4'
sql alter table $tb set tag tgcol5=5
sql alter table $tb set tag tgcol6=
6
sql alter table $tb set tag tgcol6=
'6'
sql alter table $tb set tag tgcol7=7
sql alter table $tb set tag tgcol8=8
sql reset query cache
...
...
@@ -685,11 +685,11 @@ sql alter table $mt add tag tgcol5 bigint
sql reset query cache
sql alter table $tb set tag tgcol1=false
sql alter table $tb set tag tgcol2=
5
sql alter table $tb set tag tgcol2=
'5'
sql alter table $tb set tag tgcol3=4
sql alter table $tb set tag tgcol4=
3
sql alter table $tb set tag tgcol4=
'3'
sql alter table $tb set tag tgcol5=2
sql alter table $tb set tag tgcol6=
1
sql alter table $tb set tag tgcol6=
'1'
sql reset query cache
sql select * from $mt where tgcol4 = '3'
...
...
@@ -781,8 +781,8 @@ sql alter table $mt add tag tgcol4 int
sql alter table $mt add tag tgcol6 bigint
sql reset query cache
sql alter table $tb set tag tgcol1=
7
sql alter table $tb set tag tgcol2=
8
sql alter table $tb set tag tgcol1=
'7'
sql alter table $tb set tag tgcol2=
'8'
sql alter table $tb set tag tgcol3=9
sql alter table $tb set tag tgcol4=10
sql alter table $tb set tag tgcol5=11
...
...
@@ -817,9 +817,7 @@ if $data07 != 12 then
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 3000
system sh/exec.sh -n dnode1 -s start
sleep 3000
print =============== step1
$i = 0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录