basic3.sim 1019 字节
Newer Older
P
plum-lihui 已提交
1 2
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
S
Shengliang Guan 已提交
3
system sh/exec.sh -n dnode1 -s start
P
plum-lihui 已提交
4 5
sql connect

S
Shengliang Guan 已提交
6 7 8 9 10 11 12
print =============== create database d1
sql create database d1
sql create table d1.t1 (ts timestamp, i int);
sql create table d1.t2 (ts timestamp, i int);
sql create table d1.t3 (ts timestamp, i int);
sql create table d1.t4 (ts timestamp, i int);

X
Xiaoyu Wang 已提交
13
sql select * from information_schema.ins_databases
S
Shengliang Guan 已提交
14
if $rows != 3 then
P
plum-lihui 已提交
15 16 17
  return -1
endi

S
Shengliang Guan 已提交
18 19 20
if $data20 != d1 then
  return -1
endi
P
plum-lihui 已提交
21

S
Shengliang Guan 已提交
22 23 24
if $data22 != 2 then
  return -1
endi
P
plum-lihui 已提交
25

S
Shengliang Guan 已提交
26 27 28
#if $data03 != 4 then 
#  return -1
#endi
P
plum-lihui 已提交
29

S
Shengliang Guan 已提交
30 31 32 33
sql show d1.tables
if $rows != 4 then 
  return -1
endi
P
plum-lihui 已提交
34

S
Shengliang Guan 已提交
35 36 37 38 39
print =============== create database d2
sql create database d2
sql create table d2.t1 (ts timestamp, i int);
sql create table d2.t2 (ts timestamp, i int);
sql create table d2.t3 (ts timestamp, i int);
S
Shengliang Guan 已提交
40

X
Xiaoyu Wang 已提交
41
sql select * from information_schema.ins_databases
S
Shengliang Guan 已提交
42
if $rows != 4 then
P
plum-lihui 已提交
43
  return -1
S
Shengliang Guan 已提交
44
endi
P
plum-lihui 已提交
45

S
Shengliang Guan 已提交
46 47
sql show d2.tables
if $rows != 3 then 
S
Shengliang Guan 已提交
48
  return -1
S
Shengliang Guan 已提交
49 50 51
endi

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