alter_option.sim 1.5 KB
Newer Older
1 2 3
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c wallevel -v 0
S
scripts  
Shengliang Guan 已提交
4
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 1000
5 6 7 8 9 10 11

system sh/exec.sh -n dnode1 -s start

sleep 3000
sql connect
print ============================ dnode1 start

S
scripts  
Shengliang Guan 已提交
12
sql create database db cache 2 blocks 4 days 10 keep 20 minRows 300 maxRows 400 ctime 120 precision 'ms' comp 2 wal 1 replica 1
13 14 15 16 17 18 19 20 21 22 23 24 25 26
sql show databases
print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 
if $data00 != db then 
  return -1
endi
if $data02 != 0 then 
  return -1
endi
if $data03 != 0 then 
  return -1
endi
if $data04 != 1 then 
  return -1
endi
S
scripts  
Shengliang Guan 已提交
27
if $data06 != 10 then 
28 29
  return -1
endi
S
scripts  
Shengliang Guan 已提交
30
if $data07 != 20,20,20 then 
31 32
  return -1
endi
S
scripts  
Shengliang Guan 已提交
33
if $data08 != 2 then 
34 35
  return -1
endi
S
scripts  
Shengliang Guan 已提交
36
if $data09 != 4 then 
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
  return -1
endi

print =============== step2
system sh/exec.sh -n dnode1 -s stop -x SIGINT
return
sql_error alter database db cache 256
sql_error alter database db blocks 1
sql_error alter database db days 10
sql_error alter database db keep 10
sql_error alter database db minRows 350
sql_error alter database db minRows 550
sql_error alter database db ctime 5000
sql_error alter database db precision "us"
sql_error alter database db comp 3
S
Shengliang Guan 已提交
52
sql_error alter database db wal 1
53 54 55 56 57 58 59 60 61 62 63
sql_error alter database db replica 2


print ============== step3
sql alter database db comp 1
sql alter database db blocks 40
sql alter database db keep 30



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