delete_reusevnode2.sim 1.4 KB
Newer Older
S
slguan 已提交
1
system sh/stop_dnodes.sh
S
slguan 已提交
2
system sh/deploy.sh -n dnode1 -i 1
S
slguan 已提交
3 4 5

print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
S
scripts  
slguan 已提交
6
sleep 3000
S
scripts  
slguan 已提交
7
sql connect
S
slguan 已提交
8 9 10

print ======== step1

S
scripts  
slguan 已提交
11
sql create database db maxTables 4;
S
slguan 已提交
12 13 14 15
sql use db

$tbPrefix = t
$i = 0
S
scripts  
slguan 已提交
16
while $i < 10
S
slguan 已提交
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

  sql create table st (ts timestamp, i int) tags(j int);
  $tb = $tbPrefix . $i
  $tb = $tb . a

    $tb1 = $tb . 1
    sql create table $tb1 using st tags(1)
    sql insert into  $tb1 values(now, 1);

    $tb1 = $tb . 2
    sql create table $tb1 using st tags(1)
    sql insert into  $tb1 values(now, 1);

    $tb1 = $tb . 3
    sql create table $tb1 using st tags(1)
    sql insert into  $tb1 values(now, 1);

guanshengliang's avatar
guanshengliang 已提交
34
    $tb1 = $tb . 4
S
slguan 已提交
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
    sql create table $tb1 using st tags(1)
    sql insert into  $tb1 values(now, 1);

    $tb1 = $tb . 5
    sql create table $tb1 using st tags(1)
    sql insert into  $tb1 values(now, 1);

    $tb1 = $tb . 6
    sql create table $tb1 using st tags(1)
    sql insert into  $tb1 values(now, 1);

    $tb1 = $tb . 7
    sql create table $tb1 using st tags(1)
    sql insert into  $tb1 values(now, 1);

    $tb1 = $tb . 8
    sql create table $tb1 using st tags(1)
    sql insert into  $tb1 values(now, 1);

  sql drop table st

guanshengliang's avatar
guanshengliang 已提交
56
  sleep 2000
S
slguan 已提交
57 58 59 60 61 62 63 64 65 66 67 68
  print times $i
  $i = $i + 1

endw

print ======== step2
sleep 1000
sql drop database db
sql show databases
if $rows != 0 then
  return -1
endi
S
scripts  
slguan 已提交
69 70

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