Merge pull request #13251 from taosdata/fix/tsim
test: cases for alter db
This commit is contained in:
commit
027c2fa1a2
|
@ -252,6 +252,7 @@ endi
|
||||||
|
|
||||||
print ======== step8
|
print ======== step8
|
||||||
sql alter table tb add column h binary(10)
|
sql alter table tb add column h binary(10)
|
||||||
|
sql select * from tb
|
||||||
sql describe tb
|
sql describe tb
|
||||||
if $data00 != ts then
|
if $data00 != ts then
|
||||||
return -1
|
return -1
|
||||||
|
@ -304,7 +305,7 @@ endi
|
||||||
if $data80 != h then
|
if $data80 != h then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data81 != BINARY then
|
if $data81 != VARCHAR then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data82 != 10 then
|
if $data82 != 10 then
|
||||||
|
@ -371,7 +372,7 @@ endi
|
||||||
if $data80 != h then
|
if $data80 != h then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data81 != BINARY then
|
if $data81 != VARCHAR then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data82 != 10 then
|
if $data82 != 10 then
|
||||||
|
@ -447,7 +448,7 @@ endi
|
||||||
if $data70 != h then
|
if $data70 != h then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data71 != BINARY then
|
if $data71 != VARCHAR then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data72 != 10 then
|
if $data72 != 10 then
|
||||||
|
@ -496,7 +497,7 @@ endi
|
||||||
if $data60 != h then
|
if $data60 != h then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data61 != BINARY then
|
if $data61 != VARCHAR then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data62 != 10 then
|
if $data62 != 10 then
|
||||||
|
@ -539,7 +540,7 @@ endi
|
||||||
if $data50 != h then
|
if $data50 != h then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data51 != BINARY then
|
if $data51 != VARCHAR then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data52 != 10 then
|
if $data52 != 10 then
|
||||||
|
@ -576,7 +577,7 @@ endi
|
||||||
if $data40 != h then
|
if $data40 != h then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data41 != BINARY then
|
if $data41 != VARCHAR then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data42 != 10 then
|
if $data42 != 10 then
|
||||||
|
@ -607,7 +608,7 @@ endi
|
||||||
if $data30 != h then
|
if $data30 != h then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data31 != BINARY then
|
if $data31 != VARCHAR then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data32 != 10 then
|
if $data32 != 10 then
|
||||||
|
@ -632,7 +633,7 @@ endi
|
||||||
if $data20 != h then
|
if $data20 != h then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data21 != BINARY then
|
if $data21 != VARCHAR then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data22 != 10 then
|
if $data22 != 10 then
|
||||||
|
|
|
@ -104,6 +104,10 @@
|
||||||
./test.sh -f tsim/stable/tag_modify.sim
|
./test.sh -f tsim/stable/tag_modify.sim
|
||||||
./test.sh -f tsim/stable/tag_rename.sim
|
./test.sh -f tsim/stable/tag_rename.sim
|
||||||
./test.sh -f tsim/stable/alter_comment.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
|
# --- for multi process mode
|
||||||
./test.sh -f tsim/user/basic1.sim -m
|
./test.sh -f tsim/user/basic1.sim -m
|
||||||
|
|
|
@ -29,14 +29,14 @@ if $data00 != 3 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print ========= step3
|
print ========= step3
|
||||||
sql import into tb values(now-23d, -23, 0)
|
sql insert into tb values(now-23d, -23, 0)
|
||||||
sql import into tb values(now-21d, -21, 0)
|
sql insert into tb values(now-21d, -21, 0)
|
||||||
sql select count(b) from tb
|
sql select count(b) from tb
|
||||||
if $data00 != 5 then
|
if $data00 != 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
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
|
sql select count(b) from tb
|
||||||
if $data00 != 6 then
|
if $data00 != 6 then
|
||||||
return -1
|
return -1
|
|
@ -347,7 +347,7 @@ endi
|
||||||
if $data80 != h then
|
if $data80 != h then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data81 != BINARY then
|
if $data81 != VARCHAR then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data82 != 10 then
|
if $data82 != 10 then
|
||||||
|
@ -363,9 +363,8 @@ endi
|
||||||
print ======== step9
|
print ======== step9
|
||||||
print ======== step10
|
print ======== step10
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
sleep 3000
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
sleep 3000
|
sql connect
|
||||||
|
|
||||||
sql use d2
|
sql use d2
|
||||||
sql describe tb
|
sql describe tb
|
||||||
|
@ -420,7 +419,7 @@ endi
|
||||||
if $data80 != h then
|
if $data80 != h then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data81 != BINARY then
|
if $data81 != VARCHAR then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data82 != 10 then
|
if $data82 != 10 then
|
||||||
|
@ -502,7 +501,7 @@ endi
|
||||||
if $data70 != h then
|
if $data70 != h then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data71 != BINARY then
|
if $data71 != VARCHAR then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data72 != 10 then
|
if $data72 != 10 then
|
||||||
|
@ -557,7 +556,7 @@ endi
|
||||||
if $data60 != h then
|
if $data60 != h then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data61 != BINARY then
|
if $data61 != VARCHAR then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data62 != 10 then
|
if $data62 != 10 then
|
||||||
|
@ -606,7 +605,7 @@ endi
|
||||||
if $data50 != h then
|
if $data50 != h then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data51 != BINARY then
|
if $data51 != VARCHAR then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data52 != 10 then
|
if $data52 != 10 then
|
||||||
|
@ -649,7 +648,7 @@ endi
|
||||||
if $data40 != h then
|
if $data40 != h then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data41 != BINARY then
|
if $data41 != VARCHAR then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data42 != 10 then
|
if $data42 != 10 then
|
||||||
|
@ -686,7 +685,7 @@ endi
|
||||||
if $data30 != h then
|
if $data30 != h then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data31 != BINARY then
|
if $data31 != VARCHAR then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data32 != 10 then
|
if $data32 != 10 then
|
||||||
|
@ -717,7 +716,7 @@ endi
|
||||||
if $data20 != h then
|
if $data20 != h then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data21 != BINARY then
|
if $data21 != VARCHAR then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data22 != 10 then
|
if $data22 != 10 then
|
||||||
|
@ -758,7 +757,7 @@ endi
|
||||||
print ======= over
|
print ======= over
|
||||||
sql drop database d2
|
sql drop database d2
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -79,28 +79,31 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sql connect
|
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
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
#if $data[0][1] != 1 then
|
if $data[0][1] != 1 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data[0][2] != 1234 then
|
if $data[0][2] != 1234 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data[0][3] != 101 then
|
if $data[0][3] != 101 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data[1][1] != 1 then
|
if $data[1][1] != 1 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data[1][2] != 12345 then
|
if $data[1][2] != 12345 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data[1][3] != 101 then
|
if $data[1][3] != 101 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
|
@ -49,10 +49,9 @@ if $data00 != $totalNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sleep 1000
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
sleep 1000
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
sql connect
|
||||||
|
|
||||||
sql use $db
|
sql use $db
|
||||||
sql show vgroups
|
sql show vgroups
|
||||||
|
|
|
@ -93,9 +93,6 @@ $i = 2
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql insert into $tb values (now + 1m , 1 )
|
sql insert into $tb values (now + 1m , 1 )
|
||||||
|
|
||||||
print sleep 2000
|
|
||||||
sleep 2000
|
|
||||||
|
|
||||||
print =============== step6
|
print =============== step6
|
||||||
|
|
||||||
# sql select * from $mt
|
# sql select * from $mt
|
||||||
|
|
Loading…
Reference in New Issue