未验证 提交 d67cadba 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #14919 from taosdata/fix/dnode

test: restore some 2.0 case
......@@ -19,15 +19,12 @@
./test.sh -f tsim/db/basic6.sim
# nojira ./test.sh -f tsim/db/commit.sim
./test.sh -f tsim/db/create_all_options.sim
#./test.sh -f tsim/db/delete_part.sim
#./test.sh -f tsim/db/delete_reuse1.sim
#./test.sh -f tsim/db/delete_reuse2.sim
#./test.sh -f tsim/db/delete_reusevnode.sim
#./test.sh -f tsim/db/delete_reusevnode2.sim
#./test.sh -f tsim/db/delete_writing1.sim
#./test.sh -f tsim/db/delete_writing2.sim
#./test.sh -f tsim/db/delete.sim
#./test.sh -f tsim/db/delete2.sim
./test.sh -f tsim/db/delete_reuse1.sim
./test.sh -f tsim/db/delete_reuse2.sim
./test.sh -f tsim/db/delete_reusevnode.sim
./test.sh -f tsim/db/delete_reusevnode2.sim
./test.sh -f tsim/db/delete_writing1.sim
./test.sh -f tsim/db/delete_writing2.sim
# unsupport ./test.sh -f tsim/db/dropdnodes.sim
./test.sh -f tsim/db/error1.sim
# nojira ./test.sh -f tsim/db/keep.sim
......@@ -81,7 +78,7 @@
./test.sh -f tsim/insert/query_block2_memory.sim
./test.sh -f tsim/insert/query_file_memory.sim
./test.sh -f tsim/insert/query_multi_file.sim
#./test.sh -f tsim/insert/tcp.sim
./test.sh -f tsim/insert/tcp.sim
./test.sh -f tsim/insert/update0.sim
# ---- parser
......
......@@ -2,7 +2,7 @@ sql connect
$x = 1
begin:
sql reset query cache
sleep 1000
sleep 100
sql insert into db.tb values(now, $x ) -x begin
#print ===> insert successed $x
$x = $x + 1
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
sql connect
print =============== create database d1
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
sql connect
print =============== create database d1
......
......@@ -5,63 +5,34 @@ system sh/deploy.sh -n dnode3 -i 3
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
sql connect
sql create dnode $hostname port 7200
sql create dnode $hostname port 7300
$loop_cnt = 0
check_dnode_ready_1:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> rows: $rows
print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data10 $data11 $data12 $data13 $data14 $data15
print ===> $data20 $data21 $data22 $data23 $data24 $data25
if $data00 != 1 then
print ===> $data30 $data31 $data32 $data33 $data34 $data35
if $rows != 3 then
return -1
endi
system_content printf %OS%
if $system_content == Windows_NT then
system_content printf %COMPUTERNAME%:7100
if $data01 != $system_content then
return -1
endi
else
if $data01 != localhost:7100 then
return -1
endi
endi
if $data04 != ready then
goto check_dnode_ready_1
if $data(1)[4] != ready then
goto step1
endi
if $data14 != ready then
goto check_dnode_ready_1
if $data(2)[4] != ready then
goto step1
endi
if $data24 != ready then
goto check_dnode_ready_1
if $data(3)[4] != ready then
goto step1
endi
print ============= create database with all options
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/cfg.sh -n dnode1 -c wallevel -v 2
system sh/cfg.sh -n dnode2 -c wallevel -v 2
system sh/cfg.sh -n dnode3 -c wallevel -v 2
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode3 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode1 -c maxVgroupsPerDb -v 2
system sh/cfg.sh -n dnode2 -c maxVgroupsPerDb -v 2
system sh/cfg.sh -n dnode3 -c maxVgroupsPerDb -v 2
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 1000
system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 1000
system sh/cfg.sh -n dnode3 -c maxTablesPerVnode -v 1000
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sql connect
sql create dnode $hostname2
sql create dnode $hostname3
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
sleep 2000
print ======== step1
sql create database db replica 3 blocks 3
sql create table db.mt (ts timestamp, tbcol int) TAGS(tgcol int)
$tbPrefix = db.t
$i = 0
while $i < 2000
$tb = $tbPrefix . $i
sql create table $tb using db.mt tags( $i )
$i = $i + 1
endw
sql show db.vgroups
if $rows != 2 then
return -1
endi
print ======== step2
sql drop database db
sql show databases
if $rows != 0 then
return -1
endi
sleep 2000
sql show dnodes
print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data2_3
if $data2_1 != 0 then
return -1
endi
if $data2_2 != 0 then
return -1
endi
if $data2_3 != 0 then
return -1
endi
print ======== step3
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
$x = 0
step3:
$x = $x + 1
sleep 2000
if $x == 10 then
return -1
endi
sql show mnodes
print dnode1 role $data2_1
if $data2_1 != master then
goto step3
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
system sh/exec.sh -n dnode5 -s stop -x SIGINT
system sh/exec.sh -n dnode6 -s stop -x SIGINT
system sh/exec.sh -n dnode7 -s stop -x SIGINT
system sh/exec.sh -n dnode8 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c wallevel -v 2
system sh/cfg.sh -n dnode1 -c maxVgroupsPerDb -v 10
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 1000
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
print ======== step1
sql create database db blocks 3
sql create table db.mt (ts timestamp, tbcol int) TAGS(tgcol int)
$tbPrefix = db.t
$i = 0
while $i < 2000
$tb = $tbPrefix . $i
sql create table $tb using db.mt tags( $i )
$i = $i + 1
endw
sql show db.vgroups
if $rows != 10 then
return -1
endi
return
print ======== step2
sleep 1000
sql drop database db
sql show databases
if $rows != 0 then
return -1
endi
sleep 1000
sql show dnodes
print dnode1 openVnodes $data2_1
if $data2_1 != 0 then
return -1
endi
print ======= step3
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 3000
system sh/exec.sh -n dnode1 -s start
$x = 0
step3:
$x = $x + 1
sleep 2000
if $x == 30 then
return -1
endi
sql show mnodes
print dnode1 role $data2_1
if $data2_1 != master then
goto step3
endi
sleep 1000
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode4 -i 4
system sh/cfg.sh -n dnode1 -c wallevel -v 2
system sh/cfg.sh -n dnode2 -c wallevel -v 2
system sh/cfg.sh -n dnode3 -c wallevel -v 2
system sh/cfg.sh -n dnode4 -c wallevel -v 2
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode3 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode4 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode1 -c mnodeEqualVnodeNum -v 0
system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 0
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 0
system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 0
system sh/cfg.sh -n dnode1 -c maxVgroupsPerDb -v 8
system sh/cfg.sh -n dnode2 -c maxVgroupsPerDb -v 8
system sh/cfg.sh -n dnode3 -c maxVgroupsPerDb -v 8
system sh/cfg.sh -n dnode4 -c maxVgroupsPerDb -v 8
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 4
system sh/cfg.sh -n dnode3 -c maxTablesPerVnode -v 4
system sh/cfg.sh -n dnode4 -c maxTablesPerVnode -v 4
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sql connect
sql create dnode $hostname2
system sh/exec.sh -n dnode2 -s start
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 $data4_1
print dnode2 $data4_2
if $data4_1 != ready then
goto step1
endi
if $data4_2 != ready then
goto step1
endi
$loop = 0
begin:
$db = db . $loop
print ======== step1 $loop
sql create database $db
sql use $db
sql create table t11 (ts timestamp, i int)
sql insert into t11 values(now, 1 )
sql create table t12 (ts timestamp, i int)
sql insert into t12 values(now, 1 )
sql create table t13 (ts timestamp, i int)
sql insert into t13 values(now, 1 )
sql create table t14 (ts timestamp, i int)
sql insert into t14 values(now, 1 )
sql create table t21 (ts timestamp, i int)
sql insert into t21 values(now, 1 )
sql create table t22 (ts timestamp, i int)
sql insert into t22 values(now, 1 )
sql create table t23 (ts timestamp, i int)
sql insert into t23 values(now, 1 )
sql create table t24 (ts timestamp, i int)
sql insert into t24 values(now, 1 )
sql create table t31 (ts timestamp, i int)
sql insert into t31 values(now, 1 )
sql create table t32 (ts timestamp, i int)
sql insert into t32 values(now, 1 )
sql create table t33 (ts timestamp, i int)
sql insert into t33 values(now, 1 )
sql create table t34 (ts timestamp, i int)
sql insert into t34 values(now, 1 )
sql create table t41 (ts timestamp, i int)
sql insert into t41 values(now, 1 )
sql create table t42 (ts timestamp, i int)
sql insert into t42 values(now, 1 )
sql create table t43 (ts timestamp, i int)
sql insert into t43 values(now, 1 )
sql create table t44 (ts timestamp, i int)
sql insert into t44 values(now, 1 )
sql create table t51 (ts timestamp, i int)
sql insert into t51 values(now, 1 )
sql create table t52 (ts timestamp, i int)
sql insert into t52 values(now, 1 )
sql create table t53 (ts timestamp, i int)
sql insert into t53 values(now, 1 )
sql create table t54 (ts timestamp, i int)
sql insert into t54 values(now, 1 )
sql create table t61 (ts timestamp, i int)
sql insert into t61 values(now, 1 )
sql create table t62 (ts timestamp, i int)
sql insert into t62 values(now, 1 )
sql create table t63 (ts timestamp, i int)
sql insert into t63 values(now, 1 )
sql create table t64 (ts timestamp, i int)
sql insert into t64 values(now, 1 )
sql create table t71 (ts timestamp, i int)
sql insert into t71 values(now, 1 )
sql create table t72 (ts timestamp, i int)
sql insert into t72 values(now, 1 )
sql create table t73 (ts timestamp, i int)
sql insert into t73 values(now, 1 )
sql create table t74 (ts timestamp, i int)
sql insert into t74 values(now, 1 )
sql create table t81 (ts timestamp, i int)
sql insert into t81 values(now, 1 )
sql create table t82 (ts timestamp, i int)
sql insert into t82 values(now, 1 )
sql create table t83 (ts timestamp, i int)
sql insert into t83 values(now, 1 )
sql create table t84 (ts timestamp, i int)
sql insert into t84 values(now, 1 )
sql show dnodes
print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data2_2
if $data2_1 != 4 then
return -1
endi
if $data2_2 != 4 then
return -1
endi
print ======== step2 $loop
system sh/exec.sh -n dnode2 -s stop
print ==> drop database $db
sql drop database $db
print ======== step3 $loop
sleep 2000
system sh/exec.sh -n dnode2 -s start
$x = 0
step3:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes -x step3
print dnode1 openVnodes $data2_1 $data4_1
print dnode2 openVnodes $data2_2 $data4_2
if $data2_1 != 0 then
goto step3
endi
if $data2_2 != 0 then
goto step3
endi
if $data4_1 != ready then
goto step3
endi
if $data4_2 != ready then
goto step3
endi
print ===> test times : $loop
if $loop > 3 then
return 0
endi
$loop = $loop + 1
sql reset query cache
sleep 100
goto begin
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
system sh/exec.sh -n dnode5 -s stop -x SIGINT
system sh/exec.sh -n dnode6 -s stop -x SIGINT
system sh/exec.sh -n dnode7 -s stop -x SIGINT
system sh/exec.sh -n dnode8 -s stop -x SIGINT
\ No newline at end of file
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode4 -i 4
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/cfg.sh -n dnode2 -c walLevel -v 1
system sh/cfg.sh -n dnode3 -c walLevel -v 1
system sh/cfg.sh -n dnode4 -c walLevel -v 1
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode3 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode4 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode1 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 4
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
print ======== step1
sql create database d1 replica 1
sql create database d2 replica 1
sql create database d3 replica 1
sql create database d4 replica 1
sql create database d1 replica 1 vgroups 1
sql create database d2 replica 1 vgroups 1
sql create database d3 replica 1 vgroups 1
sql create database d4 replica 1 vgroups 1
sql create table d1.t1 (ts timestamp, i int)
sql create table d2.t2 (ts timestamp, i int)
......@@ -63,14 +41,14 @@ endi
print ======== step2
sql drop database d1
sleep 1000
sql insert into d1.t1 values(now, 2) -x step2
return -1
step2:
print ========= step3
sql reset query cache
sleep 1000
sleep 50
sql create database d1 replica 1
sql create table d1.t1 (ts timestamp, i int)
sql insert into d1.t1 values(now, 2)
......@@ -84,14 +62,13 @@ $x = 0
while $x < 20
sql drop database d1
sleep 1000
sql insert into d1.t1 values(now, -1) -x step4
return -1
step4:
sql create database d1 replica 1
sql reset query cache
sleep 1000
sleep 50
sql create table d1.t1 (ts timestamp, i int)
sql insert into d1.t1 values(now, $x )
sql select * from d1.t1
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode4 -i 4
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/cfg.sh -n dnode2 -c walLevel -v 1
system sh/cfg.sh -n dnode3 -c walLevel -v 1
system sh/cfg.sh -n dnode4 -c walLevel -v 1
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode3 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode4 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode1 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 4
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql reset query cache
print ======== step1
sql create database d1 replica 1
......@@ -65,7 +41,6 @@ endi
print ======== step2
sql drop database d1
sleep 500
sql insert into d1.t1 values(now, 2) -x step2
return -1
step2:
......@@ -73,7 +48,8 @@ step2:
print ========= step3
sql create database db1 replica 1
sql reset query cache
sleep 500
sleep 50
sql create table db1.tb1 (ts timestamp, i int)
sql insert into db1.tb1 values(now, 2)
sql select * from db1.tb1
......@@ -89,8 +65,7 @@ while $x < 20
$tb = tb . $x
sql use $db
sql drop database $db
sleep 500
sql insert into $tb values(now, -1) -x step4
return -1
step4:
......@@ -100,7 +75,7 @@ while $x < 20
$tb = tb . $x
sql reset query cache
sleep 500
sleep 50
sql create database $db replica 1
sql use $db
......
system sh/stop_dnodes.sh
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 4
system sh/deploy.sh -n dnode1 -i 1
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sql connect
......@@ -20,8 +16,6 @@ while $i < 30
sql create table $tb (ts timestamp, i int);
sql insert into $tb values(now, 1);
sleep 1000
sql drop database $db
print times $i
......@@ -30,9 +24,8 @@ while $i < 30
endw
print ======== step2
sleep 1000
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......@@ -73,7 +66,7 @@ while $i < 10
sql insert into $tb1 values(now, 1);
$tb1 = $tb . 5
sql create table $tb1 using st tags(1)
sql_error create table $tb1 using st tags(1)
sql insert into $tb1 values(now, 1);
$tb1 = $tb . 6
......@@ -88,7 +81,6 @@ while $i < 10
sql create table $tb1 using st tags(1)
sql insert into $tb1 values(now, 1);
sleep 1000
sql drop database $db
print times $i
......@@ -97,9 +89,8 @@ while $i < 10
endw
print ======== step2
sleep 1000
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 4
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
print ======== step1
......@@ -54,17 +50,15 @@ while $i < 10
sql drop table st
sleep 2000
print times $i
$i = $i + 1
endw
print ======== step2
sleep 1000
sql drop database db
sql show databases
if $rows != 0 then
if $rows != 2 then
return -1
endi
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode4 -i 4
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/cfg.sh -n dnode2 -c walLevel -v 1
system sh/cfg.sh -n dnode3 -c walLevel -v 1
system sh/cfg.sh -n dnode4 -c walLevel -v 1
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode3 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode4 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode1 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 4
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sql connect
......@@ -29,21 +8,19 @@ sql create table db.tb (ts timestamp, i int)
sql insert into db.tb values(now, 1)
print ======== start back
run_back general/db/back_insert.sim
run_back tsim/db/back_insert.sim
sleep 1000
print ======== step1
$x = 1
while $x < 20
while $x < 10
print drop database times $x
sql drop database db -x step1
step1:
sql drop database if exists db
sql create database db
sql create table db.tb (ts timestamp, i int)
sleep 2000
sleep 1000
$x = $x + 1
endw
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c wallevel -v 0
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql create database db
......@@ -25,7 +20,7 @@ sql create table db4.tb4 (ts timestamp, i int)
sql insert into db4.tb4 values(now, 1)
print ======== start back
run_back general/db/back_insert.sim
run_back tsim/db/back_insert.sim
sleep 1000
print ======== step1
......@@ -33,13 +28,12 @@ $x = 1
while $x < 10
print drop database times $x
sql drop database db -x step1
step1:
sql drop database if exists db
sql create database db
sql create table db.tb (ts timestamp, i int)
sleep 2000
sleep 1000
$x = $x + 1
endw
......
......@@ -16,10 +16,9 @@ endi
print =============== restart
system sh/exec.sh -n dnode1 -s stop -x SIGKILL
sleep 2000
sleep 200
system rm -rf ../../sim/dnode1/log
system sh/exec.sh -n dnode1 -s start
sleep 2000
print =============== show databases
sql create database d2 vgroups 6
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sleep 50
sql connect
print =============== create database
......@@ -99,23 +98,6 @@ endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
print =============== step3-2 query records of ct1 from file
sql select * from ct1;
print $data00 $data01
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册