提交 d9d892bf 编写于 作者: X Xiaoyu Wang

enh: show command optimize

上级 44df51f9
...@@ -47,7 +47,7 @@ class TDTestCase: ...@@ -47,7 +47,7 @@ class TDTestCase:
time.sleep(1) time.sleep(1)
ret = tdSql.query('show mnodes') ret = tdSql.query('select * from information_schema.ins_mnodes')
tdSql.checkRows(1) tdSql.checkRows(1)
tdSql.checkData(0, 2, "master") tdSql.checkData(0, 2, "master")
......
...@@ -94,7 +94,7 @@ print ============== step3: stop dnode2 ...@@ -94,7 +94,7 @@ print ============== step3: stop dnode2
system sh/exec.sh -n dnode2 -s stop system sh/exec.sh -n dnode2 -s stop
sleep 2000 sleep 2000
sql show mnodes sql select * from information_schema.ins_mnodes
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3
......
...@@ -203,7 +203,7 @@ $cnt = $cnt + 1 ...@@ -203,7 +203,7 @@ $cnt = $cnt + 1
if $cnt == 10 then if $cnt == 10 then
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
if $rows != 2 then if $rows != 2 then
sleep 2000 sleep 2000
goto wait_dnode2_master goto wait_dnode2_master
......
...@@ -121,8 +121,8 @@ sleep 10000 ...@@ -121,8 +121,8 @@ sleep 10000
#system rm -rf ../../../sim/dnode1/data #system rm -rf ../../../sim/dnode1/data
#sleep 20000 #sleep 20000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -137,8 +137,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 ...@@ -137,8 +137,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9
print ============== step6-1: restart dnode1 print ============== step6-1: restart dnode1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 10000 sleep 10000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -154,8 +154,8 @@ print ============== step7: stop dnode2 ...@@ -154,8 +154,8 @@ print ============== step7: stop dnode2
system sh/exec.sh -n dnode2 -s stop -x SIGINT system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 3000 sleep 3000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -170,8 +170,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 ...@@ -170,8 +170,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9
print ============== step8: restart dnode2, then wait sync end print ============== step8: restart dnode2, then wait sync end
system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode2 -s start
sleep 20000 sleep 20000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -186,8 +186,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 ...@@ -186,8 +186,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9
print ============== step9: stop dnode3, then wait sync end print ============== step9: stop dnode3, then wait sync end
system sh/exec.sh -n dnode3 -s stop -x SIGINT system sh/exec.sh -n dnode3 -s stop -x SIGINT
sleep 20000 sleep 20000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -202,8 +202,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 ...@@ -202,8 +202,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9
print ============== step10: restart dnode3, then wait sync end print ============== step10: restart dnode3, then wait sync end
system sh/exec.sh -n dnode3 -s start system sh/exec.sh -n dnode3 -s start
sleep 20000 sleep 20000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -222,8 +222,8 @@ sleep 20000 ...@@ -222,8 +222,8 @@ sleep 20000
print ============== step12: restart dnode4, then wait sync end print ============== step12: restart dnode4, then wait sync end
system sh/exec.sh -n dnode4 -s start system sh/exec.sh -n dnode4 -s start
sleep 20000 sleep 20000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
......
...@@ -124,8 +124,8 @@ print ============== step6-1: restart dnode1 ...@@ -124,8 +124,8 @@ print ============== step6-1: restart dnode1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 10000 sleep 10000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -141,8 +141,8 @@ print ============== step7: stop dnode2 ...@@ -141,8 +141,8 @@ print ============== step7: stop dnode2
system sh/exec.sh -n dnode2 -s stop -x SIGINT system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 3000 sleep 3000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -157,8 +157,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 ...@@ -157,8 +157,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9
print ============== step8: restart dnode2, then wait sync end print ============== step8: restart dnode2, then wait sync end
system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode2 -s start
sleep 20000 sleep 20000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -173,8 +173,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 ...@@ -173,8 +173,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9
print ============== step9: stop dnode3, then wait sync end print ============== step9: stop dnode3, then wait sync end
system sh/exec.sh -n dnode3 -s stop -x SIGINT system sh/exec.sh -n dnode3 -s stop -x SIGINT
sleep 20000 sleep 20000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -189,8 +189,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 ...@@ -189,8 +189,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9
print ============== step10: restart dnode3, then wait sync end print ============== step10: restart dnode3, then wait sync end
system sh/exec.sh -n dnode3 -s start system sh/exec.sh -n dnode3 -s start
sleep 20000 sleep 20000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -209,8 +209,8 @@ sleep 20000 ...@@ -209,8 +209,8 @@ sleep 20000
print ============== step12: restart dnode4, then wait sync end print ============== step12: restart dnode4, then wait sync end
system sh/exec.sh -n dnode4 -s start system sh/exec.sh -n dnode4 -s start
sleep 20000 sleep 20000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
......
...@@ -123,8 +123,8 @@ print ============== step6-1: restart dnode1 ...@@ -123,8 +123,8 @@ print ============== step6-1: restart dnode1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 10000 sleep 10000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -140,8 +140,8 @@ print ============== step7: stop dnode2 ...@@ -140,8 +140,8 @@ print ============== step7: stop dnode2
system sh/exec.sh -n dnode2 -s stop -x SIGINT system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 3000 sleep 3000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -156,8 +156,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 ...@@ -156,8 +156,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9
print ============== step8: restart dnode2, then wait sync end print ============== step8: restart dnode2, then wait sync end
system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode2 -s start
sleep 20000 sleep 20000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -172,8 +172,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 ...@@ -172,8 +172,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9
print ============== step9: stop dnode3, then wait sync end print ============== step9: stop dnode3, then wait sync end
system sh/exec.sh -n dnode3 -s stop -x SIGINT system sh/exec.sh -n dnode3 -s stop -x SIGINT
sleep 20000 sleep 20000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -188,8 +188,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 ...@@ -188,8 +188,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9
print ============== step10: restart dnode3, then wait sync end print ============== step10: restart dnode3, then wait sync end
system sh/exec.sh -n dnode3 -s start system sh/exec.sh -n dnode3 -s start
sleep 20000 sleep 20000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -208,8 +208,8 @@ sleep 20000 ...@@ -208,8 +208,8 @@ sleep 20000
#print ============== step12: restart dnode4, then wait sync end #print ============== step12: restart dnode4, then wait sync end
#system sh/exec.sh -n dnode4 -s start #system sh/exec.sh -n dnode4 -s start
#sleep 20000 #sleep 20000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
......
...@@ -127,8 +127,8 @@ print ============== step6-1: restart dnode1 ...@@ -127,8 +127,8 @@ print ============== step6-1: restart dnode1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 10000 sleep 10000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -144,8 +144,8 @@ print ============== step7: stop dnode2 ...@@ -144,8 +144,8 @@ print ============== step7: stop dnode2
system sh/exec.sh -n dnode2 -s stop -x SIGINT system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 3000 sleep 3000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -160,8 +160,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 ...@@ -160,8 +160,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9
print ============== step8: restart dnode2, then wait sync end print ============== step8: restart dnode2, then wait sync end
system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode2 -s start
sleep 20000 sleep 20000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -176,8 +176,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 ...@@ -176,8 +176,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9
print ============== step9: stop dnode3, then wait sync end print ============== step9: stop dnode3, then wait sync end
system sh/exec.sh -n dnode3 -s stop -x SIGINT system sh/exec.sh -n dnode3 -s stop -x SIGINT
sleep 20000 sleep 20000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -192,8 +192,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 ...@@ -192,8 +192,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9
print ============== step10: restart dnode3, then wait sync end print ============== step10: restart dnode3, then wait sync end
system sh/exec.sh -n dnode3 -s start system sh/exec.sh -n dnode3 -s start
sleep 20000 sleep 20000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...@@ -212,8 +212,8 @@ sleep 20000 ...@@ -212,8 +212,8 @@ sleep 20000
#print ============== step12: restart dnode4, then wait sync end #print ============== step12: restart dnode4, then wait sync end
#system sh/exec.sh -n dnode4 -s start #system sh/exec.sh -n dnode4 -s start
#sleep 20000 #sleep 20000
sql show mnodes sql select * from information_schema.ins_mnodes
print show mnodes print select * from information_schema.ins_mnodes
print rows: $rows print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# 5 | 718 | ready | 2 | 3 | master | 2 | slave | # 5 | 718 | ready | 2 | 3 | master | 2 | slave |
#Query OK, 4 row(s) in set (0.002749s) #Query OK, 4 row(s) in set (0.002749s)
# #
#taos> show mnodes #taos> select * from information_schema.ins_mnodes
# -> ; # -> ;
# id | end_point | role | create_time | # id | end_point | role | create_time |
#===================================================================================== #=====================================================================================
......
...@@ -15,7 +15,7 @@ if $data00 != 1 then ...@@ -15,7 +15,7 @@ if $data00 != 1 then
return -1 return -1
endi endi
sql show mnodes; sql select * from information_schema.ins_mnodes;
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
...@@ -62,7 +62,7 @@ if $data14 != ready then ...@@ -62,7 +62,7 @@ if $data14 != ready then
return -1 return -1
endi endi
sql show mnodes; sql select * from information_schema.ins_mnodes;
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
......
...@@ -17,7 +17,7 @@ if $data00 != 1 then ...@@ -17,7 +17,7 @@ if $data00 != 1 then
endi endi
sql show mnodes; sql select * from information_schema.ins_mnodes;
print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
if $rows != 1 then if $rows != 1 then
return -1 return -1
...@@ -65,7 +65,7 @@ if $data14 != ready then ...@@ -65,7 +65,7 @@ if $data14 != ready then
return -1 return -1
endi endi
sql show mnodes; sql select * from information_schema.ins_mnodes;
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
......
...@@ -59,7 +59,7 @@ step3: ...@@ -59,7 +59,7 @@ step3:
if $x == 10 then if $x == 10 then
return -1 return -1
endi endi
sql show mnodes -x step3 sql select * from information_schema.ins_mnodes -x step3
print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4]
print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4]
if $data(1)[2] != leader then if $data(1)[2] != leader then
...@@ -84,8 +84,8 @@ if $data00 != 1 then ...@@ -84,8 +84,8 @@ if $data00 != 1 then
return -1 return -1
endi endi
print show mnodes; print select * from information_schema.ins_mnodes;
sql show mnodes sql select * from information_schema.ins_mnodes
print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4]
print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4]
if $rows != 1 then if $rows != 1 then
......
...@@ -115,7 +115,7 @@ step4: ...@@ -115,7 +115,7 @@ step4:
print ====> dnode not online! print ====> dnode not online!
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data10 $data11 $data12 $data13 $data14 $data15
if $rows != 2 then if $rows != 2 then
......
...@@ -6,7 +6,7 @@ system sh/exec.sh -n dnode2 -s start ...@@ -6,7 +6,7 @@ system sh/exec.sh -n dnode2 -s start
sql connect sql connect
print =============== select * from information_schema.ins_dnodes print =============== select * from information_schema.ins_dnodes
sql show mnodes; sql select * from information_schema.ins_mnodes;
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
...@@ -49,7 +49,7 @@ step2: ...@@ -49,7 +49,7 @@ step2:
if $x == 20 then if $x == 20 then
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
print $data(1)[0] $data(1)[1] $data(1)[2] print $data(1)[0] $data(1)[1] $data(1)[2]
print $data(2)[0] $data(2)[1] $data(2)[2] print $data(2)[0] $data(2)[1] $data(2)[2]
...@@ -72,7 +72,7 @@ endi ...@@ -72,7 +72,7 @@ endi
sleep 2000 sleep 2000
print ============ drop mnode 2 print ============ drop mnode 2
sql drop mnode on dnode 2 sql drop mnode on dnode 2
sql show mnodes sql select * from information_schema.ins_mnodes
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
...@@ -85,7 +85,7 @@ step2: ...@@ -85,7 +85,7 @@ step2:
if $x == 20 then if $x == 20 then
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
print $data(1)[0] $data(1)[1] $data(1)[2] print $data(1)[0] $data(1)[1] $data(1)[2]
print $data(2)[0] $data(2)[1] $data(2)[2] print $data(2)[0] $data(2)[1] $data(2)[2]
...@@ -109,7 +109,7 @@ sleep 2000 ...@@ -109,7 +109,7 @@ sleep 2000
print =============== create mnodes print =============== create mnodes
sql create mnode on dnode 2 sql create mnode on dnode 2
sql show mnodes sql select * from information_schema.ins_mnodes
if $rows != 2 then if $rows != 2 then
return -1 return -1
endi endi
...@@ -121,7 +121,7 @@ step3: ...@@ -121,7 +121,7 @@ step3:
if $x == 20 then if $x == 20 then
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
print $data(1)[0] $data(1)[1] $data(1)[2] print $data(1)[0] $data(1)[1] $data(1)[2]
print $data(2)[0] $data(2)[1] $data(2)[2] print $data(2)[0] $data(2)[1] $data(2)[2]
......
...@@ -6,7 +6,7 @@ system sh/exec.sh -n dnode2 -s start ...@@ -6,7 +6,7 @@ system sh/exec.sh -n dnode2 -s start
sql connect sql connect
print =============== select * from information_schema.ins_dnodes print =============== select * from information_schema.ins_dnodes
sql show mnodes; sql select * from information_schema.ins_mnodes;
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
...@@ -46,7 +46,7 @@ step2: ...@@ -46,7 +46,7 @@ step2:
if $x == 20 then if $x == 20 then
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
print $data(1)[0] $data(1)[1] $data(1)[2] print $data(1)[0] $data(1)[1] $data(1)[2]
print $data(2)[0] $data(2)[1] $data(2)[2] print $data(2)[0] $data(2)[1] $data(2)[2]
...@@ -88,7 +88,7 @@ system sh/exec.sh -n dnode1 -s start ...@@ -88,7 +88,7 @@ system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode2 -s start
sql connect sql connect
sql show mnodes sql select * from information_schema.ins_mnodes
if $rows != 2 then if $rows != 2 then
return -1 return -1
endi endi
......
...@@ -49,7 +49,7 @@ step2: ...@@ -49,7 +49,7 @@ step2:
if $x == 10 then if $x == 10 then
return -1 return -1
endi endi
sql show mnodes -x step2 sql select * from information_schema.ins_mnodes -x step2
print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data10 $data11 $data12 $data13 $data14 $data15
...@@ -87,7 +87,7 @@ step4: ...@@ -87,7 +87,7 @@ step4:
if $x == 10 then if $x == 10 then
return -1 return -1
endi endi
sql show mnodes -x step4 sql select * from information_schema.ins_mnodes -x step4
print $data(1)[0] $data(1)[1] $data(1)[2] print $data(1)[0] $data(1)[1] $data(1)[2]
print $data(2)[0] $data(2)[1] $data(2)[2] print $data(2)[0] $data(2)[1] $data(2)[2]
print $data(3)[0] $data(3)[1] $data(3)[2] print $data(3)[0] $data(3)[1] $data(3)[2]
...@@ -126,7 +126,7 @@ step5: ...@@ -126,7 +126,7 @@ step5:
if $x == 10 then if $x == 10 then
return -1 return -1
endi endi
sql show mnodes -x step5 sql select * from information_schema.ins_mnodes -x step5
print $data(1)[0] $data(1)[1] $data(1)[2] print $data(1)[0] $data(1)[1] $data(1)[2]
print $data(2)[0] $data(2)[1] $data(2)[2] print $data(2)[0] $data(2)[1] $data(2)[2]
print $data(3)[0] $data(3)[1] $data(3)[2] print $data(3)[0] $data(3)[1] $data(3)[2]
...@@ -165,7 +165,7 @@ step6: ...@@ -165,7 +165,7 @@ step6:
if $x == 10 then if $x == 10 then
return -1 return -1
endi endi
sql show mnodes -x step6 sql select * from information_schema.ins_mnodes -x step6
print $data(1)[0] $data(1)[1] $data(1)[2] print $data(1)[0] $data(1)[1] $data(1)[2]
print $data(2)[0] $data(2)[1] $data(2)[2] print $data(2)[0] $data(2)[1] $data(2)[2]
print $data(3)[0] $data(3)[1] $data(3)[2] print $data(3)[0] $data(3)[1] $data(3)[2]
......
...@@ -49,7 +49,7 @@ endi ...@@ -49,7 +49,7 @@ endi
system sh/exec.sh -n dnode3 -s stop system sh/exec.sh -n dnode3 -s stop
sql_error create mnode on dnode 3 sql_error create mnode on dnode 3
print =============== step3: show mnodes print =============== step3: select * from information_schema.ins_mnodes
$x = 0 $x = 0
step3: step3:
...@@ -58,7 +58,7 @@ step3: ...@@ -58,7 +58,7 @@ step3:
if $x == 10 then if $x == 10 then
return -1 return -1
endi endi
sql show mnodes -x step3 sql select * from information_schema.ins_mnodes -x step3
print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4]
print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4]
print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4]
...@@ -96,7 +96,7 @@ step4: ...@@ -96,7 +96,7 @@ step4:
if $x == 10 then if $x == 10 then
return -1 return -1
endi endi
sql show mnodes -x step4 sql select * from information_schema.ins_mnodes -x step4
print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4]
print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4]
print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4]
...@@ -135,7 +135,7 @@ step5: ...@@ -135,7 +135,7 @@ step5:
if $x == 10 then if $x == 10 then
return -1 return -1
endi endi
sql show mnodes -x step5 sql select * from information_schema.ins_mnodes -x step5
print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4]
print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4]
print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4]
...@@ -173,7 +173,7 @@ step6: ...@@ -173,7 +173,7 @@ step6:
if $x == 10 then if $x == 10 then
return -1 return -1
endi endi
sql show mnodes -x step6 sql select * from information_schema.ins_mnodes -x step6
print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4]
print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4]
print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4]
......
...@@ -67,7 +67,7 @@ step31: ...@@ -67,7 +67,7 @@ step31:
if $x == 50 then if $x == 50 then
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
$leaderNum = 0 $leaderNum = 0
if $data(1)[2] == leader then if $data(1)[2] == leader then
$leaderNum = 1 $leaderNum = 1
...@@ -161,7 +161,7 @@ step61: ...@@ -161,7 +161,7 @@ step61:
if $x == 10 then if $x == 10 then
return -1 return -1
endi endi
sql show mnodes -x step61 sql select * from information_schema.ins_mnodes -x step61
print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data10 $data11 $data12 $data13 $data14 $data15
print ===> $data20 $data21 $data22 $data23 $data24 $data25 print ===> $data20 $data21 $data22 $data23 $data24 $data25
...@@ -215,7 +215,7 @@ step81: ...@@ -215,7 +215,7 @@ step81:
if $x == 10 then if $x == 10 then
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data10 $data11 $data12 $data13 $data14 $data15
print ===> $data20 $data21 $data22 $data23 $data24 $data25 print ===> $data20 $data21 $data22 $data23 $data24 $data25
...@@ -271,7 +271,7 @@ step92: ...@@ -271,7 +271,7 @@ step92:
if $x == 20 then if $x == 20 then
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data10 $data11 $data12 $data13 $data14 $data15
print ===> $data20 $data21 $data22 $data23 $data24 $data25 print ===> $data20 $data21 $data22 $data23 $data24 $data25
...@@ -301,7 +301,7 @@ stepa: ...@@ -301,7 +301,7 @@ stepa:
if $x == 10 then if $x == 10 then
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data10 $data11 $data12 $data13 $data14 $data15
print ===> $data20 $data21 $data22 $data23 $data24 $data25 print ===> $data20 $data21 $data22 $data23 $data24 $data25
......
...@@ -62,7 +62,7 @@ if $data14 != ready then ...@@ -62,7 +62,7 @@ if $data14 != ready then
return -1 return -1
endi endi
sql show mnodes; sql select * from information_schema.ins_mnodes;
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
......
...@@ -44,7 +44,7 @@ if $rows != 2 then ...@@ -44,7 +44,7 @@ if $rows != 2 then
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
...@@ -142,7 +142,7 @@ if $rows != 2 then ...@@ -142,7 +142,7 @@ if $rows != 2 then
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
......
...@@ -62,7 +62,7 @@ if $data14 != ready then ...@@ -62,7 +62,7 @@ if $data14 != ready then
return -1 return -1
endi endi
sql show mnodes; sql select * from information_schema.ins_mnodes;
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
......
...@@ -276,7 +276,7 @@ check_mnode_ready_2: ...@@ -276,7 +276,7 @@ check_mnode_ready_2:
print ====> first create three mnode not ready! print ====> first create three mnode not ready!
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3]
...@@ -568,7 +568,7 @@ check_mnode_ready_3: ...@@ -568,7 +568,7 @@ check_mnode_ready_3:
print ====> second mnode not ready! print ====> second mnode not ready!
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3]
...@@ -847,7 +847,7 @@ check_mnode_ready_3: ...@@ -847,7 +847,7 @@ check_mnode_ready_3:
print ====> third: mnode not ready! print ====> third: mnode not ready!
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3]
......
...@@ -278,7 +278,7 @@ check_mnode_ready_2: ...@@ -278,7 +278,7 @@ check_mnode_ready_2:
print ====> first create three mnode not ready! print ====> first create three mnode not ready!
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3]
...@@ -531,7 +531,7 @@ check_mnode_ready_3: ...@@ -531,7 +531,7 @@ check_mnode_ready_3:
print ====> second mnode not ready! print ====> second mnode not ready!
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3]
...@@ -580,7 +580,7 @@ if $loop_cnt == 300 then ...@@ -580,7 +580,7 @@ if $loop_cnt == 300 then
print ====> vgroups not ready! print ====> vgroups not ready!
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3]
......
...@@ -8,7 +8,7 @@ system sh/exec.sh -n dnode3 -s start ...@@ -8,7 +8,7 @@ system sh/exec.sh -n dnode3 -s start
sql connect sql connect
print =============== select * from information_schema.ins_dnodes print =============== select * from information_schema.ins_dnodes
sql show mnodes; sql select * from information_schema.ins_mnodes;
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
......
...@@ -10,7 +10,7 @@ sql create user u_write pass 'taosdata1' ...@@ -10,7 +10,7 @@ sql create user u_write pass 'taosdata1'
sql alter user u_read pass 'taosdata' sql alter user u_read pass 'taosdata'
sql alter user u_write pass 'taosdata' sql alter user u_write pass 'taosdata'
sql select * from information_schema.ins_users sql show users
if $rows != 3 then if $rows != 3 then
return -1 return -1
endi endi
...@@ -26,7 +26,7 @@ sql_error alter user u_write pass 'taosdata1' ...@@ -26,7 +26,7 @@ sql_error alter user u_write pass 'taosdata1'
sql_error create user read1 pass 'taosdata1' sql_error create user read1 pass 'taosdata1'
sql_error create user write1 pass 'taosdata1' sql_error create user write1 pass 'taosdata1'
sql select * from information_schema.ins_users sql show users
if $rows != 3 then if $rows != 3 then
return -1 return -1
endi endi
...@@ -41,7 +41,7 @@ sql_error create user write2 pass 'taosdata1' ...@@ -41,7 +41,7 @@ sql_error create user write2 pass 'taosdata1'
sql alter user u_write pass 'taosdata' sql alter user u_write pass 'taosdata'
sql_error alter user u_read pass 'taosdata' sql_error alter user u_read pass 'taosdata'
sql select * from information_schema.ins_users sql show users
if $rows != 3 then if $rows != 3 then
return -1 return -1
endi endi
...@@ -56,7 +56,7 @@ sql_error create userabcd012345678901234567891234567890abcd012345678901234567891 ...@@ -56,7 +56,7 @@ sql_error create userabcd012345678901234567891234567890abcd012345678901234567891
sql_error create user abcd0123456789012345678901234567890111 PASS '123' sql_error create user abcd0123456789012345678901234567890111 PASS '123'
sql create user abc01234567890123456789 PASS '123' sql create user abc01234567890123456789 PASS '123'
sql select * from information_schema.ins_users sql show users
if $rows != 5 then if $rows != 5 then
return -1 return -1
endi endi
......
...@@ -52,7 +52,7 @@ print =============== check show ...@@ -52,7 +52,7 @@ print =============== check show
sql_error select * from information_schema.ins_users sql_error select * from information_schema.ins_users
sql_error show cluster sql_error show cluster
sql_error select * from information_schema.ins_dnodes sql_error select * from information_schema.ins_dnodes
sql_error show mnodes sql_error select * from information_schema.ins_mnodes
sql_error show snodes sql_error show snodes
sql_error show qnodes sql_error show qnodes
sql_error show bnodes sql_error show bnodes
......
...@@ -58,7 +58,7 @@ if $rows != 2 then ...@@ -58,7 +58,7 @@ if $rows != 2 then
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
......
...@@ -47,7 +47,7 @@ step02: ...@@ -47,7 +47,7 @@ step02:
if $x == 20 then if $x == 20 then
return -1 return -1
endi endi
sql show mnodes sql select * from information_schema.ins_mnodes
print $data(1)[0] $data(1)[1] $data(1)[2] print $data(1)[0] $data(1)[1] $data(1)[2]
print $data(2)[0] $data(2)[1] $data(2)[2] print $data(2)[0] $data(2)[1] $data(2)[2]
print $data(3)[0] $data(3)[1] $data(3)[2] print $data(3)[0] $data(3)[1] $data(3)[2]
......
...@@ -692,7 +692,7 @@ class TDTestCase: ...@@ -692,7 +692,7 @@ class TDTestCase:
taos4_conn = taos.connect(user=self.__user_list[4], password=f"new{self.__passwd_list[4]}") taos4_conn = taos.connect(user=self.__user_list[4], password=f"new{self.__passwd_list[4]}")
taos4_except = True taos4_except = True
try: try:
taos4_conn.query(f"show mnodes") taos4_conn.query(f"select * from information_schema.ins_mnodes")
taos4_conn.query(f"show {DBNAME}.vgroups") taos4_conn.query(f"show {DBNAME}.vgroups")
except BaseException: except BaseException:
taos4_except = False taos4_except = False
......
...@@ -94,7 +94,7 @@ class TDTestCase: ...@@ -94,7 +94,7 @@ class TDTestCase:
tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host)
tdSql.checkData(0,4,'ready') tdSql.checkData(0,4,'ready')
tdSql.checkData(4,4,'ready') tdSql.checkData(4,4,'ready')
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,2,'leader') tdSql.checkData(0,2,'leader')
tdSql.checkData(0,3,'ready') tdSql.checkData(0,3,'ready')
......
...@@ -48,7 +48,7 @@ class TDTestCase: ...@@ -48,7 +48,7 @@ class TDTestCase:
tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host)
tdSql.checkData(0,4,'ready') tdSql.checkData(0,4,'ready')
tdSql.checkData(4,4,'ready') tdSql.checkData(4,4,'ready')
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,2,'leader') tdSql.checkData(0,2,'leader')
tdSql.checkData(0,3,'ready') tdSql.checkData(0,3,'ready')
...@@ -62,7 +62,7 @@ class TDTestCase: ...@@ -62,7 +62,7 @@ class TDTestCase:
count=0 count=0
while count < 10: while count < 10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(2) tdSql.checkRows(2)
if tdSql.queryResult[0][2]=='leader' : if tdSql.queryResult[0][2]=='leader' :
if tdSql.queryResult[1][2]=='follower': if tdSql.queryResult[1][2]=='follower':
......
...@@ -117,7 +117,7 @@ class TDTestCase: ...@@ -117,7 +117,7 @@ class TDTestCase:
count=0 count=0
while count < 10: while count < 10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(3) : if tdSql.checkRows(3) :
tdLog.debug("mnode is three nodes") tdLog.debug("mnode is three nodes")
if tdSql.queryResult[0][2]=='leader' : if tdSql.queryResult[0][2]=='leader' :
...@@ -141,7 +141,7 @@ class TDTestCase: ...@@ -141,7 +141,7 @@ class TDTestCase:
tdLog.debug("three mnodes is not ready in 10s ") tdLog.debug("three mnodes is not ready in 10s ")
return -1 return -1
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(3) tdSql.checkRows(3)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,3,'ready') tdSql.checkData(0,3,'ready')
...@@ -154,7 +154,7 @@ class TDTestCase: ...@@ -154,7 +154,7 @@ class TDTestCase:
count=0 count=0
while count < 10: while count < 10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(3) : if tdSql.checkRows(3) :
tdLog.debug("mnode is three nodes") tdLog.debug("mnode is three nodes")
if tdSql.queryResult[0][2]=='offline' : if tdSql.queryResult[0][2]=='offline' :
...@@ -172,7 +172,7 @@ class TDTestCase: ...@@ -172,7 +172,7 @@ class TDTestCase:
return -1 return -1
tdSql.error("drop mnode on dnode 1;") tdSql.error("drop mnode on dnode 1;")
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(3) tdSql.checkRows(3)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,2,'offline') tdSql.checkData(0,2,'offline')
...@@ -186,7 +186,7 @@ class TDTestCase: ...@@ -186,7 +186,7 @@ class TDTestCase:
count=0 count=0
while count < 40: while count < 40:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(3) : if tdSql.checkRows(3) :
tdLog.debug("mnode is three nodes") tdLog.debug("mnode is three nodes")
if tdSql.queryResult[0][2]=='leader' : if tdSql.queryResult[0][2]=='leader' :
...@@ -200,7 +200,7 @@ class TDTestCase: ...@@ -200,7 +200,7 @@ class TDTestCase:
return -1 return -1
tdSql.error("drop mnode on dnode 2;") tdSql.error("drop mnode on dnode 2;")
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(3) tdSql.checkRows(3)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,2,'leader') tdSql.checkData(0,2,'leader')
...@@ -216,7 +216,7 @@ class TDTestCase: ...@@ -216,7 +216,7 @@ class TDTestCase:
count=0 count=0
while count < 10: while count < 10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(3) : if tdSql.checkRows(3) :
tdLog.debug("mnode is three nodes") tdLog.debug("mnode is three nodes")
if tdSql.queryResult[0][2]=='leader' : if tdSql.queryResult[0][2]=='leader' :
...@@ -229,7 +229,7 @@ class TDTestCase: ...@@ -229,7 +229,7 @@ class TDTestCase:
tdLog.debug("stop mnodes on dnode 3 failed in 10s") tdLog.debug("stop mnodes on dnode 3 failed in 10s")
return -1 return -1
tdSql.error("drop mnode on dnode 3;") tdSql.error("drop mnode on dnode 3;")
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(3) tdSql.checkRows(3)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,2,'leader') tdSql.checkData(0,2,'leader')
...@@ -249,7 +249,7 @@ class TDTestCase: ...@@ -249,7 +249,7 @@ class TDTestCase:
tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host)
tdSql.checkData(0,4,'ready') tdSql.checkData(0,4,'ready')
tdSql.checkData(4,4,'ready') tdSql.checkData(4,4,'ready')
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(1) tdSql.checkRows(1)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,2,'leader') tdSql.checkData(0,2,'leader')
...@@ -276,11 +276,11 @@ class TDTestCase: ...@@ -276,11 +276,11 @@ class TDTestCase:
for i in range(1,3): for i in range(1,3):
tdLog.debug("drop mnode on dnode %d"%(i+1)) tdLog.debug("drop mnode on dnode %d"%(i+1))
tdSql.execute("drop mnode on dnode %d"%(i+1)) tdSql.execute("drop mnode on dnode %d"%(i+1))
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
count=0 count=0
while count<10: while count<10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(2): if tdSql.checkRows(2):
tdLog.debug("drop mnode %d successfully"%(i+1)) tdLog.debug("drop mnode %d successfully"%(i+1))
break break
...@@ -290,7 +290,7 @@ class TDTestCase: ...@@ -290,7 +290,7 @@ class TDTestCase:
count=0 count=0
while count<10: while count<10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(3): if tdSql.checkRows(3):
tdLog.debug("drop mnode %d successfully"%(i+1)) tdLog.debug("drop mnode %d successfully"%(i+1))
break break
......
...@@ -209,7 +209,7 @@ class TDTestCase: ...@@ -209,7 +209,7 @@ class TDTestCase:
count=0 count=0
while count < 10: while count < 10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(3) : if tdSql.checkRows(3) :
print("mnode is three nodes") print("mnode is three nodes")
if tdSql.queryResult[0][2]=='leader' : if tdSql.queryResult[0][2]=='leader' :
...@@ -232,7 +232,7 @@ class TDTestCase: ...@@ -232,7 +232,7 @@ class TDTestCase:
print("three mnodes is not ready in 10s ") print("three mnodes is not ready in 10s ")
return -1 return -1
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(3) tdSql.checkRows(3)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,3,'ready') tdSql.checkData(0,3,'ready')
...@@ -245,7 +245,7 @@ class TDTestCase: ...@@ -245,7 +245,7 @@ class TDTestCase:
count=0 count=0
while count < 10: while count < 10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(3) : if tdSql.checkRows(3) :
print("mnode is three nodes") print("mnode is three nodes")
if tdSql.queryResult[0][2]=='offline' : if tdSql.queryResult[0][2]=='offline' :
...@@ -263,7 +263,7 @@ class TDTestCase: ...@@ -263,7 +263,7 @@ class TDTestCase:
return -1 return -1
tdSql.error("drop mnode on dnode 1;") tdSql.error("drop mnode on dnode 1;")
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(3) tdSql.checkRows(3)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,2,'offline') tdSql.checkData(0,2,'offline')
...@@ -277,7 +277,7 @@ class TDTestCase: ...@@ -277,7 +277,7 @@ class TDTestCase:
count=0 count=0
while count < 40: while count < 40:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(3) : if tdSql.checkRows(3) :
print("mnode is three nodes") print("mnode is three nodes")
if tdSql.queryResult[0][2]=='leader' : if tdSql.queryResult[0][2]=='leader' :
...@@ -291,7 +291,7 @@ class TDTestCase: ...@@ -291,7 +291,7 @@ class TDTestCase:
return -1 return -1
tdSql.error("drop mnode on dnode 2;") tdSql.error("drop mnode on dnode 2;")
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(3) tdSql.checkRows(3)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,2,'leader') tdSql.checkData(0,2,'leader')
...@@ -307,7 +307,7 @@ class TDTestCase: ...@@ -307,7 +307,7 @@ class TDTestCase:
count=0 count=0
while count < 10: while count < 10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(3) : if tdSql.checkRows(3) :
print("mnode is three nodes") print("mnode is three nodes")
if tdSql.queryResult[0][2]=='leader' : if tdSql.queryResult[0][2]=='leader' :
...@@ -320,7 +320,7 @@ class TDTestCase: ...@@ -320,7 +320,7 @@ class TDTestCase:
print("stop mnodes on dnode 3 failed in 10s") print("stop mnodes on dnode 3 failed in 10s")
return -1 return -1
tdSql.error("drop mnode on dnode 3;") tdSql.error("drop mnode on dnode 3;")
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(3) tdSql.checkRows(3)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,2,'leader') tdSql.checkData(0,2,'leader')
...@@ -348,7 +348,7 @@ class TDTestCase: ...@@ -348,7 +348,7 @@ class TDTestCase:
tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host)
tdSql.checkData(0,4,'ready') tdSql.checkData(0,4,'ready')
tdSql.checkData(4,4,'ready') tdSql.checkData(4,4,'ready')
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(1) tdSql.checkRows(1)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,2,'leader') tdSql.checkData(0,2,'leader')
...@@ -383,11 +383,11 @@ class TDTestCase: ...@@ -383,11 +383,11 @@ class TDTestCase:
for i in range(1,3): for i in range(1,3):
tdLog.debug("drop mnode on dnode %d"%(i+1)) tdLog.debug("drop mnode on dnode %d"%(i+1))
tdSql.execute("drop mnode on dnode %d"%(i+1)) tdSql.execute("drop mnode on dnode %d"%(i+1))
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
count=0 count=0
while count<10: while count<10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(2): if tdSql.checkRows(2):
print("drop mnode %d successfully"%(i+1)) print("drop mnode %d successfully"%(i+1))
break break
...@@ -397,7 +397,7 @@ class TDTestCase: ...@@ -397,7 +397,7 @@ class TDTestCase:
count=0 count=0
while count<10: while count<10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(3): if tdSql.checkRows(3):
print("drop mnode %d successfully"%(i+1)) print("drop mnode %d successfully"%(i+1))
break break
......
...@@ -128,7 +128,7 @@ class TDTestCase: ...@@ -128,7 +128,7 @@ class TDTestCase:
count=0 count=0
while count < 10: while count < 10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(3) : if tdSql.checkRows(3) :
print("mnode is three nodes") print("mnode is three nodes")
if tdSql.queryResult[0][2]=='leader' : if tdSql.queryResult[0][2]=='leader' :
...@@ -151,7 +151,7 @@ class TDTestCase: ...@@ -151,7 +151,7 @@ class TDTestCase:
print("three mnodes is not ready in 10s ") print("three mnodes is not ready in 10s ")
return -1 return -1
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(3) tdSql.checkRows(3)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,3,'ready') tdSql.checkData(0,3,'ready')
...@@ -164,7 +164,7 @@ class TDTestCase: ...@@ -164,7 +164,7 @@ class TDTestCase:
count=0 count=0
while count < 10: while count < 10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(3) : if tdSql.checkRows(3) :
print("mnode is three nodes") print("mnode is three nodes")
if tdSql.queryResult[0][2]=='offline' : if tdSql.queryResult[0][2]=='offline' :
...@@ -182,7 +182,7 @@ class TDTestCase: ...@@ -182,7 +182,7 @@ class TDTestCase:
return -1 return -1
tdSql.error("drop mnode on dnode 1;") tdSql.error("drop mnode on dnode 1;")
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(3) tdSql.checkRows(3)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,2,'offline') tdSql.checkData(0,2,'offline')
...@@ -196,7 +196,7 @@ class TDTestCase: ...@@ -196,7 +196,7 @@ class TDTestCase:
count=0 count=0
while count < 40: while count < 40:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(3) : if tdSql.checkRows(3) :
print("mnode is three nodes") print("mnode is three nodes")
if tdSql.queryResult[0][2]=='leader' : if tdSql.queryResult[0][2]=='leader' :
...@@ -210,7 +210,7 @@ class TDTestCase: ...@@ -210,7 +210,7 @@ class TDTestCase:
return -1 return -1
tdSql.error("drop mnode on dnode 2;") tdSql.error("drop mnode on dnode 2;")
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(3) tdSql.checkRows(3)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,2,'leader') tdSql.checkData(0,2,'leader')
...@@ -226,7 +226,7 @@ class TDTestCase: ...@@ -226,7 +226,7 @@ class TDTestCase:
count=0 count=0
while count < 10: while count < 10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(3) : if tdSql.checkRows(3) :
print("mnode is three nodes") print("mnode is three nodes")
if tdSql.queryResult[0][2]=='leader' : if tdSql.queryResult[0][2]=='leader' :
...@@ -239,7 +239,7 @@ class TDTestCase: ...@@ -239,7 +239,7 @@ class TDTestCase:
print("stop mnodes on dnode 3 failed in 10s") print("stop mnodes on dnode 3 failed in 10s")
return -1 return -1
tdSql.error("drop mnode on dnode 3;") tdSql.error("drop mnode on dnode 3;")
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(3) tdSql.checkRows(3)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,2,'leader') tdSql.checkData(0,2,'leader')
...@@ -265,7 +265,7 @@ class TDTestCase: ...@@ -265,7 +265,7 @@ class TDTestCase:
tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host)
tdSql.checkData(0,4,'ready') tdSql.checkData(0,4,'ready')
tdSql.checkData(4,4,'ready') tdSql.checkData(4,4,'ready')
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(1) tdSql.checkRows(1)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,2,'leader') tdSql.checkData(0,2,'leader')
......
...@@ -167,7 +167,7 @@ class TDTestCase: ...@@ -167,7 +167,7 @@ class TDTestCase:
count=0 count=0
while count < 10: while count < 10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(3) : if tdSql.checkRows(3) :
tdLog.debug("mnode is three nodes") tdLog.debug("mnode is three nodes")
if tdSql.queryResult[0][2]=='leader' : if tdSql.queryResult[0][2]=='leader' :
...@@ -190,7 +190,7 @@ class TDTestCase: ...@@ -190,7 +190,7 @@ class TDTestCase:
tdLog.debug("three mnodes is not ready in 10s ") tdLog.debug("three mnodes is not ready in 10s ")
return -1 return -1
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(3) tdSql.checkRows(3)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,3,'ready') tdSql.checkData(0,3,'ready')
...@@ -203,7 +203,7 @@ class TDTestCase: ...@@ -203,7 +203,7 @@ class TDTestCase:
count=0 count=0
while count < 10: while count < 10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(3) : if tdSql.checkRows(3) :
tdLog.debug("mnode is three nodes") tdLog.debug("mnode is three nodes")
if tdSql.queryResult[0][2]=='offline' : if tdSql.queryResult[0][2]=='offline' :
...@@ -221,7 +221,7 @@ class TDTestCase: ...@@ -221,7 +221,7 @@ class TDTestCase:
return -1 return -1
tdSql.error("drop mnode on dnode 1;") tdSql.error("drop mnode on dnode 1;")
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(3) tdSql.checkRows(3)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,2,'offline') tdSql.checkData(0,2,'offline')
...@@ -235,7 +235,7 @@ class TDTestCase: ...@@ -235,7 +235,7 @@ class TDTestCase:
count=0 count=0
while count < 40: while count < 40:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(3) : if tdSql.checkRows(3) :
tdLog.debug("mnode is three nodes") tdLog.debug("mnode is three nodes")
if tdSql.queryResult[0][2]=='leader' : if tdSql.queryResult[0][2]=='leader' :
...@@ -249,7 +249,7 @@ class TDTestCase: ...@@ -249,7 +249,7 @@ class TDTestCase:
return -1 return -1
tdSql.error("drop mnode on dnode 2;") tdSql.error("drop mnode on dnode 2;")
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(3) tdSql.checkRows(3)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,2,'leader') tdSql.checkData(0,2,'leader')
...@@ -265,7 +265,7 @@ class TDTestCase: ...@@ -265,7 +265,7 @@ class TDTestCase:
count=0 count=0
while count < 10: while count < 10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(3) : if tdSql.checkRows(3) :
tdLog.debug("mnode is three nodes") tdLog.debug("mnode is three nodes")
if tdSql.queryResult[0][2]=='leader' : if tdSql.queryResult[0][2]=='leader' :
...@@ -278,7 +278,7 @@ class TDTestCase: ...@@ -278,7 +278,7 @@ class TDTestCase:
tdLog.debug("stop mnodes on dnode 3 failed in 10s") tdLog.debug("stop mnodes on dnode 3 failed in 10s")
return -1 return -1
tdSql.error("drop mnode on dnode 3;") tdSql.error("drop mnode on dnode 3;")
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(3) tdSql.checkRows(3)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,2,'leader') tdSql.checkData(0,2,'leader')
...@@ -296,7 +296,7 @@ class TDTestCase: ...@@ -296,7 +296,7 @@ class TDTestCase:
tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host)
tdSql.checkData(0,4,'ready') tdSql.checkData(0,4,'ready')
tdSql.checkData(4,4,'ready') tdSql.checkData(4,4,'ready')
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(1) tdSql.checkRows(1)
tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,1,'%s:6030'%self.host)
tdSql.checkData(0,2,'leader') tdSql.checkData(0,2,'leader')
......
...@@ -117,7 +117,7 @@ class ClusterComCheck: ...@@ -117,7 +117,7 @@ class ClusterComCheck:
while count < 10: while count < 10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(self.mnodeNums) : if tdSql.checkRows(self.mnodeNums) :
tdLog.success("cluster has %d mnodes" %self.mnodeNums ) tdLog.success("cluster has %d mnodes" %self.mnodeNums )
...@@ -164,7 +164,7 @@ class ClusterComCheck: ...@@ -164,7 +164,7 @@ class ClusterComCheck:
count=0 count=0
while count < 10: while count < 10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(mnodeNums) : if tdSql.checkRows(mnodeNums) :
tdLog.success("cluster has %d mnodes" %self.mnodeNums ) tdLog.success("cluster has %d mnodes" %self.mnodeNums )
else: else:
...@@ -210,7 +210,7 @@ class ClusterComCheck: ...@@ -210,7 +210,7 @@ class ClusterComCheck:
count=0 count=0
while count < 10: while count < 10:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(mnodeNums) : if tdSql.checkRows(mnodeNums) :
tdLog.success("cluster has %d mnodes" %self.mnodeNums ) tdLog.success("cluster has %d mnodes" %self.mnodeNums )
else: else:
......
...@@ -41,7 +41,7 @@ class TDTestCase: ...@@ -41,7 +41,7 @@ class TDTestCase:
return buildPath return buildPath
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -47,7 +47,7 @@ class TDTestCase: ...@@ -47,7 +47,7 @@ class TDTestCase:
return buildPath return buildPath
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -48,7 +48,7 @@ class TDTestCase: ...@@ -48,7 +48,7 @@ class TDTestCase:
return buildPath return buildPath
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -47,7 +47,7 @@ class TDTestCase: ...@@ -47,7 +47,7 @@ class TDTestCase:
return buildPath return buildPath
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -57,7 +57,7 @@ class TDTestCase: ...@@ -57,7 +57,7 @@ class TDTestCase:
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -48,7 +48,7 @@ class TDTestCase: ...@@ -48,7 +48,7 @@ class TDTestCase:
return buildPath return buildPath
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -50,7 +50,7 @@ class TDTestCase: ...@@ -50,7 +50,7 @@ class TDTestCase:
return buildPath return buildPath
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -50,7 +50,7 @@ class TDTestCase: ...@@ -50,7 +50,7 @@ class TDTestCase:
return buildPath return buildPath
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -50,7 +50,7 @@ class TDTestCase: ...@@ -50,7 +50,7 @@ class TDTestCase:
return buildPath return buildPath
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -57,7 +57,7 @@ class TDTestCase: ...@@ -57,7 +57,7 @@ class TDTestCase:
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -56,7 +56,7 @@ class TDTestCase: ...@@ -56,7 +56,7 @@ class TDTestCase:
return buildPath return buildPath
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -56,7 +56,7 @@ class TDTestCase: ...@@ -56,7 +56,7 @@ class TDTestCase:
return buildPath return buildPath
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -56,7 +56,7 @@ class TDTestCase: ...@@ -56,7 +56,7 @@ class TDTestCase:
return buildPath return buildPath
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -139,7 +139,7 @@ class TDTestCase: ...@@ -139,7 +139,7 @@ class TDTestCase:
return check_status return check_status
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -139,7 +139,7 @@ class TDTestCase: ...@@ -139,7 +139,7 @@ class TDTestCase:
return check_status return check_status
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -48,7 +48,7 @@ class TDTestCase: ...@@ -48,7 +48,7 @@ class TDTestCase:
return buildPath return buildPath
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
...@@ -190,7 +190,7 @@ class TDTestCase: ...@@ -190,7 +190,7 @@ class TDTestCase:
# create mnode # create mnode
tdSql.execute("create mnode on dnode 2 ") tdSql.execute("create mnode on dnode 2 ")
tdSql.execute("create mnode on dnode 3 ") tdSql.execute("create mnode on dnode 3 ")
os.system("taos -s 'show mnodes;'") os.system("taos -s 'select * from information_schema.ins_mnodes;'")
# start writing constantly # start writing constantly
writing = threading.Thread(target = self.create_db_replica_3_insertdatas, args=(self.db_name , self.replica , self.vgroups , self.tb_nums , self.row_nums)) writing = threading.Thread(target = self.create_db_replica_3_insertdatas, args=(self.db_name , self.replica , self.vgroups , self.tb_nums , self.row_nums))
writing.start() writing.start()
......
...@@ -58,7 +58,7 @@ class TDTestCase: ...@@ -58,7 +58,7 @@ class TDTestCase:
return buildPath return buildPath
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -58,7 +58,7 @@ class TDTestCase: ...@@ -58,7 +58,7 @@ class TDTestCase:
return buildPath return buildPath
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -58,7 +58,7 @@ class TDTestCase: ...@@ -58,7 +58,7 @@ class TDTestCase:
return buildPath return buildPath
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -58,7 +58,7 @@ class TDTestCase: ...@@ -58,7 +58,7 @@ class TDTestCase:
return buildPath return buildPath
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -47,7 +47,7 @@ class TDTestCase: ...@@ -47,7 +47,7 @@ class TDTestCase:
return buildPath return buildPath
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -50,7 +50,7 @@ class TDTestCase: ...@@ -50,7 +50,7 @@ class TDTestCase:
return buildPath return buildPath
def check_setup_cluster_status(self): def check_setup_cluster_status(self):
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
for mnode in tdSql.queryResult: for mnode in tdSql.queryResult:
name = mnode[1] name = mnode[1]
info = mnode info = mnode
......
...@@ -63,7 +63,7 @@ class TDTestCase: ...@@ -63,7 +63,7 @@ class TDTestCase:
count=0 count=0
while count < self.mnodeCheckCnt: while count < self.mnodeCheckCnt:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
if tdSql.checkRows(self.mnodes) : if tdSql.checkRows(self.mnodes) :
tdLog.debug("mnode is three nodes") tdLog.debug("mnode is three nodes")
else: else:
...@@ -87,7 +87,7 @@ class TDTestCase: ...@@ -87,7 +87,7 @@ class TDTestCase:
else: else:
tdLog.exit("three mnodes is not ready in 10s ") tdLog.exit("three mnodes is not ready in 10s ")
tdSql.query("show mnodes;") tdSql.query("select * from information_schema.ins_mnodes;")
tdSql.checkRows(self.mnodes) tdSql.checkRows(self.mnodes)
tdSql.checkData(0,self.mnodeEpIndex,'%s:%d'%(self.host,self.startPort)) tdSql.checkData(0,self.mnodeEpIndex,'%s:%d'%(self.host,self.startPort))
tdSql.checkData(0,self.mnodeStatusIndex,'ready') tdSql.checkData(0,self.mnodeStatusIndex,'ready')
...@@ -100,7 +100,7 @@ class TDTestCase: ...@@ -100,7 +100,7 @@ class TDTestCase:
count=0 count=0
while count < self.mnodeCheckCnt: while count < self.mnodeCheckCnt:
time.sleep(1) time.sleep(1)
tdSql.query("show mnodes") tdSql.query("select * from information_schema.ins_mnodes")
tdLog.debug(tdSql.queryResult) tdLog.debug(tdSql.queryResult)
# if tdSql.checkRows(self.mnodes) : # if tdSql.checkRows(self.mnodes) :
# tdLog.debug("mnode is three nodes") # tdLog.debug("mnode is three nodes")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册