alter_option.sim 1.6 KB
Newer Older
1 2 3 4 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
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c wallevel -v 0
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 1000

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

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

sql create database db maxTables 500 cache 2 blocks 4 days 10 keep 20 minRows 300 maxRows 400 ctime 120 precision 'ms' comp 2 wal 1 replica 1
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
if $data05 != 10 then 
  return -1
endi
if $data06 != 20,20,20 then 
  return -1
endi
if $data07 != 500 then 
  return -1
endi
if $data08 != 2 then 
  return -1
endi
if $data09 != 4 then 
  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 maxTables 10
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 已提交
57
sql_error alter database db wal 1
58 59 60 61 62 63 64 65 66 67 68 69
sql_error alter database db replica 2


print ============== step3
sql alter database db maxTables 1000
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