提交 cb1b6794 编写于 作者: S Shengliang Guan

test: valgrind case

上级 478cdfe7
......@@ -266,26 +266,27 @@
./test.sh -f tsim/tmq/snapshot1.sim
# --- stable
./test.sh -f tsim/stable/alter_comment.sim
./test.sh -f tsim/stable/alter_count.sim
./test.sh -f tsim/stable/alter_import.sim
./test.sh -f tsim/stable/alter_insert1.sim
./test.sh -f tsim/stable/alter_insert2.sim
./test.sh -f tsim/stable/alter_metrics.sim
./test.sh -f tsim/stable/column_add.sim
./test.sh -f tsim/stable/column_drop.sim
./test.sh -f tsim/stable/column_modify.sim
./test.sh -f tsim/stable/disk.sim
./test.sh -f tsim/stable/dnode3.sim
./test.sh -f tsim/stable/metrics.sim
./test.sh -f tsim/stable/refcount.sim
./test.sh -f tsim/stable/show.sim
./test.sh -f tsim/stable/values.sim
./test.sh -f tsim/stable/vnode3.sim
./test.sh -f tsim/stable/column_add.sim
./test.sh -f tsim/stable/column_drop.sim
./test.sh -f tsim/stable/column_modify.sim
./test.sh -f tsim/stable/tag_add.sim
./test.sh -f tsim/stable/tag_drop.sim
./test.sh -f tsim/stable/tag_filter.sim
./test.sh -f tsim/stable/tag_modify.sim
./test.sh -f tsim/stable/tag_rename.sim
./test.sh -f tsim/stable/alter_comment.sim
./test.sh -f tsim/stable/alter_count.sim
./test.sh -f tsim/stable/alter_insert1.sim
./test.sh -f tsim/stable/alter_insert2.sim
./test.sh -f tsim/stable/alter_import.sim
./test.sh -f tsim/stable/tag_filter.sim
./test.sh -f tsim/stable/values.sim
./test.sh -f tsim/stable/vnode3.sim
# --- for multi process mode
./test.sh -f tsim/user/basic.sim -m
......@@ -367,7 +368,7 @@
./test.sh -f tsim/compute/diff2.sim
./test.sh -f tsim/compute/first.sim
./test.sh -f tsim/compute/interval.sim
# jira ./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/leastsquare.sim
./test.sh -f tsim/compute/max.sim
......@@ -416,7 +417,7 @@
./test.sh -f tsim/tag/4.sim
./test.sh -f tsim/tag/5.sim
# jira ./test.sh -f tsim/tag/6.sim
# jira ./test.sh -f tsim/tag/add.sim
./test.sh -f tsim/tag/add.sim
./test.sh -f tsim/tag/bigint.sim
./test.sh -f tsim/tag/binary_binary.sim
./test.sh -f tsim/tag/binary.sim
......
......@@ -65,8 +65,6 @@ if $data00 != 19 then
return -1
endi
print =============== step7
sql select last_row(tbcol) from $mt
print ===> $data00
......
......@@ -934,11 +934,8 @@ if $data79 != null then
endi
print ======== step9
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 3000
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql select * from tb order by ts asc
if $rows != 8 then
......
......@@ -604,9 +604,7 @@ sql_error alter table tb drop column a
print ======== step9
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 3000
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql select * from tb order by ts desc
if $rows != 7 then
......
......@@ -69,8 +69,6 @@ if $rows != 2 then
return -1
endi
sleep 100
print =============== step2
$i = 1
$tb = $tbPrefix . $i
......
......@@ -250,8 +250,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'
......@@ -390,8 +390,8 @@ 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 tgcol6=1
sql alter table $tb set tag tgcol5='5'
sql alter table $tb set tag tgcol6='1'
sql reset query cache
sql select * from $mt where tgcol5 = '5'
......@@ -409,7 +409,7 @@ endi
if $data03 != 5 then
return -1
endi
if $data04 != 1 then
if $data04 != 0 then
return -1
endi
......@@ -425,7 +425,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
......@@ -520,7 +520,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
......@@ -598,9 +598,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
......@@ -687,11 +687,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'
......@@ -783,8 +783,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
......
......@@ -40,19 +40,19 @@ if $data03 != 2 then
return -1
endi
sql alter table $mt change tag tagcx tgcol3 -x step21
sql alter table $mt rename tag tagcx tgcol3 -x step21
return -1
step21:
sql alter table $mt change tag tgcol1 tgcol2 -x step22
sql alter table $mt rename tag tgcol1 tgcol2 -x step22
return -1
step22:
#sql alter table $mt change tag tgcol1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -x step20
#sql alter table $mt rename tag tgcol1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -x step20
# return -1
#step20:
sql alter table $mt change tag tgcol1 tgcol3
sql alter table $mt change tag tgcol2 tgcol4
sql alter table $mt change tag tgcol4 tgcol3 -x step23
sql alter table $mt rename tag tgcol1 tgcol3
sql alter table $mt rename tag tgcol2 tgcol4
sql alter table $mt rename tag tgcol4 tgcol3 -x step23
return -1
step23:
......@@ -77,8 +77,8 @@ if $data03 != 2 then
return -1
endi
sql alter table $mt change tag tgcol1 tgcol3
sql alter table $mt change tag tgcol2 tgcol4
sql alter table $mt rename tag tgcol1 tgcol3
sql alter table $mt rename tag tgcol2 tgcol4
print =============== step4
$i = 4
......@@ -101,8 +101,8 @@ if $data03 != 2.00000 then
return -1
endi
sql alter table $mt change tag tgcol1 tgcol3
sql alter table $mt change tag tgcol2 tgcol4
sql alter table $mt rename tag tgcol1 tgcol3
sql alter table $mt rename tag tgcol2 tgcol4
print =============== step5
$i = 5
......@@ -125,8 +125,8 @@ if $data03 != 2 then
return -1
endi
sql alter table $mt change tag tgcol1 tgcol3
sql alter table $mt change tag tgcol2 tgcol4
sql alter table $mt rename tag tgcol1 tgcol3
sql alter table $mt rename tag tgcol2 tgcol4
print =============== step6
$i = 6
......@@ -163,15 +163,14 @@ endi
sql alter table $mt drop tag tgcol3
sql reset query cache
sql alter table $mt change tag tgcol4 tgcol3
sql alter table $mt change tag tgcol1 tgcol7
sql alter table $mt change tag tgcol2 tgcol8
sql alter table $mt rename tag tgcol4 tgcol3
sql alter table $mt rename tag tgcol1 tgcol7
sql alter table $mt rename tag tgcol2 tgcol8
sql reset query cache
sql alter table $mt change tag tgcol3 tgcol9
sql alter table $mt change tag tgcol5 tgcol10
sql alter table $mt change tag tgcol6 tgcol11
sql alter table $mt rename tag tgcol3 tgcol9
sql alter table $mt rename tag tgcol5 tgcol10
sql alter table $mt rename tag tgcol6 tgcol11
sleep 3000
sql reset query cache
print =============== step2
......
......@@ -57,7 +57,6 @@ sql drop table d1.stb2
sql drop database d1
sql drop database d2
goto _OVER
print =============== step7: repeat
sql create database d1 vgroups 2 buffer 3
sql create database d2 vgroups 2 buffer 3
......
system sh/stop_dnodes.sh
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 -v
sql connect
print =============== step1: create drop show dnodes
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
print ---> dnode not ready!
return -1
endi
sql show dnodes
print ---> $data00 $data01 $data02 $data03 $data04 $data05
if $rows != 1 then
return -1
endi
if $data(1)[4] != ready then
goto step1
endi
print =============== step2: create db
sql create database db
sql use db
sql create table db.stb (ts timestamp, c1 int, c2 binary(4)) tags(t1 int, t2 float, t3 binary(16)) comment "abd"
print =============== step3: alter stb
sql_error alter table db.stb add column ts int
sql alter table db.stb add column c3 int
sql alter table db.stb add column c4 bigint
sql alter table db.stb add column c5 binary(12)
sql alter table db.stb drop column c1
sql alter table db.stb drop column c4
sql alter table db.stb MODIFY column c2 binary(32)
sql alter table db.stb add tag t4 bigint
sql alter table db.stb add tag c1 int
sql alter table db.stb add tag t5 binary(12)
sql alter table db.stb drop tag c1
sql alter table db.stb drop tag t5
sql alter table db.stb MODIFY tag t3 binary(32)
sql alter table db.stb rename tag t1 tx
sql alter table db.stb comment 'abcde' ;
goto _OVER
print =============== step4: alter tb
sql create table tb (ts timestamp, a int)
sql insert into tb values(now-28d, -28)
sql select count(a) from tb
sql alter table tb add column b smallint
sql insert into tb values(now-25d, -25, 0)
sql select count(b) from tb
sql alter table tb add column c tinyint
sql insert into tb values(now-22d, -22, 3, 0)
sql select count(c) from tb
sql alter table tb add column d int
sql insert into tb values(now-19d, -19, 6, 0, 0)
sql select count(d) from tb
sql alter table tb add column e bigint
sql alter table tb add column f float
sql alter table tb add column g double
sql alter table tb add column h binary(10)
sql select count(a), count(b), count(c), count(d), count(e), count(f), count(g), count(h) from tb
sql select * from tb order by ts desc
_OVER:
system sh/exec.sh -n dnode1 -s stop -x SIGINT
print =============== check
$null=
system_content sh/checkValgrind.sh -n dnode1
print cmd return result ----> [ $system_content ]
if $system_content > 0 then
return -1
endi
if $system_content == $null then
return -1
endi
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册