values.sim 5.5 KB
Newer Older
S
slguan 已提交
1 2
system sh/stop_dnodes.sh

S
slguan 已提交
3 4

system sh/deploy.sh -n dnode1 -i 1
H
hjxilinx 已提交
5
system sh/cfg.sh -n dnode1 -c walLevel -v 0
S
scripts  
slguan 已提交
6
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
S
slguan 已提交
7 8
system sh/exec.sh -n dnode1 -s start

H
Haojun Liao 已提交
9
sleep 2000
S
slguan 已提交
10 11 12 13 14 15 16 17 18 19 20
sql connect

print ======================== dnode1 start

sql create database vdb0
sql create table vdb0.mt (ts timestamp, tbcol int) TAGS(tgcol int)

sql create table vdb0.vtb00 using vdb0.mt tags( 0 )
sql create table vdb0.vtb01 using vdb0.mt tags( 0 )

sql create database vdb1
S
scripts  
Shengliang Guan 已提交
21 22 23 24 25
sql create table vdb1.mt (ts timestamp, tbcol int) TAGS(tgcol int)
sql_error create table vdb1.vtb10 using vdb0.mt tags( 1 )
sql_error create table vdb1.vtb11 using vdb0.mt tags( 1 )
sql create table vdb1.vtb10 using vdb1.mt tags( 1 )
sql create table vdb1.vtb11 using vdb1.mt tags( 1 )
S
slguan 已提交
26 27

sql create database vdb2
S
scripts  
Shengliang Guan 已提交
28 29 30 31 32
sql create table vdb2.mt (ts timestamp, tbcol int) TAGS(tgcol int)
sql_error create table vdb2.vtb20 using vdb0.mt tags( 2 )
sql_error create table vdb2.vtb21 using vdb0.mt tags( 2 )
sql create table vdb2.vtb20 using vdb2.mt tags( 2 )
sql create table vdb2.vtb21 using vdb2.mt tags( 2 )
S
slguan 已提交
33 34

sql create database vdb3
S
scripts  
Shengliang Guan 已提交
35 36 37 38 39
sql create table vdb3.mt (ts timestamp, tbcol int) TAGS(tgcol int)
sql_error create table vdb3.vtb20 using vdb0.mt tags( 2 )
sql_error create table vdb3.vtb21 using vdb0.mt tags( 2 )
sql create table vdb3.vtb30 using vdb3.mt tags( 3 )
sql create table vdb3.vtb31 using vdb3.mt tags( 3 )
S
slguan 已提交
40 41 42 43 44 45 46 47 48 49 50 51

print =============== step2
sql insert into vdb0.vtb00 values (1519833600000 , 10) (1519833600001, 20) (1519833600002, 30) 
sql insert into vdb0.vtb01 values (1519833600000 , 10) (1519833600001, 20) (1519833600002, 30) 
sql insert into vdb1.vtb10 values (1519833600000 , 11) (1519833600001, 21) (1519833600002, 31) 
sql insert into vdb1.vtb11 values (1519833600000 , 11) (1519833600001, 21) (1519833600002, 31) 
sql insert into vdb2.vtb20 values (1519833600000 , 12) (1519833600001, 22) (1519833600002, 32) 
sql insert into vdb2.vtb21 values (1519833600000 , 12) (1519833600001, 22) (1519833600002, 32) 
sql insert into vdb3.vtb30 values (1519833600000 , 13) (1519833600001, 23) (1519833600002, 33) 
sql insert into vdb3.vtb31 values (1519833600000 , 13) (1519833600001, 23) (1519833600002, 33) 
sql select * from vdb0.mt

S
scripts  
Shengliang Guan 已提交
52
if $rows != 6 then 
S
slguan 已提交
53 54 55 56 57 58 59 60 61 62 63 64 65 66
  return -1
endi

print =============== step3
sql insert into vdb0.vtb00 values (1519833600003 , 40) (1519833600005, 50) (1519833600004, 60) 
sql insert into vdb0.vtb01 values (1519833600003 , 40) (1519833600005, 50) (1519833600004, 60) 
sql insert into vdb1.vtb10 values (1519833600003 , 41) (1519833600005, 51) (1519833600004, 61) 
sql insert into vdb1.vtb11 values (1519833600003 , 41) (1519833600005, 51) (1519833600004, 61) 
sql insert into vdb2.vtb20 values (1519833600003 , 42) (1519833600005, 52) (1519833600004, 62) 
sql insert into vdb2.vtb21 values (1519833600003 , 42) (1519833600005, 52) (1519833600004, 62) 
sql insert into vdb3.vtb30 values (1519833600003 , 43) (1519833600005, 53) (1519833600004, 63) 
sql insert into vdb3.vtb31 values (1519833600003 , 43) (1519833600005, 53) (1519833600004, 63) 
sql select * from vdb0.mt

S
scripts  
Shengliang Guan 已提交
67
if $rows != 12 then 
S
slguan 已提交
68 69 70 71 72 73 74 75 76 77
  return -1
endi

print =============== step4
sql insert into vdb0.vtb00 values(1519833600006, 60) (1519833600007, 70) vdb0.vtb01 values(1519833600006, 60) (1519833600007, 70) 
sql insert into vdb1.vtb10 values(1519833600006, 61) (1519833600007, 71) vdb1.vtb11 values(1519833600006, 61) (1519833600007, 71) 
sql insert into vdb2.vtb20 values(1519833600006, 62) (1519833600007, 72) vdb2.vtb21 values(1519833600006, 62) (1519833600007, 72) 
sql insert into vdb3.vtb30 values(1519833600006, 63) (1519833600007, 73) vdb3.vtb31 values(1519833600006, 63) (1519833600007, 73) 
sql select * from vdb0.mt

S
scripts  
Shengliang Guan 已提交
78
if $rows != 16 then 
S
slguan 已提交
79 80 81 82 83 84 85 86 87 88
  return -1
endi

print =============== step5
sql insert into vdb0.vtb00 values(1519833600008, 80) (1519833600007, 70) vdb0.vtb01 values(1519833600006, 80) (1519833600007, 70) 
sql insert into vdb1.vtb10 values(1519833600008, 81) (1519833600007, 71) vdb1.vtb11 values(1519833600006, 81) (1519833600007, 71) 
sql insert into vdb2.vtb20 values(1519833600008, 82) (1519833600007, 72) vdb2.vtb21 values(1519833600006, 82) (1519833600007, 72) 
sql insert into vdb3.vtb30 values(1519833600008, 83) (1519833600007, 73) vdb3.vtb31 values(1519833600006, 83) (1519833600007, 73) 
sql select * from vdb0.mt

S
scripts  
Shengliang Guan 已提交
89
if $rows != 17 then 
S
slguan 已提交
90 91 92 93 94 95 96 97 98
  return -1
endi

print =============== step6
sql insert into vdb0.vtb00 values(1519833600009, 90) (1519833600010, 100) vdb1.vtb10 values(1519833600009, 90) (1519833600010, 100) vdb2.vtb20 values(1519833600009, 90) (1519833600010, 100) vdb3.vtb30 values(1519833600009, 90) (1519833600010, 100) 
sql insert into vdb0.vtb01 values(1519833600009, 90) (1519833600010, 100) vdb1.vtb11 values(1519833600009, 90) (1519833600010, 100) vdb2.vtb21 values(1519833600009, 90) (1519833600010, 100) vdb3.vtb31 values(1519833600009, 90) (1519833600010, 100) 

sql select * from vdb0.mt

S
scripts  
Shengliang Guan 已提交
99
if $rows != 21 then 
S
slguan 已提交
100 101 102 103 104 105 106 107 108
  return -1
endi

print =============== step7
sql insert into vdb0.vtb00 values(1519833600012, 120) (1519833600011, 110) vdb1.vtb10 values(1519833600012, 120) (1519833600011, 110) vdb2.vtb20 values(1519833600012, 120) (1519833600011, 110) vdb3.vtb30 values(1519833600012, 120) (1519833600011, 110) 
sql insert into vdb0.vtb01 values(1519833600012, 120) (1519833600011, 110) vdb1.vtb11 values(1519833600012, 120) (1519833600011, 110) vdb2.vtb21 values(1519833600012, 120) (1519833600011, 110) vdb3.vtb31 values(1519833600012, 120) (1519833600011, 110) 

sql select * from vdb0.mt

S
scripts  
Shengliang Guan 已提交
109
if $rows != 25 then 
S
slguan 已提交
110 111 112
  return -1
endi

guanshengliang's avatar
scripts  
guanshengliang 已提交
113
system sh/exec.sh -n dnode1 -s stop -x SIGINT