delete_reusevnode.sim 1.9 KB
Newer Older
1 2 3 4 5
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sql connect

G
Ganlin Zhao 已提交
6
print ======== step1
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

$tbPrefix = t
$i = 0
while $i < 30
  $db = db . $i
  sql create database $db
  sql use $db

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

  sql insert into $tb values(now, 1);
  sql drop database $db

  print times $i
  $i = $i + 1

G
Ganlin Zhao 已提交
24
endw
25 26

print ======== step2
X
Xiaoyu Wang 已提交
27
sql select * from information_schema.ins_databases
G
Ganlin Zhao 已提交
28
if $rows != 2 then
29
  return -1
G
Ganlin Zhao 已提交
30
endi
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 57 58 59 60 61 62 63 64 65 66 67 68

system sh/stop_dnodes.sh

system sh/deploy.sh -n dnode1 -i 1
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sql connect

print ======== step1

$tbPrefix = t
$i = 0
while $i < 10
  $db = db . $i
  sql create database $db
  sql use $db

  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);

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

    $tb1 = $tb . 5
S
Shengliang Guan 已提交
69
    sql_error create table $tb1 using st tags(1)
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
    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 database $db

  print times $i
  $i = $i + 1

endw

print ======== step2
X
Xiaoyu Wang 已提交
92
sql select * from information_schema.ins_databases
S
Shengliang Guan 已提交
93
if $rows != 2 then
94 95 96
  return -1
endi

G
Ganlin Zhao 已提交
97
system sh/exec.sh -n dnode1 -s stop -x SIGINT