create_all_options.sim 17.6 KB
Newer Older
P
plum-lihui 已提交
1 2 3 4 5 6 7 8 9 10 11
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
sql connect
sql create dnode $hostname port 7200
sql create dnode $hostname port 7300

S
Shengliang Guan 已提交
12 13 14 15 16
$x = 0
step1:
	$x = $x + 1
	sleep 1000
	if $x == 10 then
P
plum-lihui 已提交
17 18 19
	  print ====> dnode not ready!
		return -1
	endi
X
Xiaoyu Wang 已提交
20
sql select * from information_schema.ins_dnodes
P
plum-lihui 已提交
21 22 23
print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data10 $data11 $data12 $data13 $data14 $data15
print ===> $data20 $data21 $data22 $data23 $data24 $data25
S
Shengliang Guan 已提交
24 25
print ===> $data30 $data31 $data32 $data33 $data34 $data35
if $rows != 3 then
P
plum-lihui 已提交
26 27
  return -1
endi
S
Shengliang Guan 已提交
28 29
if $data(1)[4] != ready then
  goto step1
P
plum-lihui 已提交
30
endi
S
Shengliang Guan 已提交
31 32
if $data(2)[4] != ready then
  goto step1
P
plum-lihui 已提交
33
endi
S
Shengliang Guan 已提交
34 35
if $data(3)[4] != ready then
  goto step1
P
plum-lihui 已提交
36 37 38 39
endi

print ============= create database with all options
#database_option: {
H
Hongze Cheng 已提交
40
#  | BUFFER value       [3~16384, default: 256]
41 42
#  | PAGES value        [64~16384, default: 256]
#  | PAGESIZE value     [1~16384, default: 4]
43
#  | CACHEMODEL value   ['node', 'last_row', 'last_value', 'both', default: 'node']
P
plum-lihui 已提交
44
#  | COMP               [0 | 1 | 2, default: 2]
X
Xiaoyu Wang 已提交
45
#  | DURATION value         [60m ~ min(3650d,keep), default: 10d, unit may be minut/hour/day]
X
Xiaoyu Wang 已提交
46
#  | WAL_FSYNC_PERIOD value        [0 ~ 180000 ms, default: 3000]
P
plum-lihui 已提交
47 48 49 50 51
#  | MAXROWS value      [200~10000, default: 4096]
#  | MINROWS value      [10~1000, default: 100]
#  | KEEP value         [max(1d ~ 365000d), default: 1d, unit may be minut/hour/day]
#  | PRECISION          ['ms' | 'us' | 'ns', default: ms]
#  | REPLICA value      [1 | 3, default: 1]
X
Xiaoyu Wang 已提交
52
#  | WAL_LEVEL value          [1 | 2, default: 1]
P
plum-lihui 已提交
53 54 55 56 57 58 59 60
#  | VGROUPS value      [default: 2]
#  | SINGLE_STABLE      [0 | 1, default: ]
#
#$data0_db  : name
#$data1_db  : create_time
#$data2_db  : vgroups
#$data3_db  : ntables
#$data4_db  : replica
61
#$data6_db  : duration
P
plum-lihui 已提交
62 63 64
#$data7_db  : keep
#$data10_db : minrows
#$data11_db : maxrows
X
Xiaoyu Wang 已提交
65
#$data12_db : wal_level
P
plum-lihui 已提交
66 67 68 69 70 71 72
#$data13_db : fsync
#$data14_db : comp
#$data15_db : cachelast
#$data16_db : precision

print ====> create database db, with default
sql create database db
X
Xiaoyu Wang 已提交
73
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
74 75
print rows: $rows
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
76
if $rows != 3 then
P
plum-lihui 已提交
77 78 79 80 81 82 83 84 85 86 87 88
  return -1
endi
if $data0_db != db then # name
  return -1
endi
if $data2_db != 2 then  # vgroups
  return -1
endi
if $data3_db != 0 then  # ntables
  return -1
endi
if $data4_db != 1 then  # replica
89
  print expect 1, actual: $data4_db
P
plum-lihui 已提交
90 91
  return -1
endi
92
if $data5_db != off then  # strict
P
plum-lihui 已提交
93 94
  return -1
endi
D
dapan1121 已提交
95
if $data6_db != 14400m then  # duration
P
plum-lihui 已提交
96 97
  return -1
endi
X
Xiaoyu Wang 已提交
98
if $data7_db != 5256000m,5256000m,5256000m then # keep
P
plum-lihui 已提交
99 100
  return -1
endi
H
Hongze Cheng 已提交
101
if $data8_db != 256 then  # buffer
102 103 104 105 106 107 108 109 110
  return -1
endi
if $data9_db != 4 then  # pagesize
  return -1
endi
if $data10_db != 256 then  # pages
  return -1
endi
if $data11_db != 100 then  # minrows
P
plum-lihui 已提交
111 112
  return -1
endi
113
if $data12_db != 4096 then  # maxrows
P
plum-lihui 已提交
114 115
  return -1
endi
116
if $data13_db != 2 then  # comp
P
plum-lihui 已提交
117 118
  return -1
endi
119
if $data14_db != ms then  # precision
P
plum-lihui 已提交
120 121
  return -1
endi
122
if $data18_db != none then  # cachelast
P
plum-lihui 已提交
123 124
  return -1
endi
X
Xiaoyu Wang 已提交
125
if $data20_db != 1 then  # wal_level
P
plum-lihui 已提交
126 127
  return -1
endi
X
Xiaoyu Wang 已提交
128
if $data21_db != 3000 then  # wal_fsync_period
P
plum-lihui 已提交
129 130
  return -1
endi
131

P
plum-lihui 已提交
132 133
sql drop database db

X
Xiaoyu Wang 已提交
134 135
#print ====> BLOCKS value       [3~1000, default: 6]
#sql create database db BLOCKS 3
X
Xiaoyu Wang 已提交
136
#sql select * from information_schema.ins_databases
X
Xiaoyu Wang 已提交
137 138 139 140 141
#print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
#if $data9_db != 3 then
#  return -1
#endi
#sql drop database db
P
plum-lihui 已提交
142

X
Xiaoyu Wang 已提交
143
#sql create database db BLOCKS 1000
X
Xiaoyu Wang 已提交
144
#sql select * from information_schema.ins_databases
X
Xiaoyu Wang 已提交
145 146 147 148 149 150 151 152
#print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
#if $data9_db != 1000 then
#  return -1
#endi
#sql drop database db
#sql_error create database db BLOCKS 2
#sql_error create database db BLOCKS 0
#sql_error create database db BLOCKS -1
P
plum-lihui 已提交
153

X
Xiaoyu Wang 已提交
154 155
#print ====> CACHE value [default: 16]
#sql create database db CACHE 1
X
Xiaoyu Wang 已提交
156
#sql select * from information_schema.ins_databases
X
Xiaoyu Wang 已提交
157 158 159 160 161
#print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
#if $data8_db != 1 then
#  return -1
#endi
#sql drop database db
P
plum-lihui 已提交
162

X
Xiaoyu Wang 已提交
163
#sql create database db CACHE 128
X
Xiaoyu Wang 已提交
164
#sql select * from information_schema.ins_databases
X
Xiaoyu Wang 已提交
165 166 167 168 169
#print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
#if $data8_db != 128 then
#  return -1
#endi
#sql drop database db
P
plum-lihui 已提交
170

171 172
print ====> CACHEMODEL value [0, 1, 2, 3, default: 0]
sql create database db CACHEMODEL 'last_row'
X
Xiaoyu Wang 已提交
173
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
174
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
175
if $data18_db != last_row then
P
plum-lihui 已提交
176 177 178 179
  return -1
endi
sql drop database db

180
sql create database db CACHEMODEL 'last_value'
X
Xiaoyu Wang 已提交
181
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
182
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
183
if $data18_db != last_value then
P
plum-lihui 已提交
184 185 186 187
  return -1
endi
sql drop database db

188
sql create database db CACHEMODEL 'both'
X
Xiaoyu Wang 已提交
189
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
190
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
191
if $data18_db != both then
P
plum-lihui 已提交
192 193 194
  return -1
endi
sql drop database db
195 196
sql_error create database db CACHEMODEL 'other'
sql_error create database db CACHEMODEL '-1'
P
plum-lihui 已提交
197 198 199

print ====> COMP [0 | 1 | 2, default: 2]
sql create database db COMP 1
X
Xiaoyu Wang 已提交
200
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
201
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
202
if $data13_db != 1 then
P
plum-lihui 已提交
203 204 205 206 207
  return -1
endi
sql drop database db

sql create database db COMP 0
X
Xiaoyu Wang 已提交
208
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
209
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
210
if $data13_db != 0 then
P
plum-lihui 已提交
211 212 213 214 215 216
  return -1
endi
sql drop database db
sql_error create database db COMP 3
sql_error create database db COMP -1

X
Xiaoyu Wang 已提交
217
#print ====> DURATION value [60m ~ min(3650d,keep), default: 10d, unit may be minut/hour/day]
P
plum-lihui 已提交
218
#print ====> KEEP value [max(1d ~ 365000d), default: 1d, unit may be minut/hour/day]
X
Xiaoyu Wang 已提交
219
#sql create database db DURATION 60m KEEP 60m
X
Xiaoyu Wang 已提交
220
#sql select * from information_schema.ins_databases
P
plum-lihui 已提交
221 222 223 224 225 226 227 228
#print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
#if $data6_db != 60 then
#  return -1
#endi
#if $data7_db != 60,60,60 then
#  return -1
#endi
#sql drop database db
X
Xiaoyu Wang 已提交
229
#sql create database db DURATION 60m KEEP 1d
X
Xiaoyu Wang 已提交
230
#sql select * from information_schema.ins_databases
P
plum-lihui 已提交
231 232 233 234 235 236 237
#print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
#if $data6_db != 60 then
#  return -1
#endi
#if $data7_db != 1440,1440,1440 then
#  return -1
#endi
X
Xiaoyu Wang 已提交
238
#sql create database db DURATION 3650d KEEP 365000d
X
Xiaoyu Wang 已提交
239
#sql select * from information_schema.ins_databases
P
plum-lihui 已提交
240 241 242 243 244 245 246 247
#print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
#if $data6_db != 5256000 then
#  return -1
#endi
#if $data7_db != 525600000,525600000,525600000 then
#  return -1
#endi
#sql drop database db
X
Xiaoyu Wang 已提交
248 249 250 251
#sql_error create database db DURATION -59m
#sql_error create database db DURATION 59m
#sql_error create database db DURATION 5256001m
#sql_error create database db DURATION 3651d
P
plum-lihui 已提交
252 253 254 255 256
#sql_error create database db KEEP -59m
#sql_error create database db KEEP 14399m
#sql_error create database db KEEP 525600001m
#sql_error create database db KEEP 365001d

X
Xiaoyu Wang 已提交
257 258
print ====> WAL_FSYNC_PERIOD value [0 ~ 180000 ms, default: 3000]
sql create database db WAL_FSYNC_PERIOD 0
X
Xiaoyu Wang 已提交
259
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
260
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
261
if $data21_db != 0 then
P
plum-lihui 已提交
262 263 264 265
  return -1
endi
sql drop database db

X
Xiaoyu Wang 已提交
266
sql create database db WAL_FSYNC_PERIOD 180000
X
Xiaoyu Wang 已提交
267
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
268
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
269
if $data21_db != 180000 then
P
plum-lihui 已提交
270 271 272
  return -1
endi
sql drop database db
X
Xiaoyu Wang 已提交
273 274
sql_error create database db WAL_FSYNC_PERIOD 180001
sql_error create database db WAL_FSYNC_PERIOD -1
P
plum-lihui 已提交
275 276 277

print ====> MAXROWS value [200~10000, default: 4096], MINROWS value [10~1000, default: 100]
sql create database db MAXROWS 10000 MINROWS 1000
X
Xiaoyu Wang 已提交
278
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
279
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
280
if $data11_db != 1000 then
P
plum-lihui 已提交
281 282
  return -1
endi
283
if $data12_db != 10000 then
P
plum-lihui 已提交
284 285 286 287 288
  return -1
endi
sql drop database db

sql create database db MAXROWS 200 MINROWS 10
X
Xiaoyu Wang 已提交
289
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
290
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
291
if $data11_db != 10 then
P
plum-lihui 已提交
292 293
  return -1
endi
294
if $data12_db != 200 then
P
plum-lihui 已提交
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309
  return -1
endi
sql drop database db
sql_error create database db MAXROWS -1
sql_error create database db MAXROWS 0
sql_error create database db MAXROWS 199
sql_error create database db MAXROWS 10001
sql_error create database db MINROWS -1
sql_error create database db MINROWS 0
sql_error create database db MINROWS 9
sql_error create database db MINROWS 1001
sql_error create database db MAXROWS 500 MINROWS 1000

print ====> PRECISION ['ms' | 'us' | 'ns', default: ms]
sql create database db PRECISION 'us'
X
Xiaoyu Wang 已提交
310
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
311
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
312
if $data14_db != us then
P
plum-lihui 已提交
313 314 315 316 317
  return -1
endi
sql drop database db

sql create database db PRECISION 'ns'
X
Xiaoyu Wang 已提交
318
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
319
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
320
if $data14_db != ns then
P
plum-lihui 已提交
321 322 323 324 325 326
  return -1
endi
sql drop database db
sql_error create database db PRECISION 'as'
sql_error create database db PRECISION -1

P
plum-lihui 已提交
327 328
print ====> QUORUM value [1 | 2, default: 1] 3.0 not support this item
#sql_error create database db QUORUM 2
X
Xiaoyu Wang 已提交
329
#sql select * from information_schema.ins_databases
P
plum-lihui 已提交
330 331 332 333 334 335
#print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
#if $data5_db != 2 then
#  return -1
#endi
#sql drop database db

S
Shengliang Guan 已提交
336
#sql create database db QUORUM 1
X
Xiaoyu Wang 已提交
337
#sql select * from information_schema.ins_databases
S
Shengliang Guan 已提交
338 339 340 341 342
#print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
#if $data5_db != 1 then
#  return -1
#endi
#sql drop database db
P
plum-lihui 已提交
343 344 345 346 347
sql_error create database db QUORUM 1
sql_error create database db QUORUM 2
sql_error create database db QUORUM 3
sql_error create database db QUORUM 0
sql_error create database db QUORUM -1
P
plum-lihui 已提交
348 349 350

print ====> REPLICA value [1 | 3, default: 1]
sql create database db REPLICA 3
X
Xiaoyu Wang 已提交
351
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
352 353 354 355 356 357 358
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data4_db != 3 then
  return -1
endi
sql drop database db

sql create database db REPLICA 1
X
Xiaoyu Wang 已提交
359
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
360 361 362 363 364 365 366 367 368 369
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data4_db != 1 then
  return -1
endi
sql drop database db
sql_error create database db REPLICA 2
sql_error create database db REPLICA 0
sql_error create database db REPLICA -1
sql_error create database db REPLICA 4

X
Xiaoyu Wang 已提交
370 371
#print ====> TTL value [1d ~ , default: 1]
#sql create database db TTL 1
X
Xiaoyu Wang 已提交
372
#sql select * from information_schema.ins_databases
X
Xiaoyu Wang 已提交
373
#print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
P
plum-lihui 已提交
374 375 376
#if $dataXX_db != 1 then
#  return -1
#endi
X
Xiaoyu Wang 已提交
377
#sql drop database db
P
plum-lihui 已提交
378

X
Xiaoyu Wang 已提交
379
#sql create database db TTL 10
X
Xiaoyu Wang 已提交
380
#sql select * from information_schema.ins_databases
X
Xiaoyu Wang 已提交
381
#print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
P
plum-lihui 已提交
382 383 384
#if $dataXX_db != 10 then
#  return -1
#endi
X
Xiaoyu Wang 已提交
385 386 387
#sql drop database db
#sql_error create database db TTL 0
#sql_error create database db TTL -1
P
plum-lihui 已提交
388

X
Xiaoyu Wang 已提交
389 390
print ====> WAL_LEVEL value [1 | 2, default: 1]
sql create database db WAL_LEVEL 2
X
Xiaoyu Wang 已提交
391
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
392
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
393
if $data20_db != 2 then
P
plum-lihui 已提交
394 395 396 397
  return -1
endi
sql drop database db

X
Xiaoyu Wang 已提交
398
sql create database db WAL_LEVEL 1
X
Xiaoyu Wang 已提交
399
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
400
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
401
if $data20_db != 1 then
P
plum-lihui 已提交
402 403 404
  return -1
endi
sql drop database db
X
Xiaoyu Wang 已提交
405 406 407
sql_error create database db WAL_LEVEL 3
sql_error create database db WAL_LEVEL -1
sql_error create database db WAL_LEVEL 0
P
plum-lihui 已提交
408 409 410

print ====> VGROUPS value [1~4096, default: 2]
sql create database db VGROUPS 1
X
Xiaoyu Wang 已提交
411
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
412 413 414 415 416 417 418
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data2_db != 1 then
  return -1
endi
sql drop database db

sql create database db VGROUPS 16
X
Xiaoyu Wang 已提交
419
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
420 421 422 423 424 425 426 427 428 429 430
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data2_db != 16 then
  return -1
endi
sql drop database db
sql_error create database db VGROUPS 4097
sql_error create database db VGROUPS -1
sql_error create database db VGROUPS 0

print ====> SINGLE_STABLE [0 | 1, default: ]
sql create database db SINGLE_STABLE 1
X
Xiaoyu Wang 已提交
431
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
432 433 434 435 436 437 438
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
#if $dataXXXX_db != 1 then
#  return -1
#endi
sql drop database db

sql create database db SINGLE_STABLE 0
X
Xiaoyu Wang 已提交
439
sql select * from information_schema.ins_databases
P
plum-lihui 已提交
440 441 442 443 444 445 446 447
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
#if $dataXXXX_db != 0 then
#  return -1
#endi
sql drop database db
sql_error create database db SINGLE_STABLE 2
sql_error create database db SINGLE_STABLE -1

X
Xiaoyu Wang 已提交
448 449
#print ====> STREAM_MODE [0 | 1, default: ]
#sql create database db STREAM_MODE 1
X
Xiaoyu Wang 已提交
450
#sql select * from information_schema.ins_databases
X
Xiaoyu Wang 已提交
451
#print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
P
plum-lihui 已提交
452 453 454
#if $dataXXX_db != 1 then
#  return -1
#endi
X
Xiaoyu Wang 已提交
455
#sql drop database db
P
plum-lihui 已提交
456

X
Xiaoyu Wang 已提交
457
#sql create database db STREAM_MODE 0
X
Xiaoyu Wang 已提交
458
#sql select * from information_schema.ins_databases
X
Xiaoyu Wang 已提交
459
#print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
P
plum-lihui 已提交
460 461 462
#if $dataXXX_db != 0 then
#  return -1
#endi
X
Xiaoyu Wang 已提交
463 464 465
#sql drop database db
#sql_error create database db STREAM_MODE 2
#sql_error create database db STREAM_MODE -1
P
plum-lihui 已提交
466

467 468 469
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT