Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
aeec7663
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
aeec7663
编写于
3月 23, 2022
作者:
P
plum-lihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[add cases]
上级
0646a099
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
205 addition
and
86 deletion
+205
-86
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+1
-0
tests/script/tsim/insert/basic0.sim
tests/script/tsim/insert/basic0.sim
+9
-9
tests/script/tsim/insert/null.sim
tests/script/tsim/insert/null.sim
+195
-77
未找到文件。
tests/script/jenkins/basic.txt
浏览文件 @
aeec7663
...
...
@@ -15,6 +15,7 @@
# ---- insert
./test.sh -f tsim/insert/basic0.sim
./test.sh -f tsim/insert/null.sim
# ---- query
./test.sh -f tsim/query/interval.sim
...
...
tests/script/tsim/insert/basic0.sim
浏览文件 @
aeec7663
...
...
@@ -205,17 +205,17 @@ endi
#if $rows != 4 then
# return -1
#endi
#print =============== select count(*) from supter table
#sql select count(*) from stb
#print $data00 $data01 $data02
#if $rows != 1 then
# return -1
#endi
#
#print $data00 $data01 $data02
#if $data00 != 8 then
#if $data00 != 9 then
# return -1
#endi
#
#print =============== select count(column) from supter table
#sql select count(ts), count(c1), count(c2), count(c3) from stb
#print $data00 $data01 $data02 $data03
...
...
@@ -412,18 +412,18 @@ endi
#sql select * from stb
#if $rows != 4 then
# return -1
#endi
#endi
#print =============== select count(*) from supter table
#sql select count(*) from stb
#print $data00 $data01 $data02
#if $rows != 1 then
# return -1
#endi
#
#print $data00 $data01 $data02
#if $data00 != 8 then
#if $data00 != 9 then
# return -1
#endi
#
#print =============== select count(column) from supter table
#sql select count(ts), count(c1), count(c2), count(c3) from stb
#print $data00 $data01 $data02 $data03
...
...
tests/script/tsim/insert/null.sim
浏览文件 @
aeec7663
...
...
@@ -7,7 +7,7 @@ sql connect
print =============== create database
sql create database d0
sql show databases
if $rows !=
1
then
if $rows !=
2
then
return -1
endi
...
...
@@ -40,7 +40,7 @@ sql insert into ct1 values (now+7s, 14, NULL, 3.5, 95)
sql insert into ct1 values (now+8s, 15, 2.5, NULL, 96)
sql insert into ct1 values (now+9s, 16, 2.6, 3.6, NULL)
sql insert into ct1 values (now+10s, NULL, NULL, NULL, NULL)
sql insert into ct1 values (now+11s, -214748364
8
, 2.7, 3.7, 97)
sql insert into ct1 values (now+11s, -214748364
7
, 2.7, 3.7, 97)
#===================================================================
#===================================================================
...
...
@@ -75,7 +75,6 @@ endi
# return -1
#endi
print =============== select count(*) from child table
sql select count(*) from ct1
print ===> select count(*) from ct1
...
...
@@ -84,9 +83,7 @@ print ===> rows0: $data00 $data01 $data02 $data03 $data04
if $rows != 1 then
return -1
endi
print $data00 $data01 $data02
if $data00 != 4 then
if $data00 != 12 then
return -1
endi
...
...
@@ -95,17 +92,16 @@ sql select count(ts), count(c1), count(c2), count(c3) from ct1
print ===> select count(ts), count(c1), count(c2), count(c3) from ct1
print ===> rows: $rows
print ===> rows0: $data00 $data01 $data02 $data03 $data04
if $data00 != 4 then
if $data00 != 12 then
return -1
endi
if $data01 !=
4
then
if $data01 !=
8
then
return -1
endi
if $data02 !=
4
then
if $data02 !=
8
then
return -1
endi
if $data03 !=
4
then
if $data03 !=
8
then
return -1
endi
...
...
@@ -121,7 +117,7 @@ print ===> rows0: $data00 $data01 $data02 $data03 $data04
if $rows != 1 then
return -1
endi
if $data00 !=
10
then
if $data00 !=
-2147483647
then
return -1
endi
if $data01 != 2.00000 then
...
...
@@ -139,13 +135,13 @@ print ===> rows0: $data00 $data01 $data02 $data03 $data04
if $rows != 1 then
return -1
endi
if $data00 != 1
3
then
if $data00 != 1
6
then
return -1
endi
if $data01 != 2.
3
0000 then
if $data01 != 2.
7
0000 then
return -1
endi
if $data02 != 3.
3
00000000 then
if $data02 != 3.
7
00000000 then
return -1
endi
...
...
@@ -157,13 +153,13 @@ print ===> rows0: $data00 $data01 $data02 $data03 $data04
if $rows != 1 then
return -1
endi
if $data00 !=
46
then
if $data00 !=
-2147483556
then
return -1
endi
if $data01 !=
8.599999905
then
if $data01 !=
18.799999952
then
return -1
endi
if $data02 !=
12.6
00000000 then
if $data02 !=
26.8
00000000 then
return -1
endi
...
...
@@ -172,42 +168,48 @@ sql select c1, c2, c3 from ct1
print ===> select c1, c2, c3 from ct1
print ===> rows: $rows
print ===> rows0: $data00 $data01 $data02 $data03 $data04
#if $rows != 4 then
# return -1
#endi
#if $data00 != 10 then
# return -1
#endi
#if $data01 != 2.00000 then
# return -1
#endi
#if $data02 != 3.000000000 then
# return -1
#endi
#if $data10 != 11 then
# return -1
#endi
#if $data11 != 2.10000 then
# return -1
#endi
#if $data12 != 3.100000000 then
# return -1
#endi
#if $data30 != 13 then
# return -1
#endi
#if $data31 != 2.30000 then
# return -1
#endi
#if $data32 != 3.300000000 then
# return -1
#endi
if $rows != 12 then
return -1
endi
if $data00 != 10 then
return -1
endi
if $data01 != 2.00000 then
return -1
endi
if $data02 != 3.000000000 then
return -1
endi
if $data10 != NULL then
return -1
endi
if $data11 != NULL then
return -1
endi
if $data12 != NULL then
return -1
endi
if $data30 != 11 then
return -1
endi
if $data31 != NULL then
return -1
endi
if $data32 != 3.200000000 then
return -1
endi
if $data90 != 16 then
return -1
endi
if $data91 != 2.60000 then
return -1
endi
if $data92 != 3.600000000 then
return -1
endi
#===================================================================
#===================================================================
return
#print =============== query data from stb
#sql select * from stb
#print ===>
...
...
@@ -218,19 +220,18 @@ return
#endi
#print =============== select count(*) from supter table
#sql select count(*) from stb
#print $data00 $data01 $data02
#if $rows != 1 then
# return -1
#endi
#
#print $data00 $data01 $data02
#if $data00 != 8 then
#if $data00 != 12 then
# return -1
#endi
#
#print =============== select count(column) from supter table
#sql select count(ts), count(c1), count(c2), count(c3) from stb
#print $data00 $data01 $data02 $data03
#if $data00 !=
8
then
#if $data00 !=
12
then
# return -1
#endi
#if $data01 != 8 then
...
...
@@ -243,6 +244,7 @@ return
# return -1
#endi
return
#===================================================================
#===================================================================
...
...
@@ -251,9 +253,36 @@ 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 start
sleep 2000
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
sql select * from ct1
if $rows != 4 then # after fix bug, modify 4 to 7
print ===> select * from ct1
print ===> rows: $rows
print ===> rows0: $data00 $data01 $data02 $data03 $data04
print ===> rows1: $data10 $data11 $data12 $data13 $data14
print ===> rows2: $data20 $data21 $data22 $data23 $data24
print ===> rows3: $data30 $data31 $data32 $data33 $data34
print ===> rows4: $data40 $data41 $data42 $data43 $data44
if $rows != 12 then
return -1
endi
if $data01 != 10 then
...
...
@@ -275,31 +304,33 @@ endi
# return -1
#endi
print =============== select count(*) from child table
sql select count(*) from ct1
print ===> select count(*) from ct1
print ===> rows: $rows
print ===> rows0: $data00 $data01 $data02 $data03 $data04
if $rows != 1 then
return -1
endi
print $data00 $data01 $data02
if $data00 != 4 then
if $data00 != 12 then
return -1
endi
print =============== select count(column) from child table
sql select count(ts), count(c1), count(c2), count(c3) from ct1
print $data00 $data01 $data02 $data03
if $data00 != 4 then
print ===> select count(ts), count(c1), count(c2), count(c3) from ct1
print ===> rows: $rows
print ===> rows0: $data00 $data01 $data02 $data03 $data04
if $data00 != 12 then
return -1
endi
if $data01 !=
4
then
if $data01 !=
8
then
return -1
endi
if $data02 !=
4
then
if $data02 !=
8
then
return -1
endi
if $data03 !=
4
then
if $data03 !=
8
then
return -1
endi
...
...
@@ -309,11 +340,13 @@ endi
print =============== select min(column) from child table
sql select min(c1), min(c2), min(c3) from ct1
print $data00 $data01 $data02 $data03
print ===> select min(c1), min(c2), min(c3) from ct1
print ===> rows: $rows
print ===> rows0: $data00 $data01 $data02 $data03 $data04
if $rows != 1 then
return -1
endi
if $data00 !=
10
then
if $data00 !=
-2147483647
then
return -1
endi
if $data01 != 2.00000 then
...
...
@@ -325,34 +358,119 @@ endi
print =============== select max(column) from child table
sql select max(c1), max(c2), max(c3) from ct1
print $data00 $data01 $data02 $data03
print ===> select max(c1), max(c2), max(c3) from ct1
print ===> rows: $rows
print ===> rows0: $data00 $data01 $data02 $data03 $data04
if $rows != 1 then
return -1
endi
if $data00 != 1
3
then
if $data00 != 1
6
then
return -1
endi
if $data01 != 2.
3
0000 then
if $data01 != 2.
7
0000 then
return -1
endi
if $data02 != 3.
3
00000000 then
if $data02 != 3.
7
00000000 then
return -1
endi
print =============== select sum(column) from child table
sql select sum(c1), sum(c2), sum(c3) from ct1
print $data00 $data01 $data02 $data03
print ===> select sum(c1), sum(c2), sum(c3) from ct1
print ===> rows: $rows
print ===> rows0: $data00 $data01 $data02 $data03 $data04
if $rows != 1 then
return -1
endi
if $data00 != 46 then
if $data00 != -2147483556 then
return -1
endi
if $data01 != 18.799999952 then
return -1
endi
if $data02 != 26.800000000 then
return -1
endi
print =============== select column, from child table
sql select c1, c2, c3 from ct1
print ===> select c1, c2, c3 from ct1
print ===> rows: $rows
print ===> rows0: $data00 $data01 $data02 $data03 $data04
if $rows != 12 then
return -1
endi
if $data00 != 10 then
return -1
endi
if $data01 != 2.00000 then
return -1
endi
if $data02 != 3.000000000 then
return -1
endi
if $data10 != NULL then
return -1
endi
if $data11 != NULL then
return -1
endi
if $data12 != NULL then
return -1
endi
if $data30 != 11 then
return -1
endi
if $data31 != NULL then
return -1
endi
if $data
01 != 8.599999905
then
if $data
32 != 3.200000000
then
return -1
endi
if $data
02 != 12.600000000
then
if $data
90 != 16
then
return -1
endi
if $data91 != 2.60000 then
return -1
endi
if $data92 != 3.600000000 then
return -1
endi
#===================================================================
#===================================================================
#print =============== query data from stb
#sql select * from stb
#print ===>
#print ===> rows: $rows
#print ===> rows0: $data00 $data01 $data02 $data03 $data04
#if $rows != 4 then
# return -1
#endi
#print =============== select count(*) from supter table
#sql select count(*) from stb
#print $data00 $data01 $data02
#if $rows != 1 then
# return -1
#endi
#if $data00 != 12 then
# return -1
#endi
#print =============== select count(column) from supter table
#sql select count(ts), count(c1), count(c2), count(c3) from stb
#print $data00 $data01 $data02 $data03
#if $data00 != 12 then
# return -1
#endi
#if $data01 != 8 then
# return -1
#endi
#if $data02 != 8 then
# return -1
#endi
#if $data03 != 8 then
# return -1
#endi
#system sh/exec.sh -n dnode1 -s stop -x SIGINT
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录