show.sim 1.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
system sh/stop_dnodes.sh

system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start

sleep 2000
sql connect

print ======================== create stable

sql create database d1
13
sql use d1
14 15 16 17 18 19

$x = 0
while $x < 128
  $tb = d1.s . $x
  sql create table $tb (ts timestamp, i int) tags (j int)
  $x = $x + 1
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
endw

print ======================== describe stables
# TODO : create stable error
$m = 0
while $m < 128
  $tb = s . $m
  $filter = ' . $tb
  $filter = $filter . '
  sql show stables like $filter
  # print sql : show stables like $filter  ==> $rows
  if $rows != 1 then
    return -1
  endi
  $m = $m + 1
endw

37 38 39 40 41 42

print ======================== show stables

sql show d1.stables

print num of stables is $rows
43
if $rows != 128 then
44 45 46 47 48 49 50 51 52 53
  return -1
endi

print ======================== create table

$x = 0
while $x < 424
  $tb = d1.t . $x
  sql create table $tb using d1.s0 tags( $x )
  $x = $x + 1
54
endw
55 56 57 58 59 60

print ======================== show stables

sql show d1.tables

print num of tables is $rows
61
if $rows != 424 then
62 63 64
  return -1
endi

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