regressiontest.sim 1.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sql connect

$dbPrefix = reg_db
$tb = tb
$rowNum = 8200

$ts0 = 1537146000000
$delta = 100
print ========== reg.sim
$i = 0
$db = $dbPrefix . $i

sql drop database if exists $db -x step1
step1:
sql create database $db vgroups 1;

sql use $db
sql create table $tb (ts timestamp, c1 int)

$i = 0
$ts = $ts0

$x = 0
while $x < $rowNum
$xs = $x * $delta
$ts = $ts0 + $xs
sql insert into $tb values ( $ts , $x )
$x = $x + 1
endw

print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
sql connect

sql use $db
sql delete from $tb where ts=1537146000000
sql delete from $tb where ts=1537146409500

print =========================> TS-2410
sql select * from  $tb limit 20 offset 4090
print $data00
print $data10
print $data20
print $data30
print $data40
print $data50
print $data60
print $data70
print $data80
print $data90

H
Haojun Liao 已提交
57
if $data40 != @18-09-17 09:06:49.600@ then
58 59 60 61
 return -1
endi

system sh/exec.sh -n dnode1 -s stop -x SIGINT