fix test case
This commit is contained in:
parent
31872611bd
commit
234b89767d
|
@ -7,24 +7,24 @@ sql connect
|
|||
|
||||
print =============== select * from information_schema.ins_dnodes
|
||||
sql select * from information_schema.ins_dnodes;
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 != 1 then
|
||||
if $data00 != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select * from information_schema.ins_mnodes;
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 != 1 then
|
||||
if $data00 != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data02 != leader then
|
||||
if $data02 != leader then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -33,62 +33,62 @@ sql create dnode $hostname port 7200
|
|||
sleep 2000
|
||||
|
||||
sql select * from information_schema.ins_dnodes;
|
||||
if $rows != 2 then
|
||||
if $rows != 2 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 != 1 then
|
||||
if $data00 != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data10 != 2 then
|
||||
if $data10 != 2 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print $data02
|
||||
if $data02 != 0 then
|
||||
if $data02 != 0 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data12 != 0 then
|
||||
if $data12 != 0 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data04 != ready then
|
||||
if $data04 != ready then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data14 != ready then
|
||||
if $data14 != ready then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select * from information_schema.ins_mnodes;
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 != 1 then
|
||||
if $data00 != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data02 != leader then
|
||||
if $data02 != leader then
|
||||
return -1
|
||||
endi
|
||||
|
||||
#print =============== create drop bnode 1
|
||||
#sql create bnode on dnode 1
|
||||
#sql show bnodes
|
||||
#if $rows != 1 then
|
||||
#if $rows != 1 then
|
||||
# return -1
|
||||
#endi
|
||||
#if $data00 != 1 then
|
||||
#if $data00 != 1 then
|
||||
# return -1
|
||||
#endi
|
||||
#sql_error create bnode on dnode 1
|
||||
#
|
||||
#sql drop bnode on dnode 1
|
||||
#sql show bnodes
|
||||
#if $rows != 0 then
|
||||
#if $rows != 0 then
|
||||
# return -1
|
||||
#endi
|
||||
#sql_error drop bnode on dnode 1
|
||||
|
@ -96,17 +96,17 @@ endi
|
|||
#print =============== create drop bnode 2
|
||||
#sql create bnode on dnode 2
|
||||
#sql show bnodes
|
||||
#if $rows != 1 then
|
||||
#if $rows != 1 then
|
||||
# return -1
|
||||
#endi
|
||||
#if $data00 != 2 then
|
||||
#if $data00 != 2 then
|
||||
# return -1
|
||||
#endi
|
||||
#sql_error create bnode on dnode 2
|
||||
#
|
||||
#sql drop bnode on dnode 2
|
||||
#sql show bnodes
|
||||
#if $rows != 0 then
|
||||
#if $rows != 0 then
|
||||
# return -1
|
||||
#endi
|
||||
#sql_error drop bnode on dnode 2
|
||||
|
@ -115,7 +115,7 @@ endi
|
|||
#sql create bnode on dnode 1
|
||||
#sql create bnode on dnode 2
|
||||
#sql show bnodes
|
||||
#if $rows != 2 then
|
||||
#if $rows != 2 then
|
||||
# return -1
|
||||
#endi
|
||||
|
||||
|
@ -127,7 +127,7 @@ endi
|
|||
#
|
||||
#sleep 2000
|
||||
#sql show bnodes
|
||||
#if $rows != 2 then
|
||||
#if $rows != 2 then
|
||||
# return -1
|
||||
#endi
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ while $count < $N
|
|||
endw
|
||||
|
||||
sql select * from $tb
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -46,7 +46,7 @@ while $count < $N
|
|||
endw
|
||||
|
||||
sql select * from $tb
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -67,7 +67,7 @@ while $count < $N
|
|||
endw
|
||||
|
||||
sql select * from $tb
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -83,7 +83,7 @@ $tb = $tbPrefix . $i
|
|||
sql use $db
|
||||
sql select * from $tb
|
||||
print select * from $tb ==> $rows points
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -93,18 +93,18 @@ $tb = $tbPrefix . $i
|
|||
sql use $db
|
||||
sql select * from $tb
|
||||
print select * from $tb ==> $rows points
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
||||
$i = 2
|
||||
$db = $dbPrefix . $i
|
||||
$tb = $tbPrefix . $i
|
||||
sql use $db
|
||||
sql select * from $tb
|
||||
print select * from $tb ==> $rows points
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -25,7 +25,7 @@ while $count < $N
|
|||
endw
|
||||
|
||||
sql select * from $tb
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -47,7 +47,7 @@ while $count < $N
|
|||
endw
|
||||
|
||||
sql select * from $tb
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -69,7 +69,7 @@ while $count < $N
|
|||
endw
|
||||
|
||||
sql select * from $tb
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -85,7 +85,7 @@ $tb = $tbPrefix . $i
|
|||
sql use $db
|
||||
sql select * from $tb
|
||||
print select * from $tb ==> $rows points
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -95,18 +95,18 @@ $tb = $tbPrefix . $i
|
|||
sql use $db
|
||||
sql select * from $tb
|
||||
print select * from $tb ==> $rows points
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
||||
$i = 2
|
||||
$db = $dbPrefix . $i
|
||||
$tb = $tbPrefix . $i
|
||||
sql use $db
|
||||
sql select * from $tb
|
||||
print select * from $tb ==> $rows points
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -26,7 +26,7 @@ while $count < $N
|
|||
endw
|
||||
|
||||
sql select * from $tb
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -48,7 +48,7 @@ while $count < $N
|
|||
endw
|
||||
|
||||
sql select * from $tb
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -70,7 +70,7 @@ while $count < $N
|
|||
endw
|
||||
|
||||
sql select * from $tb
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -86,7 +86,7 @@ $tb = $tbPrefix . $i
|
|||
sql use $db
|
||||
sql select * from $tb
|
||||
print select * from $tb ==> $rows points
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -96,18 +96,18 @@ $tb = $tbPrefix . $i
|
|||
sql use $db
|
||||
sql select * from $tb
|
||||
print select * from $tb ==> $rows points
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
||||
$i = 2
|
||||
$db = $dbPrefix . $i
|
||||
$tb = $tbPrefix . $i
|
||||
sql use $db
|
||||
sql select * from $tb
|
||||
print select * from $tb ==> $rows points
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -26,7 +26,7 @@ while $count < $N
|
|||
endw
|
||||
|
||||
sql select * from $tb
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -48,7 +48,7 @@ while $count < $N
|
|||
endw
|
||||
|
||||
sql select * from $tb
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -70,7 +70,7 @@ while $count < $N
|
|||
endw
|
||||
|
||||
sql select * from $tb
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -85,7 +85,7 @@ $tb = $tbPrefix . $i
|
|||
sql use $db
|
||||
sql select * from $tb
|
||||
print select * from $tb ==> $rows points
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -95,18 +95,18 @@ $tb = $tbPrefix . $i
|
|||
sql use $db
|
||||
sql select * from $tb
|
||||
print select * from $tb ==> $rows points
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
||||
$i = 2
|
||||
$db = $dbPrefix . $i
|
||||
$tb = $tbPrefix . $i
|
||||
sql use $db
|
||||
sql select * from $tb
|
||||
print select * from $tb ==> $rows points
|
||||
if $rows != $N then
|
||||
if $rows != $N then
|
||||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -186,13 +186,13 @@ sql_error alter database db replica 0
|
|||
#sql alter database db replica 1
|
||||
#sql select * from information_schema.ins_databases
|
||||
#print replica: $data4_db
|
||||
#if $data4_db != 1 then
|
||||
#if $data4_db != 1 then
|
||||
# return -1
|
||||
#endi
|
||||
#sql alter database db replica 3
|
||||
#sql select * from information_schema.ins_databases
|
||||
#print replica: $data4_db
|
||||
#if $data4_db != 3 then
|
||||
#if $data4_db != 3 then
|
||||
# return -1
|
||||
#endi
|
||||
|
||||
|
@ -200,13 +200,13 @@ sql_error alter database db replica 0
|
|||
#sql alter database db quorum 2
|
||||
#sql select * from information_schema.ins_databases
|
||||
#print quorum $data5_db
|
||||
#if $data5_db != 2 then
|
||||
#if $data5_db != 2 then
|
||||
# return -1
|
||||
#endi
|
||||
#sql alter database db quorum 1
|
||||
#sql select * from information_schema.ins_databases
|
||||
#print quorum $data5_db
|
||||
#if $data5_db != 1 then
|
||||
#if $data5_db != 1 then
|
||||
# return -1
|
||||
#endi
|
||||
|
||||
|
@ -233,7 +233,7 @@ endi
|
|||
#sql alter database db keep 1000,2000
|
||||
#sql select * from information_schema.ins_databases
|
||||
#print keep $data7_db
|
||||
#if $data7_db != 500,500,500 then
|
||||
#if $data7_db != 500,500,500 then
|
||||
# return -1
|
||||
#endi
|
||||
|
||||
|
@ -263,13 +263,13 @@ sql_error alter database db keep -1
|
|||
#sql alter database db blocks 3
|
||||
#sql select * from information_schema.ins_databases
|
||||
#print blocks $data9_db
|
||||
#if $data9_db != 3 then
|
||||
#if $data9_db != 3 then
|
||||
# return -1
|
||||
#endi
|
||||
#sql alter database db blocks 11
|
||||
#sql select * from information_schema.ins_databases
|
||||
#print blocks $data9_db
|
||||
#if $data9_db != 11 then
|
||||
#if $data9_db != 11 then
|
||||
# return -1
|
||||
#endi
|
||||
|
||||
|
@ -300,13 +300,13 @@ print ============== step wal_level
|
|||
sql alter database db wal_level 1
|
||||
sql select * from information_schema.ins_databases
|
||||
print wal_level $data20_db
|
||||
if $data20_db != 1 then
|
||||
if $data20_db != 1 then
|
||||
return -1
|
||||
endi
|
||||
sql alter database db wal_level 2
|
||||
sql select * from information_schema.ins_databases
|
||||
print wal_level $data20_db
|
||||
if $data20_db != 2 then
|
||||
if $data20_db != 2 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -319,19 +319,19 @@ print ============== modify wal_fsync_period
|
|||
sql alter database db wal_fsync_period 2000
|
||||
sql select * from information_schema.ins_databases
|
||||
print wal_fsync_period $data21_db
|
||||
if $data21_db != 2000 then
|
||||
if $data21_db != 2000 then
|
||||
return -1
|
||||
endi
|
||||
sql alter database db wal_fsync_period 500
|
||||
sql select * from information_schema.ins_databases
|
||||
print wal_fsync_period $data21_db
|
||||
if $data21_db != 500 then
|
||||
if $data21_db != 500 then
|
||||
return -1
|
||||
endi
|
||||
sql alter database db wal_fsync_period 0
|
||||
sql select * from information_schema.ins_databases
|
||||
print wal_fsync_period $data21_db
|
||||
if $data21_db != 0 then
|
||||
if $data21_db != 0 then
|
||||
return -1
|
||||
endi
|
||||
sql_error alter database db wal_fsync_period 180001
|
||||
|
@ -351,31 +351,31 @@ print ============== modify cachelast [0, 1, 2, 3]
|
|||
sql alter database db cachemodel 'last_value'
|
||||
sql select * from information_schema.ins_databases
|
||||
print cachelast $data18_db
|
||||
if $data18_db != last_value then
|
||||
if $data18_db != last_value then
|
||||
return -1
|
||||
endi
|
||||
sql alter database db cachemodel 'last_row'
|
||||
sql select * from information_schema.ins_databases
|
||||
print cachelast $data18_db
|
||||
if $data18_db != last_row then
|
||||
if $data18_db != last_row then
|
||||
return -1
|
||||
endi
|
||||
sql alter database db cachemodel 'none'
|
||||
sql select * from information_schema.ins_databases
|
||||
print cachelast $data18_db
|
||||
if $data18_db != none then
|
||||
if $data18_db != none then
|
||||
return -1
|
||||
endi
|
||||
sql alter database db cachemodel 'last_value'
|
||||
sql select * from information_schema.ins_databases
|
||||
print cachelast $data18_db
|
||||
if $data18_db != last_value then
|
||||
if $data18_db != last_value then
|
||||
return -1
|
||||
endi
|
||||
sql alter database db cachemodel 'both'
|
||||
sql select * from information_schema.ins_databases
|
||||
print cachelast $data18_db
|
||||
if $data18_db != both then
|
||||
if $data18_db != both then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
|
|
@ -36,10 +36,10 @@ endi
|
|||
print =============== step2: create database
|
||||
sql create database db vgroups 1
|
||||
sql select * from information_schema.ins_databases
|
||||
if $rows != 3 then
|
||||
if $rows != 3 then
|
||||
return -1
|
||||
endi
|
||||
if $data(db)[4] != 1 then
|
||||
if $data(db)[4] != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -82,7 +82,7 @@ step3:
|
|||
return -1
|
||||
endi
|
||||
sql select * from information_schema.ins_dnodes
|
||||
print ===> rows: $rows
|
||||
print ===> rows: $rows
|
||||
print ===> $data00 $data01 $data02 $data03 $data04 $data05
|
||||
print ===> $data10 $data11 $data12 $data13 $data14 $data15
|
||||
print ===> $data20 $data21 $data22 $data23 $data24 $data25
|
||||
|
@ -115,7 +115,7 @@ step4:
|
|||
return -1
|
||||
endi
|
||||
sql show db.vgroups
|
||||
print ===> rows: $rows
|
||||
print ===> rows: $rows
|
||||
print ===> $data00 $data01 $data02 $data03 $data04 $data05
|
||||
if $data[0][4] != leader then
|
||||
goto step4
|
||||
|
@ -137,4 +137,4 @@ 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 dnode4 -s stop -x SIGINT
|
||||
|
|
|
@ -23,7 +23,7 @@ step1:
|
|||
return -1
|
||||
endi
|
||||
sql select * from information_schema.ins_dnodes
|
||||
print ===> rows: $rows
|
||||
print ===> rows: $rows
|
||||
print ===> $data00 $data01 $data02 $data03 $data04 $data05
|
||||
print ===> $data10 $data11 $data12 $data13 $data14 $data15
|
||||
print ===> $data20 $data21 $data22 $data23 $data24 $data25
|
||||
|
@ -47,10 +47,10 @@ endi
|
|||
print =============== step2: create database
|
||||
sql create database db vgroups 1 replica 3
|
||||
sql select * from information_schema.ins_databases
|
||||
if $rows != 3 then
|
||||
if $rows != 3 then
|
||||
return -1
|
||||
endi
|
||||
if $data(db)[4] != 3 then
|
||||
if $data(db)[4] != 3 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -139,7 +139,7 @@ step3:
|
|||
return -1
|
||||
endi
|
||||
sql show db.vgroups
|
||||
print ===> rows: $rows
|
||||
print ===> rows: $rows
|
||||
if $rows != 1 then
|
||||
goto step3
|
||||
endi
|
||||
|
@ -165,4 +165,4 @@ 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 dnode4 -s stop -x SIGINT
|
||||
|
|
|
@ -2,8 +2,8 @@ sql connect
|
|||
$x = 1
|
||||
begin:
|
||||
sql reset query cache
|
||||
sleep 100
|
||||
sql insert into db.tb values(now, $x ) -x begin
|
||||
#print ===> insert successed $x
|
||||
$x = $x + 1
|
||||
goto begin
|
||||
sleep 100
|
||||
sql insert into db.tb values(now, $x ) -x begin
|
||||
#print ===> insert successed $x
|
||||
$x = $x + 1
|
||||
goto begin
|
||||
|
|
|
@ -25,15 +25,15 @@ endi
|
|||
print =============== show vgroups1
|
||||
sql use d1
|
||||
sql show vgroups
|
||||
if $rows != 2 then
|
||||
if $rows != 2 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 != 2 then
|
||||
if $data00 != 2 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data10 != 3 then
|
||||
if $data10 != 3 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -59,11 +59,11 @@ if $rows != 2 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
if $data00 != 4 then
|
||||
if $data00 != 4 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data10 != 5 then
|
||||
if $data10 != 5 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -73,15 +73,15 @@ if $rows != 3 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
if $data00 != 6 then
|
||||
if $data00 != 6 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data10 != 7 then
|
||||
if $data10 != 7 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data20 != 8 then
|
||||
if $data20 != 8 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -91,19 +91,19 @@ if $rows != 4 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
if $data00 != 9 then
|
||||
if $data00 != 9 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data10 != 10 then
|
||||
if $data10 != 10 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data20 != 11 then
|
||||
if $data20 != 11 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data30 != 12 then
|
||||
if $data30 != 12 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ sql create table t3 (ts timestamp, i int);
|
|||
sql create table t4 (ts timestamp, i int);
|
||||
|
||||
sql select * from information_schema.ins_databases
|
||||
print rows: $rows
|
||||
print rows: $rows
|
||||
print $data00 $data01 $data02 $data03
|
||||
print $data10 $data11 $data12 $data13
|
||||
if $rows != 3 then
|
||||
|
@ -47,7 +47,7 @@ endi
|
|||
#endi
|
||||
|
||||
sql show tables
|
||||
if $rows != 4 then
|
||||
if $rows != 4 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -64,8 +64,8 @@ if $rows != 4 then
|
|||
endi
|
||||
|
||||
sql show tables
|
||||
if $rows != 3 then
|
||||
if $rows != 3 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -23,12 +23,12 @@ if $data22 != 2 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
#if $data03 != 4 then
|
||||
#if $data03 != 4 then
|
||||
# return -1
|
||||
#endi
|
||||
|
||||
sql show d1.tables
|
||||
if $rows != 4 then
|
||||
if $rows != 4 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -44,8 +44,8 @@ if $rows != 4 then
|
|||
endi
|
||||
|
||||
sql show d2.tables
|
||||
if $rows != 3 then
|
||||
if $rows != 3 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -11,109 +11,109 @@ sql create table d1.t3 (ts timestamp, i int);
|
|||
sql create table d1.t4 (ts timestamp, i int);
|
||||
|
||||
sql select * from information_schema.ins_databases
|
||||
if $rows != 3 then
|
||||
if $rows != 3 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data20 != d1 then
|
||||
if $data20 != d1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data22 != 1 then
|
||||
if $data22 != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data24 != 1 then
|
||||
if $data24 != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql show d1.tables
|
||||
if $rows != 4 then
|
||||
if $rows != 4 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql show d1.vgroups
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
if $data00 != 2 then
|
||||
if $data00 != 2 then
|
||||
return -1
|
||||
endi
|
||||
if $data01 != d1 then
|
||||
if $data01 != d1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print =============== drop table
|
||||
print =============== drop table
|
||||
sql drop table d1.t1
|
||||
|
||||
sql select * from information_schema.ins_databases
|
||||
if $rows != 3 then
|
||||
if $rows != 3 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data20 != d1 then
|
||||
if $data20 != d1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data22 != 1 then
|
||||
if $data22 != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data24 != 1 then
|
||||
if $data24 != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql show d1.tables
|
||||
if $rows != 3 then
|
||||
if $rows != 3 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql show d1.vgroups
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
if $data00 != 2 then
|
||||
if $data00 != 2 then
|
||||
return -1
|
||||
endi
|
||||
if $data01 != d1 then
|
||||
if $data01 != d1 then
|
||||
return -1
|
||||
endi
|
||||
print =============== drop all table
|
||||
print =============== drop all table
|
||||
sql drop table d1.t2
|
||||
sql drop table d1.t3
|
||||
sql drop table d1.t4
|
||||
|
||||
sql select * from information_schema.ins_databases
|
||||
if $rows != 3 then
|
||||
if $rows != 3 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data20 != d1 then
|
||||
if $data20 != d1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data22 != 1 then
|
||||
if $data22 != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data24 != 1 then
|
||||
if $data24 != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql show d1.tables
|
||||
if $rows != 0 then
|
||||
if $rows != 0 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql show d1.vgroups
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
if $data00 != 2 then
|
||||
if $data00 != 2 then
|
||||
return -1
|
||||
endi
|
||||
if $data01 != d1 then
|
||||
if $data01 != d1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -13,13 +13,13 @@ sql create table tb1 using st1 tags(1);
|
|||
sql insert into tb1 values (now, 1);
|
||||
|
||||
sql show stables
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
print $rows
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql show tables
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -35,12 +35,12 @@ sql use db1;
|
|||
sql create stable st1 (ts timestamp, f1 int) tags(t1 int)
|
||||
|
||||
sql show stables
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql show tables
|
||||
if $rows != 0 then
|
||||
if $rows != 0 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ $st = $stPrefix . $i
|
|||
$tb = $tbPrefix . $i
|
||||
|
||||
print =============== step1
|
||||
# quorum presicion
|
||||
# quorum presicion
|
||||
sql create database $db vgroups 8 replica 1 duration 2 keep 10 minrows 80 maxrows 10000 wal_level 2 wal_fsync_period 1000 comp 0 cachemodel 'last_value' precision 'us'
|
||||
sql select * from information_schema.ins_databases
|
||||
print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09
|
||||
|
@ -46,7 +46,7 @@ endi
|
|||
#if $data29 != 12 then
|
||||
# return -1
|
||||
#endi
|
||||
|
||||
|
||||
print =============== step2
|
||||
sql_error create database $db
|
||||
sql create database if not exists $db
|
||||
|
@ -60,7 +60,7 @@ sql drop database $db
|
|||
sql select * from information_schema.ins_databases
|
||||
if $rows != 2 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
|
||||
print =============== step4
|
||||
sql_error drop database $db
|
||||
|
@ -102,22 +102,22 @@ while $i < 5
|
|||
sql create table $tb using $st tags(1)
|
||||
|
||||
sql show stables
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print $data00 $data01 $data02 $data03
|
||||
if $data00 != $st then
|
||||
if $data00 != $st then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql show tables
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print $data00 $data01 $data02 $data03
|
||||
if $data00 != $tb then
|
||||
if $data00 != $tb then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -127,8 +127,8 @@ endw
|
|||
print =============== step7
|
||||
$i = 0
|
||||
while $i < 5
|
||||
$db = $dbPrefix . $i
|
||||
sql drop database $db
|
||||
$db = $dbPrefix . $i
|
||||
sql drop database $db
|
||||
$i = $i + 1
|
||||
endw
|
||||
|
||||
|
@ -143,20 +143,20 @@ sql create table $st (ts timestamp, i int) tags (j int)
|
|||
sql create table $tb using $st tags(1)
|
||||
|
||||
sql show stables
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 != $st then
|
||||
if $data00 != $st then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql show tables
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 != $tb then
|
||||
if $data00 != $tb then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -168,12 +168,12 @@ sql create database $db
|
|||
sql use $db
|
||||
|
||||
sql show stables
|
||||
if $rows != 0 then
|
||||
if $rows != 0 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql show tables
|
||||
if $rows != 0 then
|
||||
if $rows != 0 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -182,20 +182,20 @@ sql create table $st (ts timestamp, i int) tags (j int)
|
|||
sql create table $tb using $st tags(1)
|
||||
|
||||
sql show stables
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 != $st then
|
||||
if $data00 != $st then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql show tables
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 != $tb then
|
||||
if $data00 != $tb then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -207,12 +207,12 @@ sql create database $db
|
|||
sql use $db
|
||||
|
||||
sql show stables
|
||||
if $rows != 0 then
|
||||
if $rows != 0 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql show tables
|
||||
if $rows != 0 then
|
||||
if $rows != 0 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -221,20 +221,20 @@ sql create table $st (ts timestamp, i int) tags (j int)
|
|||
sql create table $tb using $st tags(1)
|
||||
|
||||
sql show stables
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 != $st then
|
||||
if $data00 != $st then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql show tables
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 != $tb then
|
||||
if $data00 != $tb then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -245,12 +245,12 @@ sql insert into $tb values (now+4a, 3)
|
|||
sql insert into $tb values (now+5a, 4)
|
||||
|
||||
sql select * from $tb
|
||||
if $rows != 5 then
|
||||
if $rows != 5 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select * from $st
|
||||
if $rows != 5 then
|
||||
if $rows != 5 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -262,12 +262,12 @@ sql create database $db
|
|||
sql use $db
|
||||
|
||||
sql show stables
|
||||
if $rows != 0 then
|
||||
if $rows != 0 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql show tables
|
||||
if $rows != 0 then
|
||||
if $rows != 0 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -276,20 +276,20 @@ sql create table $st (ts timestamp, i int) tags (j int)
|
|||
sql create table $tb using $st tags(1)
|
||||
|
||||
sql show stables
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 != $st then
|
||||
if $data00 != $st then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql show tables
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 != $tb then
|
||||
if $data00 != $tb then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -300,12 +300,12 @@ sql insert into $tb values (now+4a, 3)
|
|||
sql insert into $tb values (now+5a, 4)
|
||||
|
||||
sql select * from $tb
|
||||
if $rows != 5 then
|
||||
if $rows != 5 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select * from $st
|
||||
if $rows != 5 then
|
||||
if $rows != 5 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
|
|
@ -39,9 +39,9 @@ sql create table tb (ts timestamp, i int)
|
|||
$x = 1
|
||||
while $x < 41
|
||||
$time = $x . m
|
||||
sql insert into tb values (now + $time , $x )
|
||||
sql insert into tb values (now + $time , $x )
|
||||
$x = $x + 1
|
||||
endw
|
||||
endw
|
||||
|
||||
sql select * from tb order by ts desc
|
||||
print ===> rows $rows
|
||||
|
@ -71,7 +71,7 @@ if $data01 != 40 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
$oldnum = $rows
|
||||
$oldnum = $rows
|
||||
$num = $rows + 2
|
||||
|
||||
print ======== step3 import old data
|
||||
|
@ -120,4 +120,4 @@ if $data01 != 40 then
|
|||
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 dnode2 -s stop -x SIGINT
|
||||
|
|
|
@ -3,7 +3,7 @@ system sh/deploy.sh -n dnode1 -i 1
|
|||
system sh/exec.sh -n dnode1 -s start
|
||||
sql connect
|
||||
|
||||
print ======== step1
|
||||
print ======== step1
|
||||
sql create database d1 replica 1 vgroups 1
|
||||
sql create database d2 replica 1 vgroups 1
|
||||
sql create database d3 replica 1 vgroups 1
|
||||
|
@ -47,7 +47,7 @@ step2:
|
|||
|
||||
print ========= step3
|
||||
sql reset query cache
|
||||
sleep 50
|
||||
sleep 50
|
||||
|
||||
sql create database d1 replica 1
|
||||
sql create table d1.t1 (ts timestamp, i int)
|
||||
|
@ -65,20 +65,20 @@ while $x < 20
|
|||
sql insert into d1.t1 values(now, -1) -x step4
|
||||
return -1
|
||||
step4:
|
||||
|
||||
|
||||
sql create database d1 replica 1
|
||||
sql reset query cache
|
||||
sleep 50
|
||||
sleep 50
|
||||
sql create table d1.t1 (ts timestamp, i int)
|
||||
sql insert into d1.t1 values(now, $x )
|
||||
sql select * from d1.t1
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
$x = $x + 1
|
||||
|
||||
print ===> loop times: $x
|
||||
endw
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
$x = $x + 1
|
||||
|
||||
print ===> loop times: $x
|
||||
endw
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -3,7 +3,7 @@ system sh/deploy.sh -n dnode1 -i 1
|
|||
system sh/exec.sh -n dnode1 -s start
|
||||
sql connect
|
||||
|
||||
print ======== step1
|
||||
print ======== step1
|
||||
sql create database d1 replica 1
|
||||
sql create database d2 replica 1
|
||||
sql create database d3 replica 1
|
||||
|
@ -48,7 +48,7 @@ step2:
|
|||
print ========= step3
|
||||
sql create database db1 replica 1
|
||||
sql reset query cache
|
||||
sleep 50
|
||||
sleep 50
|
||||
|
||||
sql create table db1.tb1 (ts timestamp, i int)
|
||||
sql insert into db1.tb1 values(now, 2)
|
||||
|
@ -61,7 +61,7 @@ print ========= step4
|
|||
$x = 1
|
||||
while $x < 20
|
||||
|
||||
$db = db . $x
|
||||
$db = db . $x
|
||||
$tb = tb . $x
|
||||
sql use $db
|
||||
sql drop database $db
|
||||
|
@ -69,14 +69,14 @@ while $x < 20
|
|||
sql insert into $tb values(now, -1) -x step4
|
||||
return -1
|
||||
step4:
|
||||
|
||||
$x = $x + 1
|
||||
$db = db . $x
|
||||
|
||||
$x = $x + 1
|
||||
$db = db . $x
|
||||
$tb = tb . $x
|
||||
|
||||
|
||||
sql reset query cache
|
||||
sleep 50
|
||||
|
||||
sleep 50
|
||||
|
||||
sql create database $db replica 1
|
||||
sql use $db
|
||||
sql create table $tb (ts timestamp, i int)
|
||||
|
@ -85,8 +85,8 @@ while $x < 20
|
|||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print ===> loop times: $x
|
||||
endw
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
print ===> loop times: $x
|
||||
endw
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -3,7 +3,7 @@ system sh/deploy.sh -n dnode1 -i 1
|
|||
system sh/exec.sh -n dnode1 -s start
|
||||
sql connect
|
||||
|
||||
print ======== step1
|
||||
print ======== step1
|
||||
|
||||
$tbPrefix = t
|
||||
$i = 0
|
||||
|
@ -21,13 +21,13 @@ while $i < 30
|
|||
print times $i
|
||||
$i = $i + 1
|
||||
|
||||
endw
|
||||
endw
|
||||
|
||||
print ======== step2
|
||||
sql select * from information_schema.ins_databases
|
||||
if $rows != 2 then
|
||||
if $rows != 2 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
|
||||
system sh/stop_dnodes.sh
|
||||
|
||||
|
@ -94,4 +94,4 @@ if $rows != 2 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -62,4 +62,4 @@ if $rows != 2 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -3,7 +3,7 @@ system sh/deploy.sh -n dnode1 -i 1
|
|||
system sh/exec.sh -n dnode1 -s start
|
||||
sql connect
|
||||
|
||||
sql create database db
|
||||
sql create database db
|
||||
sql create table db.tb (ts timestamp, i int)
|
||||
sql insert into db.tb values(now, 1)
|
||||
|
||||
|
@ -11,18 +11,18 @@ print ======== start back
|
|||
run_back tsim/db/back_insert.sim
|
||||
sleep 1000
|
||||
|
||||
print ======== step1
|
||||
$x = 1
|
||||
print ======== step1
|
||||
$x = 1
|
||||
while $x < 10
|
||||
|
||||
print drop database times $x
|
||||
sql drop database if exists db
|
||||
sql create database db
|
||||
sql create database db
|
||||
sql create table db.tb (ts timestamp, i int)
|
||||
|
||||
sleep 1000
|
||||
|
||||
|
||||
$x = $x + 1
|
||||
endw
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -3,7 +3,7 @@ system sh/deploy.sh -n dnode1 -i 1
|
|||
system sh/exec.sh -n dnode1 -s start
|
||||
sql connect
|
||||
|
||||
sql create database db
|
||||
sql create database db
|
||||
sql create table db.tb (ts timestamp, i int)
|
||||
sql insert into db.tb values(now, 1)
|
||||
|
||||
|
@ -11,11 +11,11 @@ sql create database db2
|
|||
sql create table db2.tb2 (ts timestamp, i int)
|
||||
sql insert into db2.tb2 values(now, 1)
|
||||
|
||||
sql create database db3
|
||||
sql create database db3
|
||||
sql create table db3.tb3 (ts timestamp, i int)
|
||||
sql insert into db3.tb3 values(now, 1)
|
||||
|
||||
sql create database db4
|
||||
sql create database db4
|
||||
sql create table db4.tb4 (ts timestamp, i int)
|
||||
sql insert into db4.tb4 values(now, 1)
|
||||
|
||||
|
@ -23,19 +23,19 @@ print ======== start back
|
|||
run_back tsim/db/back_insert.sim
|
||||
sleep 1000
|
||||
|
||||
print ======== step1
|
||||
$x = 1
|
||||
print ======== step1
|
||||
$x = 1
|
||||
while $x < 10
|
||||
|
||||
print drop database times $x
|
||||
sql drop database if exists db
|
||||
|
||||
sql create database db
|
||||
sql create database db
|
||||
sql create table db.tb (ts timestamp, i int)
|
||||
|
||||
sleep 1000
|
||||
|
||||
|
||||
$x = $x + 1
|
||||
endw
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -12,7 +12,7 @@ system sh/exec.sh -n dnode1 -s start
|
|||
system sh/exec.sh -n dnode2 -s start
|
||||
|
||||
sleep 2000
|
||||
sql connect
|
||||
sql connect
|
||||
|
||||
sql create dnode $hostname2
|
||||
sleep 2000
|
||||
|
@ -61,13 +61,13 @@ sql show tables
|
|||
print $rows
|
||||
if $rows != 16 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
|
||||
sql select * from mt
|
||||
print $rows
|
||||
if $rows != 16 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
|
||||
print ========== step3
|
||||
|
||||
|
@ -82,26 +82,26 @@ sql show tables
|
|||
print $rows
|
||||
if $rows != 8 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
|
||||
sql select * from mt
|
||||
print $rows
|
||||
if $rows != 8 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
|
||||
sql select * from db.t5
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
|
||||
sql select * from db.t13
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
|
||||
sql_error select * from db.t1
|
||||
sql_error select * from db.t9
|
||||
|
||||
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 dnode2 -s stop -x SIGINT
|
||||
|
|
|
@ -14,7 +14,7 @@ while $x < 41
|
|||
sql insert into tb values (now - $time , $x ) -x step2
|
||||
step2:
|
||||
$x = $x + 1
|
||||
endw
|
||||
endw
|
||||
|
||||
sql select * from tb
|
||||
print ===> rows $rows last $data01
|
||||
|
@ -42,10 +42,10 @@ sql alter database keepdb keep 60
|
|||
sql flush database keepdb
|
||||
sql select * from information_schema.ins_databases
|
||||
print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07
|
||||
if $data22 != 2 then
|
||||
if $data22 != 2 then
|
||||
return -1
|
||||
endi
|
||||
if $data27 != 86400m,86400m,86400m then
|
||||
if $data27 != 86400m,86400m,86400m then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -56,7 +56,7 @@ while $x < 81
|
|||
sql insert into tb values (now - $time , $x ) -x step4
|
||||
step4:
|
||||
$x = $x + 1
|
||||
endw
|
||||
endw
|
||||
|
||||
sql select * from tb
|
||||
print ===> rows $rows last $data01
|
||||
|
@ -83,10 +83,10 @@ endi
|
|||
print ======== step6 alter db
|
||||
sql alter database keepdb keep 30
|
||||
sql select * from information_schema.ins_databases
|
||||
if $data22 != 2 then
|
||||
if $data22 != 2 then
|
||||
return -1
|
||||
endi
|
||||
if $data27 != 43200m,43200m,43200m then
|
||||
if $data27 != 43200m,43200m,43200m then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -110,7 +110,7 @@ while $x < 121
|
|||
sql insert into tb values (now - $time , $x ) -x step8
|
||||
step8:
|
||||
$x = $x + 1
|
||||
endw
|
||||
endw
|
||||
|
||||
sql select * from tb
|
||||
print ===> rows $rows last $data01
|
||||
|
@ -137,4 +137,4 @@ error3:
|
|||
print ======= test success
|
||||
|
||||
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 dnode2 -s stop -x SIGINT
|
||||
|
|
|
@ -11,33 +11,33 @@ sql create database -x step1
|
|||
step1:
|
||||
|
||||
sql select * from information_schema.ins_databases
|
||||
if $rows != 2 then
|
||||
if $rows != 2 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print =============== step2
|
||||
sql create database a
|
||||
sql select * from information_schema.ins_databases
|
||||
if $rows != 3 then
|
||||
if $rows != 3 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql drop database a
|
||||
sql select * from information_schema.ins_databases
|
||||
if $rows != 2 then
|
||||
if $rows != 2 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print =============== step3
|
||||
sql create database a12345678
|
||||
sql select * from information_schema.ins_databases
|
||||
if $rows != 3 then
|
||||
if $rows != 3 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql drop database a12345678
|
||||
sql select * from information_schema.ins_databases
|
||||
if $rows != 2 then
|
||||
if $rows != 2 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -46,15 +46,15 @@ sql create database a012345678901201234567890120123456789012a0123456789012012345
|
|||
return -1
|
||||
step4:
|
||||
sql select * from information_schema.ins_databases
|
||||
if $rows != 2 then
|
||||
if $rows != 2 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print =============== step5
|
||||
sql create database a;1
|
||||
sql create database a;1
|
||||
sql drop database a
|
||||
sql select * from information_schema.ins_databases
|
||||
if $rows != 2 then
|
||||
if $rows != 2 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -64,7 +64,7 @@ sql create database a'1 -x step6
|
|||
step6:
|
||||
|
||||
sql select * from information_schema.ins_databases
|
||||
if $rows != 2 then
|
||||
if $rows != 2 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -73,7 +73,7 @@ sql create database (a) -x step7
|
|||
return -1
|
||||
step7:
|
||||
sql select * from information_schema.ins_databases
|
||||
if $rows != 2 then
|
||||
if $rows != 2 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -82,8 +82,8 @@ sql create database a.1 -x step8
|
|||
return -1
|
||||
step8:
|
||||
sql select * from information_schema.ins_databases
|
||||
if $rows != 2 then
|
||||
if $rows != 2 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -56,4 +56,4 @@ sql drop database d10
|
|||
sql drop database d11
|
||||
sql drop database d12
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -7,7 +7,7 @@ print =============== step2
|
|||
sql create database db
|
||||
sql show create database db
|
||||
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -15,13 +15,13 @@ print =============== step3
|
|||
sql use db
|
||||
sql show create database db
|
||||
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data00 != db then
|
||||
if $data00 != db then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
|
||||
sql drop database db
|
||||
|
||||
|
|
|
@ -11,14 +11,14 @@ sql create table t0 using meters tags(1,'ch')
|
|||
sql create table normalTbl(ts timestamp, zone binary(8))
|
||||
|
||||
sql use db
|
||||
sql show create table meters
|
||||
if $rows != 1 then
|
||||
sql show create table meters
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print ===============check sub table
|
||||
sql show create table t0
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
if $data00 == 't0' then
|
||||
|
@ -27,8 +27,8 @@ endi
|
|||
|
||||
print ===============check normal table
|
||||
|
||||
sql show create table normalTbl
|
||||
if $rows != 1 then
|
||||
sql show create table normalTbl
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -37,8 +37,8 @@ if $data00 == 'normalTbl' then
|
|||
endi
|
||||
|
||||
print ===============check super table
|
||||
sql show create table meters
|
||||
if $rows != 1 then
|
||||
sql show create table meters
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -49,7 +49,7 @@ endi
|
|||
print ===============check sub table with prefix
|
||||
|
||||
sql show create table db.t0
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -58,8 +58,8 @@ if $data00 == 't0' then
|
|||
endi
|
||||
|
||||
print ===============check normal table with prefix
|
||||
sql show create table db.normalTbl
|
||||
if $rows != 1 then
|
||||
sql show create table db.normalTbl
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -69,8 +69,8 @@ endi
|
|||
|
||||
|
||||
print ===============check super table with prefix
|
||||
sql show create table db.meters
|
||||
if $rows != 1 then
|
||||
sql show create table db.meters
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ sql create database db
|
|||
sql select * from information_schema.ins_databases
|
||||
print $rows $data07
|
||||
|
||||
if $rows != 3 then
|
||||
if $rows != 3 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -125,4 +125,4 @@ if $data01 != 4 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
Loading…
Reference in New Issue