show_create_table.sim 1.5 KB
Newer Older
Y
yihaoDeng 已提交
1 2 3
system sh/stop_dnodes.sh

system sh/deploy.sh -n dnode1 -i 1
4
system sh/cfg.sh -n dnode1 -c walLevel -v 1
Y
yihaoDeng 已提交
5 6

system sh/exec.sh -n dnode1 -s start
H
Haojun Liao 已提交
7
sleep 2000
Y
yihaoDeng 已提交
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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
sql connect

print ===============create three type table
sql create database db
sql use db
sql create table meters(ts timestamp, f binary(8)) tags(loc int, zone binary(8))
sql create table t0 using meters tags(1,'ch')
sql create table normalTbl(ts timestamp, zone binary(8))

sql use db
sql show create table meters 
if $rows != 1 then 
  return -1
endi

print ===============check sub table
sql show create table t0
if $rows != 1 then 
  return -1
endi
if $data00 == 't0' then
  return -1
endi

print ===============check normal table

sql show create table normalTbl 
if $rows != 1 then 
  return -1
endi

if $data00 == 'normalTbl' then
  return -1
endi

print ===============check super table
sql show create table meters 
if $rows != 1 then 
  return -1
endi

if $data00 == 'meters' then
  return -1
endi

print ===============check sub table with prefix

sql show create table db.t0
if $rows != 1 then 
  return -1
endi

if $data00 == 't0' then
  return -1
endi

print ===============check normal table with prefix
sql show create table db.normalTbl 
if $rows != 1 then 
  return -1
endi

if $data00 == 'normalTbl' then
  return -1
endi


print ===============check super table with prefix
sql show create table db.meters 
if $rows != 1 then 
  return -1
endi

if $data00 == 'meters' then
  return -1
endi

sql drop database db

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