提交 26c5ac3e 编写于 作者: S Shengliang Guan

test: restore some 2.0 case

上级 2f7d6828
run general/vector/metrics_field.sim
run general/vector/metrics_mix.sim
run general/vector/metrics_query.sim
run general/vector/metrics_tag.sim
run general/vector/metrics_time.sim
run general/vector/multi.sim
run general/vector/single.sim
run general/vector/table_field.sim
run general/vector/table_mix.sim
run general/vector/table_query.sim
run general/vector/table_time.sim
...@@ -262,4 +262,17 @@ ...@@ -262,4 +262,17 @@
./test.sh -f tsim/field/tinyint.sim ./test.sh -f tsim/field/tinyint.sim
./test.sh -f tsim/field/unsigined_bigint.sim ./test.sh -f tsim/field/unsigined_bigint.sim
# ---- vector
./test.sh -f tsim/vector/metrics_field.sim
./test.sh -f tsim/vector/metrics_mix.sim
./test.sh -f tsim/vector/metrics_query.sim
./test.sh -f tsim/vector/metrics_tag.sim
./test.sh -f tsim/vector/metrics_time.sim
./test.sh -f tsim/vector/multi.sim
./test.sh -f tsim/vector/single.sim
./test.sh -f tsim/vector/table_field.sim
./test.sh -f tsim/vector/table_mix.sim
./test.sh -f tsim/vector/table_query.sim
./test.sh -f tsim/vector/table_time.sim
#======================b1-end=============== #======================b1-end===============
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
$dbPrefix = m_mf_db $dbPrefix = m_mf_db
...@@ -99,17 +95,9 @@ if $data00 != 0.000000000 then ...@@ -99,17 +95,9 @@ if $data00 != 0.000000000 then
return -1 return -1
endi endi
sql select g - f from $mt where a = 5 -x step21 sql select g - f from $mt where a = 5
return -1 sql select h - f from $mt where a = 5
step21: sql select ts - f from $mt where a = 5
sql select h - f from $mt where a = 5 -x step22
return -1
step22:
sql select ts - f from $mt where a = 5 -x step23
return -1
step23:
sql select a - e from $mt where a = 5 sql select a - e from $mt where a = 5
print ===> $data00 print ===> $data00
...@@ -616,7 +604,7 @@ step63: ...@@ -616,7 +604,7 @@ step63:
print =============== clear print =============== 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
......
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
$dbPrefix = m_mx_db $dbPrefix = m_mx_db
...@@ -99,17 +95,11 @@ if $data00 != 0.000000000 then ...@@ -99,17 +95,11 @@ if $data00 != 0.000000000 then
return -1 return -1
endi endi
sql select g - f from $mt where a = 5 and tgcol = 5 and ts > now + 4m and ts < now + 6m -x step21 sql select g - f from $mt where a = 5 and tgcol = 5 and ts > now + 4m and ts < now + 6m
return -1
step21:
sql select h - f from $mt where a = 5 and tgcol = 5 and ts > now + 4m and ts < now + 6m -x step22 sql select h - f from $mt where a = 5 and tgcol = 5 and ts > now + 4m and ts < now + 6m
return -1
step22:
sql select ts - f from $mt where a = 5 and tgcol = 5 and ts > now + 4m and ts < now + 6m -x step23 sql select ts - f from $mt where a = 5 and tgcol = 5 and ts > now + 4m and ts < now + 6m
return -1
step23:
sql select a - e from $mt where a = 5 and tgcol = 5 and ts > now + 4m and ts < now + 6m sql select a - e from $mt where a = 5 and tgcol = 5 and ts > now + 4m and ts < now + 6m
print ===> $data00 print ===> $data00
...@@ -616,7 +606,7 @@ step63: ...@@ -616,7 +606,7 @@ step63:
print =============== clear print =============== 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
......
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
$dbPrefix = m_mq_db $dbPrefix = m_mq_db
...@@ -95,17 +91,9 @@ if $data00 != 0.000000000 then ...@@ -95,17 +91,9 @@ if $data00 != 0.000000000 then
return -1 return -1
endi endi
sql select g - f from $mt -x step21 sql select g - f from $mt
return -1 sql select h - f from $mt
step21: sql select ts - f from $mt
sql select h - f from $mt -x step22
return -1
step22:
sql select ts - f from $mt -x step23
return -1
step23:
sql select a - e from $mt sql select a - e from $mt
print ===> $data00 print ===> $data00
...@@ -612,7 +600,7 @@ step63: ...@@ -612,7 +600,7 @@ step63:
print =============== clear print =============== 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
......
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
$dbPrefix = m_mtg_db $dbPrefix = m_mtg_db
...@@ -95,17 +91,11 @@ if $data00 != 0.000000000 then ...@@ -95,17 +91,11 @@ if $data00 != 0.000000000 then
return -1 return -1
endi endi
sql select g - f from $mt where tgcol = 5 -x step21 sql select g - f from $mt where tgcol = 5
return -1
step21:
sql select h - f from $mt where tgcol = 5 -x step22 sql select h - f from $mt where tgcol = 5
return -1
step22:
sql select ts - f from $mt where tgcol = 5 -x step23 sql select ts - f from $mt where tgcol = 5
return -1
step23:
sql select a - e from $mt where tgcol = 5 sql select a - e from $mt where tgcol = 5
print ===> $data00 print ===> $data00
...@@ -612,7 +602,7 @@ step63: ...@@ -612,7 +602,7 @@ step63:
print =============== clear print =============== 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
......
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
$dbPrefix = m_mt_db $dbPrefix = m_mt_db
...@@ -95,17 +91,11 @@ if $data00 != 0.000000000 then ...@@ -95,17 +91,11 @@ if $data00 != 0.000000000 then
return -1 return -1
endi endi
sql select g - f from $mt where tgcol = 5 and ts > now + 4m and ts < now + 6m -x step21 sql select g - f from $mt where tgcol = 5 and ts > now + 4m and ts < now + 6m
return -1
step21:
sql select h - f from $mt where tgcol = 5 and ts > now + 4m and ts < now + 6m -x step22 sql select h - f from $mt where tgcol = 5 and ts > now + 4m and ts < now + 6m
return -1
step22:
sql select ts - f from $mt where tgcol = 5 and ts > now + 4m and ts < now + 6m -x step23 sql select ts - f from $mt where tgcol = 5 and ts > now + 4m and ts < now + 6m
return -1
step23:
sql select a - e from $mt where tgcol = 5 and ts > now + 4m and ts < now + 6m sql select a - e from $mt where tgcol = 5 and ts > now + 4m and ts < now + 6m
print ===> $data00 print ===> $data00
...@@ -612,7 +602,7 @@ step63: ...@@ -612,7 +602,7 @@ step63:
print =============== clear print =============== 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
......
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
$dbPrefix = m_mu_db $dbPrefix = m_mu_db
...@@ -71,9 +67,7 @@ sql select a + a from $tb where ts > now + 4m order by ts desc ...@@ -71,9 +67,7 @@ sql select a + a from $tb where ts > now + 4m order by ts desc
sql select a + c from $tb where ts < now + 4m order by ts asc sql select a + c from $tb where ts < now + 4m order by ts asc
sql select a + f from $tb where ts > now + 4m order by ts asc -x step24 sql select a + f from $tb where ts > now + 4m order by ts asc
return -1
step24:
print =============== step3 print =============== step3
$i = 1 $i = 1
...@@ -150,17 +144,11 @@ endi ...@@ -150,17 +144,11 @@ endi
print =============== step6 print =============== step6
$i = 1 $i = 1
$tb = $tbPrefix . $i $tb = $tbPrefix . $i
sql select a + ts from $tb -x step61 sql select a + ts from $tb
return -1
step61:
sql select a + f from $tb -x step62 sql select a + f from $tb
return -1
step62:
sql select a + g from $tb -x step63 sql select a + g from $tb
return -1
step63:
print =============== step7 print =============== step7
$i = 1 $i = 1
...@@ -202,14 +190,12 @@ sql select a + a from $tb where e = 2 and ts > now + 4m order by ts desc ...@@ -202,14 +190,12 @@ sql select a + a from $tb where e = 2 and ts > now + 4m order by ts desc
sql select a + c from $tb where f = 2 and ts < now + 4m order by ts asc sql select a + c from $tb where f = 2 and ts < now + 4m order by ts asc
sql select a + f from $tb where g = 2 and ts > now + 4m order by ts asc -x step74 sql select a + f from $tb where g = 2 and ts > now + 4m order by ts asc
return -1
step74:
print =============== clear print =============== 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
......
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
$dbPrefix = m_si_db $dbPrefix = m_si_db
...@@ -150,9 +146,7 @@ $i = 11 ...@@ -150,9 +146,7 @@ $i = 11
$tb = $tbPrefix . $i $tb = $tbPrefix . $i
sql create table $tb (ts timestamp, tbcol bool) sql create table $tb (ts timestamp, tbcol bool)
sql insert into $tb values(now, 0) sql insert into $tb values(now, 0)
sql select tbcol + 2 from $tb -x step6 sql select tbcol + 2 from $tb
return -1
step6:
print =============== step7 print =============== step7
$i = $i + 1 $i = $i + 1
...@@ -289,14 +283,12 @@ $i = $i + 1 ...@@ -289,14 +283,12 @@ $i = $i + 1
$tb = $tbPrefix . $i $tb = $tbPrefix . $i
sql create table $tb (ts timestamp, tbcol binary(100)) sql create table $tb (ts timestamp, tbcol binary(100))
sql insert into $tb values(now, '0'); sql insert into $tb values(now, '0');
sql select tbcol + 2 from $tb -x step12 sql select tbcol + 2 from $tb
return -1
step12:
print =============== clear print =============== 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
......
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
$dbPrefix = m_tf_db $dbPrefix = m_tf_db
...@@ -95,17 +91,11 @@ if $data00 != 0.000000000 then ...@@ -95,17 +91,11 @@ if $data00 != 0.000000000 then
return -1 return -1
endi endi
sql select g - f from $tb where a = 5 -x step21 sql select g - f from $tb where a = 5
return -1
step21:
sql select h - f from $tb where a = 5 -x step22 sql select h - f from $tb where a = 5
return -1
step22:
sql select ts - f from $tb where a = 5 -x step23 sql select ts - f from $tb where a = 5
return -1
step23:
sql select a - e from $tb where a = 5 sql select a - e from $tb where a = 5
print ===> $data00 print ===> $data00
...@@ -612,7 +602,7 @@ step63: ...@@ -612,7 +602,7 @@ step63:
print =============== clear print =============== 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
......
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
$dbPrefix = m_tm_db $dbPrefix = m_tm_db
...@@ -95,17 +91,11 @@ if $data00 != 0.000000000 then ...@@ -95,17 +91,11 @@ if $data00 != 0.000000000 then
return -1 return -1
endi endi
sql select g - f from $tb where a = 5 and ts > now + 4m and ts < now + 6m -x step21 sql select g - f from $tb where a = 5 and ts > now + 4m and ts < now + 6m
return -1
step21:
sql select h - f from $tb where a = 5 and ts > now + 4m and ts < now + 6m -x step22 sql select h - f from $tb where a = 5 and ts > now + 4m and ts < now + 6m
return -1
step22:
sql select ts - f from $tb where a = 5 and ts > now + 4m and ts < now + 6m -x step23 sql select ts - f from $tb where a = 5 and ts > now + 4m and ts < now + 6m
return -1
step23:
sql select a - e from $tb where a = 5 and ts > now + 4m and ts < now + 6m sql select a - e from $tb where a = 5 and ts > now + 4m and ts < now + 6m
print ===> $data00 print ===> $data00
...@@ -612,7 +602,7 @@ step63: ...@@ -612,7 +602,7 @@ step63:
print =============== clear print =============== 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
......
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
$dbPrefix = m_tq_db $dbPrefix = m_tq_db
...@@ -95,17 +91,11 @@ if $data00 != 0.000000000 then ...@@ -95,17 +91,11 @@ if $data00 != 0.000000000 then
return -1 return -1
endi endi
sql select g - f from $tb -x step21 sql select g - f from $tb
return -1
step21:
sql select h - f from $tb -x step22 sql select h - f from $tb
return -1
step22:
sql select ts - f from $tb -x step23 sql select ts - f from $tb
return -1
step23:
sql select a - e from $tb sql select a - e from $tb
print ===> $data00 print ===> $data00
...@@ -612,7 +602,7 @@ step63: ...@@ -612,7 +602,7 @@ step63:
print =============== clear print =============== 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
......
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
$dbPrefix = m_tt_db $dbPrefix = m_tt_db
...@@ -95,17 +91,11 @@ if $data00 != 0.000000000 then ...@@ -95,17 +91,11 @@ if $data00 != 0.000000000 then
return -1 return -1
endi endi
sql select g - f from $tb where ts > now + 4m and ts < now + 6m -x step21 sql select g - f from $tb where ts > now + 4m and ts < now + 6m
return -1
step21:
sql select h - f from $tb where ts > now + 4m and ts < now + 6m -x step22 sql select h - f from $tb where ts > now + 4m and ts < now + 6m
return -1
step22:
sql select ts - f from $tb where ts > now + 4m and ts < now + 6m -x step23 sql select ts - f from $tb where ts > now + 4m and ts < now + 6m
return -1
step23:
sql select a - e from $tb where ts > now + 4m and ts < now + 6m sql select a - e from $tb where ts > now + 4m and ts < now + 6m
print ===> $data00 print ===> $data00
...@@ -612,7 +602,7 @@ step63: ...@@ -612,7 +602,7 @@ step63:
print =============== clear print =============== 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册