scripts
This commit is contained in:
parent
ff9bdcfdb0
commit
5b459cf8fe
|
@ -149,16 +149,17 @@ sql drop table tb1
|
|||
#### auto create multiple tables
|
||||
sql insert into tb1 using $stb tags(1) values ( $ts0 , 1, 1, 1, 1, 'bin1', 1, 1, 1, '涛思数据1') tb2 using $stb tags(2) values ( $ts0 , 2, 2, 2, 2, 'bin2', 2, 2, 2, '涛思数据2') tb3 using $stb tags(3) values ( $ts0 , 3, 3, 3, 3, 'bin3', 3, 3, 3, '涛思数据3')
|
||||
sql show tables
|
||||
print $rows $data00 $data10 $data20
|
||||
if $rows != 3 then
|
||||
return -1
|
||||
endi
|
||||
if $data00 != tb1 then
|
||||
if $data00 != tb3 then
|
||||
return -1
|
||||
endi
|
||||
if $data10 != tb2 then
|
||||
return -1
|
||||
endi
|
||||
if $data20 != tb3 then
|
||||
if $data20 != tb1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -220,13 +221,13 @@ sql show tables
|
|||
if $rows != 3 then
|
||||
return -1
|
||||
endi
|
||||
if $data00 != tb1 then
|
||||
if $data00 != tb3 then
|
||||
return -1
|
||||
endi
|
||||
if $data10 != tb2 then
|
||||
return -1
|
||||
endi
|
||||
if $data20 != tb3 then
|
||||
if $data20 != tb1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ system sh/cfg.sh -n dnode2 -c numOfMPeers -v 2
|
|||
system sh/cfg.sh -n dnode3 -c numOfMPeers -v 2
|
||||
|
||||
print ============== step1
|
||||
system sh/exec_up.sh -n dnode1 -s start -t
|
||||
system sh/exec_up.sh -n dnode1 -s start
|
||||
sleep 3000
|
||||
sql connect
|
||||
|
||||
|
@ -20,7 +20,7 @@ if $data2_1 != master then
|
|||
endi
|
||||
|
||||
print ============== step2
|
||||
system sh/exec_up.sh -n dnode2 -s start -t
|
||||
system sh/exec_up.sh -n dnode2 -s start
|
||||
sql create dnode $hostname2
|
||||
|
||||
$x = 0
|
||||
|
@ -41,17 +41,6 @@ if $data2_2 != slave then
|
|||
goto show2
|
||||
endi
|
||||
|
||||
system sh/exec_up.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
|
||||
system sh/exec_up.sh -n dnode3 -s stop -x SIGINT
|
||||
system sh/exec_up.sh -n dnode4 -s stop -x SIGINT
|
||||
system sh/exec_up.sh -n dnode5 -s stop -x SIGINT
|
||||
system sh/exec_up.sh -n dnode6 -s stop -x SIGINT
|
||||
system sh/exec_up.sh -n dnode7 -s stop -x SIGINT
|
||||
system sh/exec_up.sh -n dnode8 -s stop -x SIGINT
|
||||
|
||||
return
|
||||
|
||||
print ============== step3
|
||||
sql_error drop dnode $hostname1 -x error1
|
||||
print should not drop master
|
||||
|
|
Loading…
Reference in New Issue