usage.sim 1.2 KB
Newer Older
S
slguan 已提交
1
system sh/stop_dnodes.sh
S
slguan 已提交
2
system sh/deploy.sh -n dnode1 -i 1
S
Shengliang Guan 已提交
3
system sh/exec.sh -n dnode1 -s start
S
scripts  
Shengliang Guan 已提交
4
sleep 3000
S
slguan 已提交
5 6 7 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
sql connect

print =============== show accounts

print =============== create account
sql alter account root pass "taosdata" tseries 8000 streams 10 dbs 5 users 5  
sql show accounts
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
if $data00 != root then 
  return -1
endi
if $data02 != 3/5 then 
  return -1
endi
if $data03 != 0/5 then 
  return -1
endi
if $data04 != 0/8000 then 
  return -1
endi
if $data05 != 0/10 then 
  return -1
endi
  
print =============== check usage account
sql create database d1
sql create database d2
sql create database d3
sql create database d4
sql create database d5

sql create table d1.t1 (ts timestamp, i int);
sql create user u1 pass "u1"

sql show accounts
print $data10 $data11 $data12 $data13 $data14 $data15 $data16
if $data00 != root then 
  return -1
endi
if $data02 != 4/5 then 
  return -1
endi
if $data03 != 5/5 then 
  return -1
endi
if $data04 != 1/8000 then 
  return -1
endi
if $data05 != 0/10 then 
  return -1
endi

print =============== check grant
S
scripts  
slguan 已提交
58 59
sql_error create database d6

S
Shengliang Guan 已提交
60
system sh/exec.sh -n dnode1 -s stop  -x SIGINT