fix(query): fix test cases
This commit is contained in:
parent
01089ec65f
commit
2ec9042a99
|
@ -25,18 +25,18 @@ $i = 0
|
||||||
while $i < $tbNum
|
while $i < $tbNum
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql create table $tb using $mt tags( $i )
|
sql create table $tb using $mt tags( $i )
|
||||||
|
|
||||||
$x = 0
|
$x = 0
|
||||||
while $x < $rowNum
|
while $x < $rowNum
|
||||||
$cc = $x * 60000
|
$cc = $x * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql insert into $tb values ($ms , $x )
|
sql insert into $tb values ($ms , $x )
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
|
@ -44,7 +44,7 @@ $tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql select avg(tbcol) from $tb
|
sql select avg(tbcol) from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 9.500000000 then
|
if $data00 != 9.500000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -53,27 +53,27 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select avg(tbcol) from $tb where ts <= $ms
|
sql select avg(tbcol) from $tb where ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 2.000000000 then
|
if $data00 != 2.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql select avg(tbcol) as b from $tb
|
sql select avg(tbcol) as b from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 9.500000000 then
|
if $data00 != 9.500000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql select avg(tbcol) as b from $tb interval(1m)
|
sql select avg(tbcol) as b from $tb interval(1m)
|
||||||
print ===> $data01
|
print ===> $data01
|
||||||
if $data10 != 1.000000000 then
|
if $data10 != 1.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select avg(tbcol) as b from $tb interval(1d)
|
sql select avg(tbcol) as b from $tb interval(1d)
|
||||||
print ===> $data01
|
print ===> $data01
|
||||||
if $data00 != 9.500000000 then
|
if $data00 != 9.500000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -82,17 +82,17 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select avg(tbcol) as b from $tb where ts <= $ms interval(1m)
|
sql select avg(tbcol) as b from $tb where ts <= $ms interval(1m)
|
||||||
print ===> $data01
|
print ===> $data01
|
||||||
if $data40 != 4.000000000 then
|
if $data40 != 4.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows != 5 then
|
if $rows != 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step7
|
print =============== step7
|
||||||
sql select avg(tbcol) from $mt
|
sql select avg(tbcol) from $mt
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 9.500000000 then
|
if $data00 != 9.500000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -101,13 +101,13 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select avg(tbcol) as c from $mt where ts <= $ms
|
sql select avg(tbcol) as c from $mt where ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 2.000000000 then
|
if $data00 != 2.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select avg(tbcol) as c from $mt where tgcol < 5
|
sql select avg(tbcol) as c from $mt where tgcol < 5
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 9.500000000 then
|
if $data00 != 9.500000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -115,31 +115,31 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select avg(tbcol) as c from $mt where tgcol < 5 and ts <= $ms
|
sql select avg(tbcol) as c from $mt where tgcol < 5 and ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 2.000000000 then
|
if $data00 != 2.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step9
|
print =============== step9
|
||||||
sql select avg(tbcol) as b from $mt interval(1m)
|
sql select avg(tbcol) as b from $mt interval(1m)
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1.000000000 then
|
if $data10 != 1.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select avg(tbcol) as b from $mt interval(1d)
|
sql select avg(tbcol) as b from $mt interval(1d)
|
||||||
print ===> $data01
|
print ===> $data01
|
||||||
if $data00 != 9.500000000 then
|
if $data00 != 9.500000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step10
|
print =============== step10
|
||||||
sql select avg(tbcol) as b from $mt group by tgcol
|
sql select avg(tbcol) as b from $mt group by tgcol
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 9.500000000 then
|
if $data00 != 9.500000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
if $rows != $tbNum then
|
if $rows != $tbNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -148,18 +148,18 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select avg(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1m)
|
sql select avg(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1m)
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1.000000000 then
|
if $data10 != 1.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows != 50 then
|
if $rows != 50 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql select * from information_schema.ins_databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
|
@ -27,25 +27,25 @@ $i = 0
|
||||||
while $i < $tbNum
|
while $i < $tbNum
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql create table $tb using $mt tags( $i )
|
sql create table $tb using $mt tags( $i )
|
||||||
|
|
||||||
$x = 0
|
$x = 0
|
||||||
while $x < $rowNum
|
while $x < $rowNum
|
||||||
$cc = $x * 60000
|
$cc = $x * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql insert into $tb values ($ms , $x )
|
sql insert into $tb values ($ms , $x )
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
sql create table $nt (ts timestamp, tbcol int)
|
sql create table $nt (ts timestamp, tbcol int)
|
||||||
$x = 0
|
$x = 0
|
||||||
while $x < $rowNum
|
while $x < $rowNum
|
||||||
$cc = $x * 60000
|
$cc = $x * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql insert into $nt values ($ms , $x )
|
sql insert into $nt values ($ms , $x )
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
sql flush database $db
|
sql flush database $db
|
||||||
|
@ -94,7 +94,7 @@ sql_error select _block_dist() from (select * from $mt)
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql select * from information_schema.ins_databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
|
|
@ -25,18 +25,18 @@ $i = 0
|
||||||
while $i < $tbNum
|
while $i < $tbNum
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql create table $tb using $mt tags( $i )
|
sql create table $tb using $mt tags( $i )
|
||||||
|
|
||||||
$x = 0
|
$x = 0
|
||||||
while $x < $rowNum
|
while $x < $rowNum
|
||||||
$cc = $x * 60000
|
$cc = $x * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql insert into $tb values ($ms , $x )
|
sql insert into $tb values ($ms , $x )
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
|
@ -44,7 +44,7 @@ $tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql select bottom(tbcol, 1) from $tb
|
sql select bottom(tbcol, 1) from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -53,24 +53,24 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select bottom(tbcol, 1) from $tb where ts > $ms
|
sql select bottom(tbcol, 1) from $tb where ts > $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 5 then
|
if $data00 != 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql select bottom(tbcol, 1) as b from $tb
|
sql select bottom(tbcol, 1) as b from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql select bottom(tbcol, 2) as b from $tb
|
sql select bottom(tbcol, 2) as b from $tb
|
||||||
print ===> $data00 $data10
|
print ===> $data00 $data10
|
||||||
if $data00 != 1 then
|
if $data00 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data10 != 0 then
|
if $data10 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -79,10 +79,10 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select bottom(tbcol, 2) as b from $tb where ts > $ms
|
sql select bottom(tbcol, 2) as b from $tb where ts > $ms
|
||||||
print ===> $data00 $data10
|
print ===> $data00 $data10
|
||||||
if $data00 != 6 then
|
if $data00 != 6 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data10 != 5 then
|
if $data10 != 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -93,8 +93,8 @@ step6:
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql select * from information_schema.ins_databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
|
@ -25,18 +25,18 @@ $i = 0
|
||||||
while $i < $tbNum
|
while $i < $tbNum
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql create table $tb using $mt tags( $i )
|
sql create table $tb using $mt tags( $i )
|
||||||
|
|
||||||
$x = 0
|
$x = 0
|
||||||
while $x < $rowNum
|
while $x < $rowNum
|
||||||
$cc = $x * 60000
|
$cc = $x * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql insert into $tb values ($ms , $x )
|
sql insert into $tb values ($ms , $x )
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
|
@ -44,19 +44,19 @@ $tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql select count(*) from $tb
|
sql select count(*) from $tb
|
||||||
print ===> select count(*) from $tb => $data00
|
print ===> select count(*) from $tb => $data00
|
||||||
if $data00 != $rowNum then
|
if $data00 != $rowNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select count(1) from $tb
|
sql select count(1) from $tb
|
||||||
print ===> select count(1) from $tb => $data00
|
print ===> select count(1) from $tb => $data00
|
||||||
if $data00 != $rowNum then
|
if $data00 != $rowNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select count(tbcol) from $tb
|
sql select count(tbcol) from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != $rowNum then
|
if $data00 != $rowNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -65,27 +65,27 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select count(tbcol) from $tb where ts <= $ms
|
sql select count(tbcol) from $tb where ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 5 then
|
if $data00 != 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql select count(tbcol) as b from $tb
|
sql select count(tbcol) as b from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != $rowNum then
|
if $data00 != $rowNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql select count(tbcol) as b from $tb interval(1m)
|
sql select count(tbcol) as b from $tb interval(1m)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 1 then
|
if $data00 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select count(tbcol) as b from $tb interval(1d)
|
sql select count(tbcol) as b from $tb interval(1d)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != $rowNum then
|
if $data00 != $rowNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -94,30 +94,30 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select count(tbcol) as b from $tb where ts <= $ms interval(1m)
|
sql select count(tbcol) as b from $tb where ts <= $ms interval(1m)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 1 then
|
if $data00 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows != 5 then
|
if $rows != 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step7
|
print =============== step7
|
||||||
sql select count(*) from $mt
|
sql select count(*) from $mt
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != $totalNum then
|
if $data00 != $totalNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step8
|
print =============== step8
|
||||||
sql select count(1) from $mt
|
sql select count(1) from $mt
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != $totalNum then
|
if $data00 != $totalNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select count(tbcol) from $mt
|
sql select count(tbcol) from $mt
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != $totalNum then
|
if $data00 != $totalNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -126,13 +126,13 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select count(tbcol) as c from $mt where ts <= $ms
|
sql select count(tbcol) as c from $mt where ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 50 then
|
if $data00 != 50 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select count(tbcol) as c from $mt where tgcol < 5
|
sql select count(tbcol) as c from $mt where tgcol < 5
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 100 then
|
if $data00 != 100 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -140,34 +140,34 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select count(tbcol) as c from $mt where tgcol < 5 and ts <= $ms
|
sql select count(tbcol) as c from $mt where tgcol < 5 and ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 25 then
|
if $data00 != 25 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step9
|
print =============== step9
|
||||||
sql select count(tbcol) as b from $mt interval(1m)
|
sql select count(tbcol) as b from $mt interval(1m)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 10 then
|
if $data00 != 10 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data10 != 10 then
|
if $data10 != 10 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select count(tbcol) as b from $mt interval(1d)
|
sql select count(tbcol) as b from $mt interval(1d)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 200 then
|
if $data00 != 200 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step10
|
print =============== step10
|
||||||
sql select count(tbcol) as b from $mt group by tgcol
|
sql select count(tbcol) as b from $mt group by tgcol
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != $rowNum then
|
if $data00 != $rowNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
if $rows != $tbNum then
|
if $rows != $tbNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -176,17 +176,17 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select count(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1m)
|
sql select count(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1m)
|
||||||
print ===> $data01
|
print ===> $data01
|
||||||
if $data00 != 1 then
|
if $data00 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows != 50 then
|
if $rows != 50 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql select * from information_schema.ins_databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
|
|
@ -25,17 +25,17 @@ $i = 0
|
||||||
while $i < $tbNum
|
while $i < $tbNum
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql create table $tb using $mt tags( $i )
|
sql create table $tb using $mt tags( $i )
|
||||||
|
|
||||||
$x = 0
|
$x = 0
|
||||||
while $x < $rowNum
|
while $x < $rowNum
|
||||||
$cc = $x * 60000
|
$cc = $x * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql insert into $tb values ($ms , $x )
|
sql insert into $tb values ($ms , $x )
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
|
@ -43,7 +43,7 @@ $tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql select diff(tbcol) from $tb
|
sql select diff(tbcol) from $tb
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select diff(tbcol) from $tb where ts > $ms
|
sql select diff(tbcol) from $tb where ts > $ms
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -60,14 +60,14 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select diff(tbcol) from $tb where ts <= $ms
|
sql select diff(tbcol) from $tb where ts <= $ms
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql select diff(tbcol) as b from $tb
|
sql select diff(tbcol) as b from $tb
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -86,8 +86,8 @@ step6:
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql select * from information_schema.ins_databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
|
@ -26,19 +26,19 @@ $i = 0
|
||||||
while $i < $tbNum
|
while $i < $tbNum
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql create table $tb using $mt tags( $i )
|
sql create table $tb using $mt tags( $i )
|
||||||
|
|
||||||
$x = 0
|
$x = 0
|
||||||
while $x < $rowNum
|
while $x < $rowNum
|
||||||
$cc = $x * 60000
|
$cc = $x * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
$tinyint = $x / 128
|
$tinyint = $x / 128
|
||||||
sql insert into $tb values ($ms , $x , $x , $x , $x , $tinyint , $x , $x , $x , $x )
|
sql insert into $tb values ($ms , $x , $x , $x , $x , $tinyint , $x , $x , $x , $x )
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
|
@ -46,7 +46,7 @@ $tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql select diff(c1) from $tb
|
sql select diff(c1) from $tb
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql select diff(c2) from $tb
|
sql select diff(c2) from $tb
|
||||||
|
@ -56,22 +56,22 @@ if $data10 != 1.000000000 then
|
||||||
endi
|
endi
|
||||||
sql select diff(c3) from $tb
|
sql select diff(c3) from $tb
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql select diff(c4) from $tb
|
sql select diff(c4) from $tb
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql select diff(c5) from $tb
|
sql select diff(c5) from $tb
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 0 then
|
if $data10 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql select diff(c6) from $tb
|
sql select diff(c6) from $tb
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1.000000000 then
|
if $data10 != 1.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ sql_error select diff(c1) from m_di_tb1 where c2 like '2%'
|
||||||
print =============== step3
|
print =============== step3
|
||||||
sql select diff(c1) from $tb where c1 > 5
|
sql select diff(c1) from $tb where c1 > 5
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql select diff(c2) from $tb where c2 > 5
|
sql select diff(c2) from $tb where c2 > 5
|
||||||
|
@ -100,38 +100,38 @@ if $data10 != 1.000000000 then
|
||||||
endi
|
endi
|
||||||
sql select diff(c3) from $tb where c3 > 5
|
sql select diff(c3) from $tb where c3 > 5
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql select diff(c4) from $tb where c4 > 5
|
sql select diff(c4) from $tb where c4 > 5
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql select diff(c5) from $tb where c5 > 5
|
sql select diff(c5) from $tb where c5 > 5
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 0 then
|
if $data10 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql select diff(c6) from $tb where c6 > 5
|
sql select diff(c6) from $tb where c6 > 5
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1.000000000 then
|
if $data10 != 1.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql select diff(c1) from $tb where c1 > 5 and c2 < $rowNum
|
sql select diff(c1) from $tb where c1 > 5 and c2 < $rowNum
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select diff(c1) from $tb where c9 like '%9' and c1 <= 20
|
sql select diff(c1) from $tb where c9 like '%9' and c1 <= 20
|
||||||
if $rows != 1 then
|
if $rows != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data00 != 10 then
|
if $data00 != 10 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -148,8 +148,8 @@ step6:
|
||||||
print =============== clear
|
print =============== clear
|
||||||
#sql drop database $db
|
#sql drop database $db
|
||||||
#sql select * from information_schema.ins_databases
|
#sql select * from information_schema.ins_databases
|
||||||
#if $rows != 2 then
|
#if $rows != 2 then
|
||||||
# return -1
|
# return -1
|
||||||
#endi
|
#endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
|
@ -25,18 +25,18 @@ $i = 0
|
||||||
while $i < $tbNum
|
while $i < $tbNum
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql create table $tb using $mt tags( $i )
|
sql create table $tb using $mt tags( $i )
|
||||||
|
|
||||||
$x = 0
|
$x = 0
|
||||||
while $x < $rowNum
|
while $x < $rowNum
|
||||||
$cc = $x * 60000
|
$cc = $x * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql insert into $tb values ($ms , $x )
|
sql insert into $tb values ($ms , $x )
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
|
@ -44,7 +44,7 @@ $tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql select first(tbcol) from $tb
|
sql select first(tbcol) from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -53,27 +53,27 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select first(tbcol) from $tb where ts <= $ms
|
sql select first(tbcol) from $tb where ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql select first(tbcol) as b from $tb
|
sql select first(tbcol) as b from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql select first(tbcol) as b from $tb interval(1m)
|
sql select first(tbcol) as b from $tb interval(1m)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select first(tbcol) as b from $tb interval(1d)
|
sql select first(tbcol) as b from $tb interval(1d)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -82,17 +82,17 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select first(tbcol) as b from $tb where ts <= $ms interval(1m)
|
sql select first(tbcol) as b from $tb where ts <= $ms interval(1m)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data40 != 4 then
|
if $data40 != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows != 5 then
|
if $rows != 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step7
|
print =============== step7
|
||||||
sql select first(tbcol) from $mt
|
sql select first(tbcol) from $mt
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -101,13 +101,13 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select first(tbcol) as c from $mt where ts <= $ms
|
sql select first(tbcol) as c from $mt where ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select first(tbcol) as c from $mt where tgcol < 5
|
sql select first(tbcol) as c from $mt where tgcol < 5
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select first(tbcol) as c from $mt where tgcol < 5 and ts <= $ms
|
sql select first(tbcol) as c from $mt where tgcol < 5 and ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -123,24 +123,24 @@ print =============== step9
|
||||||
sql select first(tbcol) as b from $mt interval(1m)
|
sql select first(tbcol) as b from $mt interval(1m)
|
||||||
print select first(tbcol) as b from $mt interval(1m)
|
print select first(tbcol) as b from $mt interval(1m)
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select first(tbcol) as b from $mt interval(1d)
|
sql select first(tbcol) as b from $mt interval(1d)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step10
|
print =============== step10
|
||||||
sql select first(tbcol) as b from $mt group by tgcol
|
sql select first(tbcol) as b from $mt group by tgcol
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
if $rows != $tbNum then
|
if $rows != $tbNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -149,19 +149,19 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select first(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1m)
|
sql select first(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1m)
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
print ===> $rows
|
print ===> $rows
|
||||||
if $rows != 50 then
|
if $rows != 50 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql select * from information_schema.ins_databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
|
@ -25,18 +25,18 @@ $i = 0
|
||||||
while $i < $tbNum
|
while $i < $tbNum
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql create table $tb using $mt tags( $i )
|
sql create table $tb using $mt tags( $i )
|
||||||
|
|
||||||
$x = 0
|
$x = 0
|
||||||
while $x < $rowNum
|
while $x < $rowNum
|
||||||
$cc = $x * 60000
|
$cc = $x * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql insert into $tb values ($ms , $x )
|
sql insert into $tb values ($ms , $x )
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
|
@ -44,13 +44,13 @@ $tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb interval(1m)
|
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb interval(1m)
|
||||||
print ===> $rows
|
print ===> $rows
|
||||||
if $rows < $rowNum then
|
if $rows < $rowNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data00 != 1 then
|
if $data00 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data04 != 1 then
|
if $data04 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -59,16 +59,16 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms interval(1m)
|
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms interval(1m)
|
||||||
print ===> $rows
|
print ===> $rows
|
||||||
if $rows > 10 then
|
if $rows > 10 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows < 3 then
|
if $rows < 3 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data00 != 1 then
|
if $data00 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data04 != 1 then
|
if $data04 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -81,16 +81,16 @@ $ms2 = 1601481600000 - $cc
|
||||||
|
|
||||||
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms and ts > $ms2 interval(1m)
|
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms and ts > $ms2 interval(1m)
|
||||||
print ===> $rows
|
print ===> $rows
|
||||||
if $rows < 18 then
|
if $rows < 18 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows > 22 then
|
if $rows > 22 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data00 != 1 then
|
if $data00 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data04 != 1 then
|
if $data04 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -107,29 +107,29 @@ if $rows < 30 then
|
||||||
print expect greater than 30, actual: $rows
|
print expect greater than 30, actual: $rows
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows > 50 then
|
if $rows > 50 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data20 != 1 then
|
if $data20 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data24 != 1 then
|
if $data24 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step6
|
print =============== step6
|
||||||
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt interval(1m)
|
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt interval(1m)
|
||||||
print ===> $rows
|
print ===> $rows
|
||||||
if $rows < 18 then
|
if $rows < 18 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows > 22 then
|
if $rows > 22 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data10 > 15 then
|
if $data10 > 15 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data10 < 5 then
|
if $data10 < 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -138,16 +138,16 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms interval(1m)
|
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms interval(1m)
|
||||||
print ===> $rows
|
print ===> $rows
|
||||||
if $rows < 3 then
|
if $rows < 3 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows > 7 then
|
if $rows > 7 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data10 > 15 then
|
if $data10 > 15 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data10 < 5 then
|
if $data10 < 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -160,16 +160,16 @@ $ms2 = 1601481600000 - $cc
|
||||||
|
|
||||||
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms1 and ts > $ms2 interval(1m)
|
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms1 and ts > $ms2 interval(1m)
|
||||||
print ===> $rows
|
print ===> $rows
|
||||||
if $rows < 18 then
|
if $rows < 18 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows > 22 then
|
if $rows > 22 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data10 > 15 then
|
if $data10 > 15 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data10 < 5 then
|
if $data10 < 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -181,24 +181,24 @@ $cc = 1 * 60000
|
||||||
$ms2 = 1601481600000 - $cc
|
$ms2 = 1601481600000 - $cc
|
||||||
|
|
||||||
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms1 and ts > $ms2 interval(1m) fill(value, 0)
|
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from $mt where ts <= $ms1 and ts > $ms2 interval(1m) fill(value, 0)
|
||||||
if $rows < 30 then
|
if $rows < 30 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows > 50 then
|
if $rows > 50 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data10 > 15 then
|
if $data10 > 15 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data10 < 5 then
|
if $data10 < 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql select * from information_schema.ins_databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
|
@ -25,18 +25,18 @@ $i = 0
|
||||||
while $i < $tbNum
|
while $i < $tbNum
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql create table $tb using $mt tags( $i )
|
sql create table $tb using $mt tags( $i )
|
||||||
|
|
||||||
$x = 0
|
$x = 0
|
||||||
while $x < $rowNum
|
while $x < $rowNum
|
||||||
$cc = $x * 60000
|
$cc = $x * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql insert into $tb values ($ms , $x )
|
sql insert into $tb values ($ms , $x )
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
|
@ -44,7 +44,7 @@ $tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql select last(tbcol) from $tb
|
sql select last(tbcol) from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -54,27 +54,27 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select last(tbcol) from $tb where ts <= $ms
|
sql select last(tbcol) from $tb where ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 4 then
|
if $data00 != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql select last(tbcol) as b from $tb
|
sql select last(tbcol) as b from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql select last(tbcol) as b from $tb interval(1m)
|
sql select last(tbcol) as b from $tb interval(1m)
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select last(tbcol) as b from $tb interval(1d)
|
sql select last(tbcol) as b from $tb interval(1d)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -84,17 +84,17 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select last(tbcol) as b from $tb where ts <= $ms interval(1m)
|
sql select last(tbcol) as b from $tb where ts <= $ms interval(1m)
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows != 5 then
|
if $rows != 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step7
|
print =============== step7
|
||||||
sql select last(tbcol) from $mt
|
sql select last(tbcol) from $mt
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -104,13 +104,13 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select last(tbcol) as c from $mt where ts <= $ms
|
sql select last(tbcol) as c from $mt where ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 4 then
|
if $data00 != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select last(tbcol) as c from $mt where tgcol < 5
|
sql select last(tbcol) as c from $mt where tgcol < 5
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -119,31 +119,31 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select last(tbcol) as c from $mt where tgcol < 5 and ts <= $ms
|
sql select last(tbcol) as c from $mt where tgcol < 5 and ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 4 then
|
if $data00 != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step9
|
print =============== step9
|
||||||
sql select last(tbcol) as b from $mt interval(1m)
|
sql select last(tbcol) as b from $mt interval(1m)
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select last(tbcol) as b from $mt interval(1d)
|
sql select last(tbcol) as b from $mt interval(1d)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step10
|
print =============== step10
|
||||||
sql select last(tbcol) as b from $mt group by tgcol
|
sql select last(tbcol) as b from $mt group by tgcol
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
if $rows != $tbNum then
|
if $rows != $tbNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -153,19 +153,19 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select last(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1m)
|
sql select last(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1m)
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
print ===> $rows
|
print ===> $rows
|
||||||
if $rows != 50 then
|
if $rows != 50 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql select * from information_schema.ins_databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
|
@ -25,18 +25,18 @@ $i = 0
|
||||||
while $i < $tbNum
|
while $i < $tbNum
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql create table $tb using $mt tags( $i )
|
sql create table $tb using $mt tags( $i )
|
||||||
|
|
||||||
$x = 0
|
$x = 0
|
||||||
while $x < $rowNum
|
while $x < $rowNum
|
||||||
$cc = $x * 60000
|
$cc = $x * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql insert into $tb values ($ms , $x )
|
sql insert into $tb values ($ms , $x )
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
|
@ -44,7 +44,7 @@ $tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql select last_row(tbcol) from $tb
|
sql select last_row(tbcol) from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -54,21 +54,21 @@ $ms = 1601481600000 + $cc
|
||||||
print select last_row(tbcol) from $tb where ts <= $ms
|
print select last_row(tbcol) from $tb where ts <= $ms
|
||||||
sql select last_row(tbcol) from $tb where ts <= $ms
|
sql select last_row(tbcol) from $tb where ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 4 then
|
if $data00 != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql select last_row(tbcol) as b from $tb
|
sql select last_row(tbcol) as b from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step7
|
print =============== step7
|
||||||
sql select last_row(tbcol) from $mt
|
sql select last_row(tbcol) from $mt
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -77,13 +77,13 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select last_row(tbcol) as c from $mt where ts <= $ms
|
sql select last_row(tbcol) as c from $mt where ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 4 then
|
if $data00 != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select last_row(tbcol) as c from $mt where tgcol < 5
|
sql select last_row(tbcol) as c from $mt where tgcol < 5
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -91,18 +91,18 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select last_row(tbcol) as c from $mt where tgcol < 5 and ts <= $ms
|
sql select last_row(tbcol) as c from $mt where tgcol < 5 and ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 4 then
|
if $data00 != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step10
|
print =============== step10
|
||||||
sql select last_row(tbcol) as b from $mt group by tgcol
|
sql select last_row(tbcol) as b from $mt group by tgcol
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
if $rows != $tbNum then
|
if $rows != $tbNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -110,28 +110,28 @@ print =============== step11
|
||||||
|
|
||||||
$cc = 1 * 3600000
|
$cc = 1 * 3600000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql insert into $tb values( $ms , 10)
|
sql insert into $tb values( $ms , 10)
|
||||||
|
|
||||||
$cc = 3 * 3600000
|
$cc = 3 * 3600000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql insert into $tb values( $ms , null)
|
sql insert into $tb values( $ms , null)
|
||||||
|
|
||||||
$cc = 5 * 3600000
|
$cc = 5 * 3600000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql insert into $tb values( $ms , -1)
|
sql insert into $tb values( $ms , -1)
|
||||||
|
|
||||||
$cc = 7 * 3600000
|
$cc = 7 * 3600000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql insert into $tb values( $ms , null)
|
sql insert into $tb values( $ms , null)
|
||||||
|
|
||||||
## for super table
|
## for super table
|
||||||
$cc = 6 * 3600000
|
$cc = 6 * 3600000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select last_row(*) from $mt where ts < $ms
|
sql select last_row(*) from $mt where ts < $ms
|
||||||
if $data01 != -1 then
|
if $data01 != -1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -139,12 +139,12 @@ $cc = 8 * 3600000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select last_row(*) from $mt where ts < $ms
|
sql select last_row(*) from $mt where ts < $ms
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select last_row(*) from $mt
|
sql select last_row(*) from $mt
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@ $cc = 4 * 3600000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select last_row(*) from $mt where ts < $ms
|
sql select last_row(*) from $mt where ts < $ms
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ $cc = 4 * 3600000
|
||||||
$ms2 = 1601481600000 + $cc
|
$ms2 = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select last_row(*) from $mt where ts > $ms1 and ts <= $ms2
|
sql select last_row(*) from $mt where ts > $ms1 and ts <= $ms2
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ $cc = 6 * 3600000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select last_row(*) from $tb where ts <= $ms
|
sql select last_row(*) from $tb where ts <= $ms
|
||||||
if $data01 != -1 then
|
if $data01 != -1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -179,12 +179,12 @@ $cc = 8 * 3600000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select last_row(*) from $tb where ts <= $ms
|
sql select last_row(*) from $tb where ts <= $ms
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select last_row(*) from $tb
|
sql select last_row(*) from $tb
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ $cc = 4 * 3600000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select last_row(*) from $tb where ts <= $ms
|
sql select last_row(*) from $tb where ts <= $ms
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -202,14 +202,14 @@ $cc = 4 * 3600000
|
||||||
$ms2 = 1601481600000 + $cc
|
$ms2 = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select last_row(*) from $tb where ts > $ms1 and ts <= $ms2
|
sql select last_row(*) from $tb where ts > $ms1 and ts <= $ms2
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql select * from information_schema.ins_databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
|
|
@ -25,17 +25,17 @@ $i = 0
|
||||||
while $i < $tbNum
|
while $i < $tbNum
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql create table $tb using $mt tags( $i )
|
sql create table $tb using $mt tags( $i )
|
||||||
|
|
||||||
$x = 2
|
$x = 2
|
||||||
$ms = 1000
|
$ms = 1000
|
||||||
while $x < $rowNum
|
while $x < $rowNum
|
||||||
$ms = $ms + 1000
|
$ms = $ms + 1000
|
||||||
sql insert into $tb values ($ms , $x )
|
sql insert into $tb values ($ms , $x )
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
|
@ -63,7 +63,7 @@ endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql select leastsquares(tbcol, 1, 1) as b from $tb interval(1m)
|
sql select leastsquares(tbcol, 1, 1) as b from $tb interval(1m)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != @{slop:1.000000, intercept:1.000000}@ then
|
if $data00 != @{slop:1.000000, intercept:1.000000}@ then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
@ -81,15 +81,15 @@ if $data00 != @{slop:1.000000, intercept:1.000000}@ then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
print ===> $rows
|
print ===> $rows
|
||||||
if $rows != 1 then
|
if $rows != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql select * from information_schema.ins_databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
|
@ -25,18 +25,18 @@ $i = 0
|
||||||
while $i < $tbNum
|
while $i < $tbNum
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql create table $tb using $mt tags( $i )
|
sql create table $tb using $mt tags( $i )
|
||||||
|
|
||||||
$x = 0
|
$x = 0
|
||||||
while $x < $rowNum
|
while $x < $rowNum
|
||||||
$cc = $x * 60000
|
$cc = $x * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql insert into $tb values ($ms , $x )
|
sql insert into $tb values ($ms , $x )
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
|
@ -44,7 +44,7 @@ $tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql select max(tbcol) from $tb
|
sql select max(tbcol) from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -54,27 +54,27 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select max(tbcol) from $tb where ts <= $ms
|
sql select max(tbcol) from $tb where ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 4 then
|
if $data00 != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql select max(tbcol) as b from $tb
|
sql select max(tbcol) as b from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql select max(tbcol) as b from $tb interval(1m)
|
sql select max(tbcol) as b from $tb interval(1m)
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select max(tbcol) as b from $tb interval(1d)
|
sql select max(tbcol) as b from $tb interval(1d)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -84,17 +84,17 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select max(tbcol) as b from $tb where ts <= $ms interval(1m)
|
sql select max(tbcol) as b from $tb where ts <= $ms interval(1m)
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows != 5 then
|
if $rows != 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step7
|
print =============== step7
|
||||||
sql select max(tbcol) from $mt
|
sql select max(tbcol) from $mt
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -104,13 +104,13 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select max(tbcol) as c from $mt where ts <= $ms
|
sql select max(tbcol) as c from $mt where ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 4 then
|
if $data00 != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select max(tbcol) as c from $mt where tgcol < 5
|
sql select max(tbcol) as c from $mt where tgcol < 5
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -119,31 +119,31 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select max(tbcol) as c from $mt where tgcol < 5 and ts <= $ms
|
sql select max(tbcol) as c from $mt where tgcol < 5 and ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 4 then
|
if $data00 != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step9
|
print =============== step9
|
||||||
sql select max(tbcol) as b from $mt interval(1m)
|
sql select max(tbcol) as b from $mt interval(1m)
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select max(tbcol) as b from $mt interval(1d)
|
sql select max(tbcol) as b from $mt interval(1d)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step10
|
print =============== step10
|
||||||
sql select max(tbcol) as b from $mt group by tgcol
|
sql select max(tbcol) as b from $mt group by tgcol
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
if $rows != $tbNum then
|
if $rows != $tbNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -153,19 +153,19 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select max(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1m)
|
sql select max(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1m)
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
print ===> $rows
|
print ===> $rows
|
||||||
if $rows != 50 then
|
if $rows != 50 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql select * from information_schema.ins_databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
|
@ -25,18 +25,18 @@ $i = 0
|
||||||
while $i < $tbNum
|
while $i < $tbNum
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql create table $tb using $mt tags( $i )
|
sql create table $tb using $mt tags( $i )
|
||||||
|
|
||||||
$x = 0
|
$x = 0
|
||||||
while $x < $rowNum
|
while $x < $rowNum
|
||||||
$cc = $x * 60000
|
$cc = $x * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql insert into $tb values ($ms , $x )
|
sql insert into $tb values ($ms , $x )
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
|
@ -44,7 +44,7 @@ $tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql select min(tbcol) from $tb
|
sql select min(tbcol) from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -54,27 +54,27 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select min(tbcol) from $tb where ts < $ms
|
sql select min(tbcol) from $tb where ts < $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql select min(tbcol) as b from $tb
|
sql select min(tbcol) as b from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql select min(tbcol) as b from $tb interval(1m)
|
sql select min(tbcol) as b from $tb interval(1m)
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select min(tbcol) as b from $tb interval(1d)
|
sql select min(tbcol) as b from $tb interval(1d)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -85,17 +85,17 @@ $ms = 1601481600000 + $cc
|
||||||
sql select min(tbcol) as b from $tb where ts <= $ms interval(1m)
|
sql select min(tbcol) as b from $tb where ts <= $ms interval(1m)
|
||||||
print select min(tbcol) as b from $tb where ts <= $ms interval(1m)
|
print select min(tbcol) as b from $tb where ts <= $ms interval(1m)
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows != 5 then
|
if $rows != 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step7
|
print =============== step7
|
||||||
sql select min(tbcol) from $mt
|
sql select min(tbcol) from $mt
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -104,13 +104,13 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select min(tbcol) as c from $mt where ts < $ms
|
sql select min(tbcol) as c from $mt where ts < $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select min(tbcol) as c from $mt where tgcol < 5
|
sql select min(tbcol) as c from $mt where tgcol < 5
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -118,31 +118,31 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select min(tbcol) as c from $mt where tgcol < 5 and ts <= $ms
|
sql select min(tbcol) as c from $mt where tgcol < 5 and ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step9
|
print =============== step9
|
||||||
sql select min(tbcol) as b from $mt interval(1m)
|
sql select min(tbcol) as b from $mt interval(1m)
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select min(tbcol) as b from $mt interval(1d)
|
sql select min(tbcol) as b from $mt interval(1d)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step10
|
print =============== step10
|
||||||
sql select min(tbcol) as b from $mt group by tgcol
|
sql select min(tbcol) as b from $mt group by tgcol
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
if $rows != $tbNum then
|
if $rows != $tbNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -151,19 +151,19 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select min(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1m)
|
sql select min(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1m)
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
print ===> $rows
|
print ===> $rows
|
||||||
if $rows != 50 then
|
if $rows != 50 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql select * from information_schema.ins_databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
|
@ -25,24 +25,24 @@ $i = 0
|
||||||
while $i < $tbNum
|
while $i < $tbNum
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql create table $tb using $mt tags( $i )
|
sql create table $tb using $mt tags( $i )
|
||||||
|
|
||||||
$x = 0
|
$x = 0
|
||||||
while $x < $rowNum
|
while $x < $rowNum
|
||||||
$cc = $x * 60000
|
$cc = $x * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
$v1 = $x
|
$v1 = $x
|
||||||
$v2 = $x
|
$v2 = $x
|
||||||
if $x == 0 then
|
if $x == 0 then
|
||||||
$v1 = NULL
|
$v1 = NULL
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql insert into $tb values ($ms , $v1 , $v2 )
|
sql insert into $tb values ($ms , $v1 , $v2 )
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
|
@ -61,47 +61,47 @@ if $rows != 20 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step3
|
print =============== step3
|
||||||
sql select count(tbcol), count(tbcol2), avg(tbcol), avg(tbcol2), sum(tbcol), sum(tbcol2) from $tb
|
sql select count(tbcol), count(tbcol2), avg(tbcol), avg(tbcol2), sum(tbcol), sum(tbcol2) from $tb
|
||||||
print ===> $data00 $data01 $data02 $data03 $data04 $data05
|
print ===> $data00 $data01 $data02 $data03 $data04 $data05
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != 20 then
|
if $data01 != 20 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data02 != 10.000000000 then
|
if $data02 != 10.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data03 != 9.500000000 then
|
if $data03 != 9.500000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data04 != 190 then
|
if $data04 != 190 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data05 != 190 then
|
if $data05 != 190 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql select * from $tb where tbcol2 = 19
|
sql select * from $tb where tbcol2 = 19
|
||||||
print ===> $data01 $data02
|
print ===> $data01 $data02
|
||||||
if $rows != 1 then
|
if $rows != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != 19 then
|
if $data01 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data02 != 19 then
|
if $data02 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select * from $tb where tbcol is NULL
|
sql select * from $tb where tbcol is NULL
|
||||||
if $rows != 1 then
|
if $rows != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select * from $tb where tbcol = NULL
|
sql select * from $tb where tbcol = NULL
|
||||||
if $rows != 0 then
|
if $rows != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -113,29 +113,29 @@ sql create table tt using $mt tags( NULL )
|
||||||
#step52:
|
#step52:
|
||||||
|
|
||||||
sql select * from $mt where tgcol is NULL
|
sql select * from $mt where tgcol is NULL
|
||||||
if $rows != 0 then
|
if $rows != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step6
|
print =============== step6
|
||||||
sql select count(tbcol), count(tbcol2), avg(tbcol), avg(tbcol2), sum(tbcol), sum(tbcol2) from $mt
|
sql select count(tbcol), count(tbcol2), avg(tbcol), avg(tbcol2), sum(tbcol), sum(tbcol2) from $mt
|
||||||
print ===> $data00 $data01 $data02 $data03 $data04 $data05
|
print ===> $data00 $data01 $data02 $data03 $data04 $data05
|
||||||
if $data00 != 190 then
|
if $data00 != 190 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != 200 then
|
if $data01 != 200 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data02 != 10.000000000 then
|
if $data02 != 10.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data03 != 9.500000000 then
|
if $data03 != 9.500000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data04 != 1900 then
|
if $data04 != 1900 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data05 != 1900 then
|
if $data05 != 1900 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -158,15 +158,15 @@ sql insert into t7 values(now, NULL)
|
||||||
#sql insert into t8 values(now, NULL)
|
#sql insert into t8 values(now, NULL)
|
||||||
|
|
||||||
#sql select * from t1
|
#sql select * from t1
|
||||||
#if $rows != 1 then
|
#if $rows != 1 then
|
||||||
# return -1
|
# return -1
|
||||||
#endi
|
#endi
|
||||||
#if $data01 != NULL then
|
#if $data01 != NULL then
|
||||||
# return -1
|
# return -1
|
||||||
#endi
|
#endi
|
||||||
|
|
||||||
sql select * from t2
|
sql select * from t2
|
||||||
if $rows != 1 then
|
if $rows != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
|
@ -174,7 +174,7 @@ if $data01 != NULL then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select * from t3
|
sql select * from t3
|
||||||
if $rows != 1 then
|
if $rows != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
|
@ -182,7 +182,7 @@ if $data01 != NULL then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select * from t4
|
sql select * from t4
|
||||||
if $rows != 1 then
|
if $rows != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
|
@ -190,7 +190,7 @@ if $data01 != NULL then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select * from t5
|
sql select * from t5
|
||||||
if $rows != 1 then
|
if $rows != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
|
@ -198,7 +198,7 @@ if $data01 != NULL then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select * from t6
|
sql select * from t6
|
||||||
if $rows != 1 then
|
if $rows != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
|
@ -206,7 +206,7 @@ if $data01 != NULL then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select * from t7
|
sql select * from t7
|
||||||
if $rows != 1 then
|
if $rows != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
|
@ -214,7 +214,7 @@ if $data01 != NULL then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
#sql select * from t8
|
#sql select * from t8
|
||||||
#if $rows != 1 then
|
#if $rows != 1 then
|
||||||
# return -1
|
# return -1
|
||||||
#endi
|
#endi
|
||||||
#if $data01 != NULL then
|
#if $data01 != NULL then
|
||||||
|
@ -224,8 +224,8 @@ endi
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql select * from information_schema.ins_databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
|
@ -25,18 +25,18 @@ $i = 0
|
||||||
while $i < $tbNum
|
while $i < $tbNum
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql create table $tb using $mt tags( $i )
|
sql create table $tb using $mt tags( $i )
|
||||||
|
|
||||||
$x = 0
|
$x = 0
|
||||||
while $x < $rowNum
|
while $x < $rowNum
|
||||||
$cc = $x * 60000
|
$cc = $x * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql insert into $tb values ($ms , $x )
|
sql insert into $tb values ($ms , $x )
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
|
@ -44,19 +44,19 @@ $tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql select percentile(tbcol, 10) from $tb
|
sql select percentile(tbcol, 10) from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 1.900000000 then
|
if $data00 != 1.900000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select percentile(tbcol, 20) from $tb
|
sql select percentile(tbcol, 20) from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 3.800000000 then
|
if $data00 != 3.800000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select percentile(tbcol, 100) from $tb
|
sql select percentile(tbcol, 100) from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19.000000000 then
|
if $data00 != 19.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select percentile(tbcol, 1) from $tb where ts > $ms
|
sql select percentile(tbcol, 1) from $tb where ts > $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 5.140000000 then
|
if $data00 != 5.140000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select percentile(tbcol, 5) from $tb where ts > $ms
|
sql select percentile(tbcol, 5) from $tb where ts > $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 5.700000000 then
|
if $data00 != 5.700000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select percentile(tbcol, 0) from $tb where ts > $ms
|
sql select percentile(tbcol, 0) from $tb where ts > $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 5.000000000 then
|
if $data00 != 5.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select percentile(tbcol, 1) as c from $tb where ts > $ms
|
sql select percentile(tbcol, 1) as c from $tb where ts > $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 5.140000000 then
|
if $data00 != 5.140000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select percentile(tbcol, 5) as c from $tb where ts > $ms
|
sql select percentile(tbcol, 5) as c from $tb where ts > $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 5.700000000 then
|
if $data00 != 5.700000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -116,15 +116,15 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select percentile(tbcol, 0) as c from $tb where ts > $ms
|
sql select percentile(tbcol, 0) as c from $tb where ts > $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 5.000000000 then
|
if $data00 != 5.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql select * from information_schema.ins_databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
|
@ -25,18 +25,18 @@ $i = 0
|
||||||
while $i < $tbNum
|
while $i < $tbNum
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql create table $tb using $mt tags( $i )
|
sql create table $tb using $mt tags( $i )
|
||||||
|
|
||||||
$x = 0
|
$x = 0
|
||||||
while $x < $rowNum
|
while $x < $rowNum
|
||||||
$cc = $x * 60000
|
$cc = $x * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql insert into $tb values ($ms , $x )
|
sql insert into $tb values ($ms , $x )
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
|
@ -44,7 +44,7 @@ $tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql select stddev(tbcol) from $tb
|
sql select stddev(tbcol) from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 5.766281297 then
|
if $data00 != 5.766281297 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -54,27 +54,27 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select stddev(tbcol) from $tb where ts <= $ms
|
sql select stddev(tbcol) from $tb where ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 1.414213562 then
|
if $data00 != 1.414213562 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql select stddev(tbcol) as b from $tb
|
sql select stddev(tbcol) as b from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 5.766281297 then
|
if $data00 != 5.766281297 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql select stddev(tbcol) as b from $tb interval(1m)
|
sql select stddev(tbcol) as b from $tb interval(1m)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0.000000000 then
|
if $data00 != 0.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select stddev(tbcol) as b from $tb interval(1d)
|
sql select stddev(tbcol) as b from $tb interval(1d)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 5.766281297 then
|
if $data00 != 5.766281297 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -84,18 +84,18 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select stddev(tbcol) as b from $tb where ts <= $ms interval(1m)
|
sql select stddev(tbcol) as b from $tb where ts <= $ms interval(1m)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 0.000000000 then
|
if $data00 != 0.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows != 5 then
|
if $rows != 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql select * from information_schema.ins_databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
|
@ -25,18 +25,18 @@ $i = 0
|
||||||
while $i < $tbNum
|
while $i < $tbNum
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql create table $tb using $mt tags( $i )
|
sql create table $tb using $mt tags( $i )
|
||||||
|
|
||||||
$x = 0
|
$x = 0
|
||||||
while $x < $rowNum
|
while $x < $rowNum
|
||||||
$cc = $x * 60000
|
$cc = $x * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql insert into $tb values ($ms , $x )
|
sql insert into $tb values ($ms , $x )
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
|
@ -44,7 +44,7 @@ $tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql select sum(tbcol) from $tb
|
sql select sum(tbcol) from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 190 then
|
if $data00 != 190 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -54,27 +54,27 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select sum(tbcol) from $tb where ts <= $ms
|
sql select sum(tbcol) from $tb where ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 10 then
|
if $data00 != 10 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql select sum(tbcol) as b from $tb
|
sql select sum(tbcol) as b from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 190 then
|
if $data00 != 190 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql select sum(tbcol) as b from $tb interval(1m)
|
sql select sum(tbcol) as b from $tb interval(1m)
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select sum(tbcol) as b from $tb interval(1d)
|
sql select sum(tbcol) as b from $tb interval(1d)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 190 then
|
if $data00 != 190 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -84,17 +84,17 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select sum(tbcol) as b from $tb where ts <= $ms interval(1m)
|
sql select sum(tbcol) as b from $tb where ts <= $ms interval(1m)
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows != 5 then
|
if $rows != 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step7
|
print =============== step7
|
||||||
sql select sum(tbcol) from $mt
|
sql select sum(tbcol) from $mt
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 1900 then
|
if $data00 != 1900 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -104,13 +104,13 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select sum(tbcol) as c from $mt where ts <= $ms
|
sql select sum(tbcol) as c from $mt where ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 100 then
|
if $data00 != 100 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select sum(tbcol) as c from $mt where tgcol < 5
|
sql select sum(tbcol) as c from $mt where tgcol < 5
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 950 then
|
if $data00 != 950 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -119,31 +119,31 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select sum(tbcol) as c from $mt where tgcol < 5 and ts <= $ms
|
sql select sum(tbcol) as c from $mt where tgcol < 5 and ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 50 then
|
if $data00 != 50 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step9
|
print =============== step9
|
||||||
sql select sum(tbcol) as b from $mt interval(1m)
|
sql select sum(tbcol) as b from $mt interval(1m)
|
||||||
print ===> $data10
|
print ===> $data10
|
||||||
if $data10 < 5 then
|
if $data10 < 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select sum(tbcol) as b from $mt interval(1d)
|
sql select sum(tbcol) as b from $mt interval(1d)
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 1900 then
|
if $data00 != 1900 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step10
|
print =============== step10
|
||||||
sql select sum(tbcol) as b from $mt group by tgcol
|
sql select sum(tbcol) as b from $mt group by tgcol
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 190 then
|
if $data00 != 190 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
if $rows != $tbNum then
|
if $rows != $tbNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -153,19 +153,19 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select sum(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1d)
|
sql select sum(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1d)
|
||||||
print select sum(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1d)
|
print select sum(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1d)
|
||||||
print ===> $data00 $rows
|
print ===> $data00 $rows
|
||||||
if $data00 != 10 then
|
if $data00 != 10 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows != 10 then
|
if $rows != 10 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql select * from information_schema.ins_databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
|
@ -25,18 +25,18 @@ $i = 0
|
||||||
while $i < $tbNum
|
while $i < $tbNum
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql create table $tb using $mt tags( $i )
|
sql create table $tb using $mt tags( $i )
|
||||||
|
|
||||||
$x = 0
|
$x = 0
|
||||||
while $x < $rowNum
|
while $x < $rowNum
|
||||||
$cc = $x * 60000
|
$cc = $x * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql insert into $tb values ($ms , $x )
|
sql insert into $tb values ($ms , $x )
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
|
@ -44,7 +44,7 @@ $tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql select top(tbcol, 1) from $tb
|
sql select top(tbcol, 1) from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -54,24 +54,24 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select top(tbcol, 1) from $tb where ts <= $ms
|
sql select top(tbcol, 1) from $tb where ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 4 then
|
if $data00 != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql select top(tbcol, 1) as b from $tb
|
sql select top(tbcol, 1) as b from $tb
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql select top(tbcol, 2) as b from $tb
|
sql select top(tbcol, 2) as b from $tb
|
||||||
print ===> $data00 $data10
|
print ===> $data00 $data10
|
||||||
if $data00 != 18 then
|
if $data00 != 18 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data10 != 19 then
|
if $data10 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -81,10 +81,10 @@ $ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select top(tbcol, 2) as b from $tb where ts <= $ms
|
sql select top(tbcol, 2) as b from $tb where ts <= $ms
|
||||||
print ===> $data00 $data10
|
print ===> $data00 $data10
|
||||||
if $data00 != 3 then
|
if $data00 != 3 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data10 != 4 then
|
if $data10 != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -95,8 +95,8 @@ step6:
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql select * from information_schema.ins_databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
Loading…
Reference in New Issue