提交 0a87184d 编写于 作者: S Shengliang Guan

test: cases for alter stb

上级 b996e5bd
......@@ -252,6 +252,7 @@ endi
print ======== step8
sql alter table tb add column h binary(10)
sql select * from tb
sql describe tb
if $data00 != ts then
return -1
......@@ -304,7 +305,7 @@ endi
if $data80 != h then
return -1
endi
if $data81 != BINARY then
if $data81 != VARCHAR then
return -1
endi
if $data82 != 10 then
......@@ -371,7 +372,7 @@ endi
if $data80 != h then
return -1
endi
if $data81 != BINARY then
if $data81 != VARCHAR then
return -1
endi
if $data82 != 10 then
......@@ -447,7 +448,7 @@ endi
if $data70 != h then
return -1
endi
if $data71 != BINARY then
if $data71 != VARCHAR then
return -1
endi
if $data72 != 10 then
......@@ -496,7 +497,7 @@ endi
if $data60 != h then
return -1
endi
if $data61 != BINARY then
if $data61 != VARCHAR then
return -1
endi
if $data62 != 10 then
......@@ -539,7 +540,7 @@ endi
if $data50 != h then
return -1
endi
if $data51 != BINARY then
if $data51 != VARCHAR then
return -1
endi
if $data52 != 10 then
......@@ -576,7 +577,7 @@ endi
if $data40 != h then
return -1
endi
if $data41 != BINARY then
if $data41 != VARCHAR then
return -1
endi
if $data42 != 10 then
......@@ -607,7 +608,7 @@ endi
if $data30 != h then
return -1
endi
if $data31 != BINARY then
if $data31 != VARCHAR then
return -1
endi
if $data32 != 10 then
......@@ -632,7 +633,7 @@ endi
if $data20 != h then
return -1
endi
if $data21 != BINARY then
if $data21 != VARCHAR then
return -1
endi
if $data22 != 10 then
......
......@@ -104,6 +104,10 @@
./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
# --- for multi process mode
./test.sh -f tsim/user/basic1.sim -m
......
......@@ -248,9 +248,8 @@ endi
print ============== step18
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 3000
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
#sql select count(g) from tb
#if $data00 != 12 then
......
......@@ -29,14 +29,14 @@ if $data00 != 3 then
endi
print ========= step3
sql import into tb values(now-23d, -23, 0)
sql import into tb values(now-21d, -21, 0)
sql insert into tb values(now-23d, -23, 0)
sql insert into tb values(now-21d, -21, 0)
sql select count(b) from tb
if $data00 != 5 then
return -1
endi
sql import into tb values(now-29d, -29, 0)
sql insert into tb values(now-29d, -29, 0)
sql select count(b) from tb
if $data00 != 6 then
return -1
......
......@@ -936,9 +936,8 @@ 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 connect
sql select * from tb order by ts asc
if $rows != 8 then
......
......@@ -604,9 +604,8 @@ 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 connect
sql select * from tb order by ts desc
if $rows != 7 then
......
......@@ -347,7 +347,7 @@ endi
if $data80 != h then
return -1
endi
if $data81 != BINARY then
if $data81 != VARCHAR then
return -1
endi
if $data82 != 10 then
......@@ -363,9 +363,8 @@ endi
print ======== step9
print ======== step10
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 3000
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql use d2
sql describe tb
......@@ -420,7 +419,7 @@ endi
if $data80 != h then
return -1
endi
if $data81 != BINARY then
if $data81 != VARCHAR then
return -1
endi
if $data82 != 10 then
......@@ -502,7 +501,7 @@ endi
if $data70 != h then
return -1
endi
if $data71 != BINARY then
if $data71 != VARCHAR then
return -1
endi
if $data72 != 10 then
......@@ -557,7 +556,7 @@ endi
if $data60 != h then
return -1
endi
if $data61 != BINARY then
if $data61 != VARCHAR then
return -1
endi
if $data62 != 10 then
......@@ -606,7 +605,7 @@ endi
if $data50 != h then
return -1
endi
if $data51 != BINARY then
if $data51 != VARCHAR then
return -1
endi
if $data52 != 10 then
......@@ -649,7 +648,7 @@ endi
if $data40 != h then
return -1
endi
if $data41 != BINARY then
if $data41 != VARCHAR then
return -1
endi
if $data42 != 10 then
......@@ -686,7 +685,7 @@ endi
if $data30 != h then
return -1
endi
if $data31 != BINARY then
if $data31 != VARCHAR then
return -1
endi
if $data32 != 10 then
......@@ -717,7 +716,7 @@ endi
if $data20 != h then
return -1
endi
if $data21 != BINARY then
if $data21 != VARCHAR then
return -1
endi
if $data22 != 10 then
......@@ -758,7 +757,7 @@ endi
print ======= over
sql drop database d2
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
......@@ -79,28 +79,31 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start
sql connect
sql select * from db.ctb
sql select * from db.stb
print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
if $rows != 2 then
return -1
endi
#if $data[0][1] != 1 then
# return -1
#endi
#if $data[0][2] != 1234 then
# return -1
#endi
#if $data[0][3] != 101 then
# return -1
#endi
#if $data[1][1] != 1 then
# return -1
#endi
#if $data[1][2] != 12345 then
# return -1
#endi
#if $data[1][3] != 101 then
# return -1
#endi
if $data[0][1] != 1 then
return -1
endi
if $data[0][2] != 1234 then
return -1
endi
if $data[0][3] != 101 then
return -1
endi
if $data[1][1] != 1 then
return -1
endi
if $data[1][2] != 12345 then
return -1
endi
if $data[1][3] != 101 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
......@@ -49,10 +49,9 @@ if $data00 != $totalNum then
return -1
endi
sleep 1000
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 1000
system sh/exec.sh -n dnode1 -s start
sql connect
sql use $db
sql show vgroups
......
......@@ -93,9 +93,6 @@ $i = 2
$tb = $tbPrefix . $i
sql insert into $tb values (now + 1m , 1 )
print sleep 2000
sleep 2000
print =============== step6
# sql select * from $mt
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册