import_commit2.sim 1.0 KB
Newer Older
S
slguan 已提交
1
system sh/stop_dnodes.sh
S
slguan 已提交
2 3

system sh/deploy.sh -n dnode1 -i 1
H
hjxilinx 已提交
4
system sh/cfg.sh -n dnode1 -c walLevel -v 1
S
scripts  
Shengliang Guan 已提交
5
system sh/cfg.sh -n dnode1 -c ctime -v 30
S
slguan 已提交
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect

$dbPrefix = ic_db
$tbPrefix = ic_tb
$stbPrefix = ic_stb
$tbNum = 1
$rowNum = 166
$totalNum = $tbNum * $rowNum
$ts0 = 1537146000000
$delta = 600000
print ========== limit.sim
$i = 0
$db = $dbPrefix . $i
$stb = $stbPrefix . $i

sql drop database $db -x step1
step1:
H
hjxilinx 已提交
25
sql create database $db cache 16
S
slguan 已提交
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
print ====== create tables
sql use $db

$i = 0
$ts = $ts0
$tb = $tbPrefix . $i
sql create table $tb (ts timestamp, c1 int)
$x = 0
while $x < $rowNum
  $xs = $x * $delta
  $ts = $ts0 + $xs
  sql insert into $tb values ( $ts , $x ) 
  $x = $x + 1
endw 
print ====== tables created

H
Haojun Liao 已提交
42
sleep 6000
S
slguan 已提交
43 44 45 46 47 48 49 50 51 52 53 54

$ts = $ts0 + $delta
$ts = $ts + 1
sql import into $tb values ( $ts , -1)
sql select count(*) from $tb
$res = $rowNum + 1
if $data00 != $res then
  print expected: $res 
  print returned: $rows 
  return -1
endi

S
scripts  
Shengliang Guan 已提交
55
system sh/exec.sh -n dnode1 -s stop -x SIGINT