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

S
slguan 已提交
3
system sh/deploy.sh -n dnode1 -i 1
S
Shengliang Guan 已提交
4
system sh/cfg.sh -n dnode1 -c wallevel -v 2
S
slguan 已提交
5 6
system sh/exec.sh -n dnode1 -s start

H
Haojun Liao 已提交
7
sleep 2000
S
slguan 已提交
8 9 10 11 12 13 14 15
sql connect

print ======== step1 
sql create database d3
sql use d3
sql create table tb (ts timestamp, a int)
sql insert into tb values(now-28d, -28)
sql select * from tb order by ts desc
S
Shengliang Guan 已提交
16 17
print $data00 $data01 $data02 $data03 $data04 $data05 $data06

S
slguan 已提交
18 19 20 21 22 23
if $rows != 1 then
  return -1
endi
if $data01 != -28 then
  return -1
endi
S
Shengliang Guan 已提交
24
if $data02 != null then
S
slguan 已提交
25 26
  return -1
endi
S
Shengliang Guan 已提交
27
if $data03 != null then
S
slguan 已提交
28 29
  return -1
endi
S
Shengliang Guan 已提交
30
if $data04 != null then
S
slguan 已提交
31 32
  return -1
endi
S
Shengliang Guan 已提交
33
if $data05 != null then
S
slguan 已提交
34 35
  return -1
endi
S
Shengliang Guan 已提交
36
if $data06 != null then
S
slguan 已提交
37 38
  return -1
endi
S
Shengliang Guan 已提交
39
if $data07 != null then
S
slguan 已提交
40 41
  return -1
endi
S
Shengliang Guan 已提交
42
if $data08 != null then
S
slguan 已提交
43 44 45 46 47 48 49
  return -1
endi

print ======== step2
sql alter table tb add column b smallint
sql insert into tb values(now-25d, -25, 0)
sql select * from tb order by ts desc
S
Shengliang Guan 已提交
50 51
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
print $data10 $data11 $data12 $data13 $data14 $data15 $data16
S
slguan 已提交
52 53 54 55 56 57 58 59 60 61 62 63
if $rows != 2 then
  return -1
endi
if $data01 != -25 then
  return -1
endi
if $data11 != -28 then
  return -1
endi
if $data02 != 0 then
  return -1
endi
64
if $data12 != NULL then
S
slguan 已提交
65 66
  return -1
endi
S
Shengliang Guan 已提交
67
if $data13 != null then
S
slguan 已提交
68 69
  return -1
endi
S
Shengliang Guan 已提交
70
if $data14 != null then
S
slguan 已提交
71 72
  return -1
endi
S
Shengliang Guan 已提交
73
if $data15 != null then
S
slguan 已提交
74 75
  return -1
endi
S
Shengliang Guan 已提交
76
if $data16 != null then
S
slguan 已提交
77 78
  return -1
endi
S
Shengliang Guan 已提交
79
if $data17 != null then
S
slguan 已提交
80 81
  return -1
endi
S
Shengliang Guan 已提交
82
if $data18 != null then
S
slguan 已提交
83 84 85 86 87 88 89
  return -1
endi

print ======== step3
sql alter table tb add column c tinyint
sql insert into tb values(now-22d, -22, 3, 0)
sql select * from tb order by ts asc
S
Shengliang Guan 已提交
90 91 92
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
print $data10 $data11 $data12 $data13 $data14 $data15 $data16
print $data20 $data21 $data22 $data23 $data24 $data25 $data26
S
slguan 已提交
93 94 95 96 97 98
if $rows != 3 then then
  return -1
endi
if $data01 != -28 then
  return -1
endi
99
if $data02 != NULL then
S
slguan 已提交
100 101
  return -1
endi
102
if $data03 != NULL then
S
slguan 已提交
103 104
  return -1
endi
S
Shengliang Guan 已提交
105
if $data04 != null then
S
slguan 已提交
106 107
  return -1
endi
S
Shengliang Guan 已提交
108
if $data05 != null then
S
slguan 已提交
109 110
  return -1
endi
S
Shengliang Guan 已提交
111
if $data06 != null then
S
slguan 已提交
112 113
  return -1
endi
S
Shengliang Guan 已提交
114
if $data07 != null then
S
slguan 已提交
115 116
  return -1
endi
S
Shengliang Guan 已提交
117
if $data08 != null then
S
slguan 已提交
118 119 120 121 122 123 124 125
  return -1
endi
if $data11 != -25 then
  return -1
endi
if $data12 != 0 then
  return -1
endi
126
if $data13 != NULL then
S
slguan 已提交
127 128
  return -1
endi
S
Shengliang Guan 已提交
129
if $data14 != null then
S
slguan 已提交
130 131
  return -1
endi
S
Shengliang Guan 已提交
132
if $data15 != null then
S
slguan 已提交
133 134
  return -1
endi
S
Shengliang Guan 已提交
135
if $data16 != null then
S
slguan 已提交
136 137
  return -1
endi
S
Shengliang Guan 已提交
138
if $data17 != null then
S
slguan 已提交
139 140
  return -1
endi
S
Shengliang Guan 已提交
141
if $data18 != null then
S
slguan 已提交
142 143 144 145 146 147 148 149 150 151 152
  return -1
endi
if $data21 != -22 then
  return -1
endi
if $data22 != 3 then
  return -1
endi
if $data23 != 0 then
  return -1
endi
S
Shengliang Guan 已提交
153
if $data24 != null then
S
slguan 已提交
154 155
  return -1
endi
S
Shengliang Guan 已提交
156
if $data25 != null then
S
slguan 已提交
157 158
  return -1
endi
S
Shengliang Guan 已提交
159
if $data26 != null then
S
slguan 已提交
160 161
  return -1
endi
S
Shengliang Guan 已提交
162
if $data27 != null then
S
slguan 已提交
163 164
  return -1
endi
S
Shengliang Guan 已提交
165
if $data28 != null then
S
slguan 已提交
166 167 168 169 170 171 172 173 174 175 176 177 178
  return -1
endi

print ======== step4
sql alter table tb add column d int
sql insert into tb values(now-19d, -19, 6, 3, 0)
sql select * from tb order by ts asc
if $rows != 4 then then
  return -1
endi
if $data01 != -28 then
  return -1
endi
179
if $data02 != NULL then
S
slguan 已提交
180 181
  return -1
endi
182
if $data03 != NULL then
S
slguan 已提交
183 184
  return -1
endi
185
if $data04 != NULL then
S
slguan 已提交
186 187
  return -1
endi
S
Shengliang Guan 已提交
188
if $data05 != null then
S
slguan 已提交
189 190
  return -1
endi
S
Shengliang Guan 已提交
191
if $data06 != null then
S
slguan 已提交
192 193
  return -1
endi
S
Shengliang Guan 已提交
194
if $data07 != null then
S
slguan 已提交
195 196
  return -1
endi
S
Shengliang Guan 已提交
197
if $data08 != null then
S
slguan 已提交
198 199 200 201 202 203 204 205
  return -1
endi
if $data11 != -25 then
  return -1
endi
if $data12 != 0 then
  return -1
endi
206
if $data13 != NULL then
S
slguan 已提交
207 208
  return -1
endi
209
if $data14 != NULL then
S
slguan 已提交
210 211
  return -1
endi
S
Shengliang Guan 已提交
212
if $data15 != null then
S
slguan 已提交
213 214
  return -1
endi
S
Shengliang Guan 已提交
215
if $data16 != null then
S
slguan 已提交
216 217
  return -1
endi
S
Shengliang Guan 已提交
218
if $data17 != null then
S
slguan 已提交
219 220
  return -1
endi
S
Shengliang Guan 已提交
221
if $data18 != null then
S
slguan 已提交
222 223 224 225 226 227 228 229 230 231 232
  return -1
endi
if $data21 != -22 then
  return -1
endi
if $data22 != 3 then
  return -1
endi
if $data23 != 0 then
  return -1
endi
233
if $data24 != NULL then
S
slguan 已提交
234 235
  return -1
endi
S
Shengliang Guan 已提交
236
if $data25 != null then
S
slguan 已提交
237 238
  return -1
endi
S
Shengliang Guan 已提交
239
if $data26 != null then
S
slguan 已提交
240 241
  return -1
endi
S
Shengliang Guan 已提交
242
if $data27 != null then
S
slguan 已提交
243 244
  return -1
endi
S
Shengliang Guan 已提交
245
if $data28 != null then
S
slguan 已提交
246 247 248 249 250 251 252 253 254 255 256 257 258 259
  return -1
endi
if $data31 != -19 then
  return -1
endi
if $data32 != 6 then
  return -1
endi
if $data33 != 3 then
  return -1
endi
if $data34 != 0 then
  return -1
endi
S
Shengliang Guan 已提交
260
if $data35 != null then
S
slguan 已提交
261 262
  return -1
endi
S
Shengliang Guan 已提交
263
if $data36 != null then
S
slguan 已提交
264 265
  return -1
endi
S
Shengliang Guan 已提交
266
if $data37 != null then
S
slguan 已提交
267 268
  return -1
endi
S
Shengliang Guan 已提交
269
if $data38 != null then
S
slguan 已提交
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
  return -1
endi

print ======== step5
sql alter table tb add column e bigint
sql insert into tb values(now-16d, -16, 9, 5, 4, 3)
sql select count(e) from tb
if $data00 != 1 then
  return -1
endi
sql select count(c) from tb
if $data00 != 3 then then
  return -1
endi
sql select * from tb order by ts asc
if $rows != 5 then then
  return -1
endi
if $data01 != -28 then
  return -1
endi
291
if $data02 != NULL then
S
slguan 已提交
292 293
  return -1
endi
294
if $data03 != NULL then
S
slguan 已提交
295 296
  return -1
endi
297
if $data04 != NULL then
S
slguan 已提交
298 299
  return -1
endi
300
if $data05 != NULL then
S
slguan 已提交
301 302
  return -1
endi
S
Shengliang Guan 已提交
303
if $data06 != null then
S
slguan 已提交
304 305
  return -1
endi
S
Shengliang Guan 已提交
306
if $data07 != null then
S
slguan 已提交
307 308
  return -1
endi
S
Shengliang Guan 已提交
309
if $data08 != null then
S
slguan 已提交
310 311 312 313 314 315 316 317
  return -1
endi
if $data11 != -25 then
  return -1
endi
if $data12 != 0 then
  return -1
endi
318
if $data13 != NULL then
S
slguan 已提交
319 320
  return -1
endi
321
if $data14 != NULL then
S
slguan 已提交
322 323
  return -1
endi
324
if $data15 != NULL then
S
slguan 已提交
325 326
  return -1
endi
S
Shengliang Guan 已提交
327
if $data16 != null then
S
slguan 已提交
328 329
  return -1
endi
S
Shengliang Guan 已提交
330
if $data17 != null then
S
slguan 已提交
331 332
  return -1
endi
S
Shengliang Guan 已提交
333
if $data18 != null then
S
slguan 已提交
334 335 336 337 338 339 340 341 342 343 344
  return -1
endi
if $data21 != -22 then
  return -1
endi
if $data22 != 3 then
  return -1
endi
if $data23 != 0 then
  return -1
endi
345
if $data24 != NULL then
S
slguan 已提交
346 347
  return -1
endi
348
if $data25 != NULL then
S
slguan 已提交
349 350
  return -1
endi
S
Shengliang Guan 已提交
351
if $data26 != null then
S
slguan 已提交
352 353
  return -1
endi
S
Shengliang Guan 已提交
354
if $data27 != null then
S
slguan 已提交
355 356
  return -1
endi
S
Shengliang Guan 已提交
357
if $data28 != null then
S
slguan 已提交
358 359 360 361 362 363 364 365 366 367 368 369 370 371
  return -1
endi
if $data31 != -19 then
  return -1
endi
if $data32 != 6 then
  return -1
endi
if $data33 != 3 then
  return -1
endi
if $data34 != 0 then
  return -1
endi
372
if $data35 != NULL then
S
slguan 已提交
373 374
  return -1
endi
S
Shengliang Guan 已提交
375
if $data36 != null then
S
slguan 已提交
376 377
  return -1
endi
S
Shengliang Guan 已提交
378
if $data37 != null then
S
slguan 已提交
379 380
  return -1
endi
S
Shengliang Guan 已提交
381
if $data38 != null then
S
slguan 已提交
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398
  return -1
endi
if $data41 != -16 then
  return -1
endi
if $data42 != 9 then
  return -1
endi
if $data43 != 5 then
  return -1
endi
if $data44 != 4 then
  return -1
endi
if $data45 != 3 then
  return -1
endi
S
Shengliang Guan 已提交
399
if $data46 != null then
S
slguan 已提交
400 401
  return -1
endi
S
Shengliang Guan 已提交
402
if $data47 != null then
S
slguan 已提交
403 404
  return -1
endi
S
Shengliang Guan 已提交
405
if $data48 != null then
S
slguan 已提交
406 407 408 409 410 411 412 413 414 415 416 417 418
  return -1
endi

print ======== step6
sql alter table tb add column f float
sql insert into tb values(now-13d, -13, 12, 11, 10, 9, 8)
sql select * from tb order by ts asc
if $rows != 6 then then
  return -1
endi
if $data01 != -28 then
  return -1
endi
419
if $data02 != NULL then
S
slguan 已提交
420 421
  return -1
endi
422
if $data03 != NULL then
S
slguan 已提交
423 424
  return -1
endi
425
if $data04 != NULL then
S
slguan 已提交
426 427
  return -1
endi
428
if $data05 != NULL then
S
slguan 已提交
429 430
  return -1
endi
431
if $data06 != NULL then
S
slguan 已提交
432 433
  return -1
endi
S
Shengliang Guan 已提交
434
if $data07 != null then
S
slguan 已提交
435 436
  return -1
endi
S
Shengliang Guan 已提交
437
if $data08 != null then
S
slguan 已提交
438 439 440 441 442 443 444 445
  return -1
endi
if $data11 != -25 then
  return -1
endi
if $data12 != 0 then
  return -1
endi
446
if $data13 != NULL then
S
slguan 已提交
447 448
  return -1
endi
449
if $data14 != NULL then
S
slguan 已提交
450 451
  return -1
endi
452
if $data15 != NULL then
S
slguan 已提交
453 454
  return -1
endi
455
if $data16 != NULL then
S
slguan 已提交
456 457
  return -1
endi
S
Shengliang Guan 已提交
458
if $data17 != null then
S
slguan 已提交
459 460
  return -1
endi
S
Shengliang Guan 已提交
461
if $data18 != null then
S
slguan 已提交
462 463 464 465 466 467 468 469 470 471 472
  return -1
endi
if $data21 != -22 then
  return -1
endi
if $data22 != 3 then
  return -1
endi
if $data23 != 0 then
  return -1
endi
473
if $data24 != NULL then
S
slguan 已提交
474 475
  return -1
endi
476
if $data25 != NULL then
S
slguan 已提交
477 478
  return -1
endi
479
if $data26 != NULL then
S
slguan 已提交
480 481
  return -1
endi
S
Shengliang Guan 已提交
482
if $data27 != null then
S
slguan 已提交
483 484
  return -1
endi
S
Shengliang Guan 已提交
485
if $data28 != null then
S
slguan 已提交
486 487 488 489 490 491 492 493 494 495 496 497 498 499
  return -1
endi
if $data31 != -19 then
  return -1
endi
if $data32 != 6 then
  return -1
endi
if $data33 != 3 then
  return -1
endi
if $data34 != 0 then
  return -1
endi
500
if $data35 != NULL then
S
slguan 已提交
501 502
  return -1
endi
503
if $data36 != NULL then
S
slguan 已提交
504 505
  return -1
endi
S
Shengliang Guan 已提交
506
if $data37 != null then
S
slguan 已提交
507 508
  return -1
endi
S
Shengliang Guan 已提交
509
if $data38 != null then
S
slguan 已提交
510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526
  return -1
endi
if $data41 != -16 then
  return -1
endi
if $data42 != 9 then
  return -1
endi
if $data43 != 5 then
  return -1
endi
if $data44 != 4 then
  return -1
endi
if $data45 != 3 then
  return -1
endi
527
if $data46 != NULL then
S
slguan 已提交
528 529
  return -1
endi
S
Shengliang Guan 已提交
530
if $data47 != null then
S
slguan 已提交
531 532
  return -1
endi
S
Shengliang Guan 已提交
533
if $data48 != null then
S
slguan 已提交
534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553
  return -1
endi
if $data51 != -13 then
  return -1
endi
if $data52 != 12 then
  return -1
endi
if $data53 != 11 then
  return -1
endi
if $data54 != 10 then
  return -1
endi
if $data55 != 9 then
  return -1
endi
if $data56 != 8.00000 then
  return -1
endi
S
Shengliang Guan 已提交
554
if $data57 != null then
S
slguan 已提交
555 556
  return -1
endi
S
Shengliang Guan 已提交
557
if $data58 != null then
S
slguan 已提交
558 559 560 561 562 563 564 565 566 567 568 569 570
  return -1
endi

print ======== step7
sql alter table tb add column g double
sql insert into tb values(now-10d, -10, 15, 14, 13, 12, 11, 10)
sql select * from tb order by ts asc
if $rows != 7 then
  return -1
endi
if $data01 != -28 then
  return -1
endi
571
if $data02 != NULL then
S
slguan 已提交
572 573
  return -1
endi
574
if $data03 != NULL then
S
slguan 已提交
575 576
  return -1
endi
577
if $data04 != NULL then
S
slguan 已提交
578 579
  return -1
endi
580
if $data05 != NULL then
S
slguan 已提交
581 582
  return -1
endi
583
if $data06 != NULL then
S
slguan 已提交
584 585
  return -1
endi
586
if $data07 != NULL then
S
slguan 已提交
587 588
  return -1
endi
S
Shengliang Guan 已提交
589
if $data08 != null then
S
slguan 已提交
590 591 592 593 594 595 596 597
  return -1
endi
if $data11 != -25 then
  return -1
endi
if $data12 != 0 then
  return -1
endi
598
if $data13 != NULL then
S
slguan 已提交
599 600
  return -1
endi
601
if $data14 != NULL then
S
slguan 已提交
602 603
  return -1
endi
604
if $data15 != NULL then
S
slguan 已提交
605 606
  return -1
endi
607
if $data16 != NULL then
S
slguan 已提交
608 609
  return -1
endi
610
if $data17 != NULL then
S
slguan 已提交
611 612
  return -1
endi
S
Shengliang Guan 已提交
613
if $data18 != null then
S
slguan 已提交
614 615 616 617 618 619 620 621 622 623 624
  return -1
endi
if $data21 != -22 then
  return -1
endi
if $data22 != 3 then
  return -1
endi
if $data23 != 0 then
  return -1
endi
625
if $data24 != NULL then
S
slguan 已提交
626 627
  return -1
endi
628
if $data25 != NULL then
S
slguan 已提交
629 630
  return -1
endi
631
if $data26 != NULL then
S
slguan 已提交
632 633
  return -1
endi
634
if $data27 != NULL then
S
slguan 已提交
635 636
  return -1
endi
S
Shengliang Guan 已提交
637
if $data28 != null then
S
slguan 已提交
638 639 640 641 642 643 644 645 646 647 648 649 650 651
  return -1
endi
if $data31 != -19 then
  return -1
endi
if $data32 != 6 then
  return -1
endi
if $data33 != 3 then
  return -1
endi
if $data34 != 0 then
  return -1
endi
652
if $data35 != NULL then
S
slguan 已提交
653 654
  return -1
endi
655
if $data36 != NULL then
S
slguan 已提交
656 657
  return -1
endi
658
if $data37 != NULL then
S
slguan 已提交
659 660
  return -1
endi
S
Shengliang Guan 已提交
661
if $data38 != null then
S
slguan 已提交
662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678
  return -1
endi
if $data41 != -16 then
  return -1
endi
if $data42 != 9 then
  return -1
endi
if $data43 != 5 then
  return -1
endi
if $data44 != 4 then
  return -1
endi
if $data45 != 3 then
  return -1
endi
679
if $data46 != NULL then
S
slguan 已提交
680 681
  return -1
endi
682
if $data47 != NULL then
S
slguan 已提交
683 684
  return -1
endi
S
Shengliang Guan 已提交
685
if $data48 != null then
S
slguan 已提交
686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705
  return -1
endi
if $data51 != -13 then
  return -1
endi
if $data52 != 12 then
  return -1
endi
if $data53 != 11 then
  return -1
endi
if $data54 != 10 then
  return -1
endi
if $data55 != 9 then
  return -1
endi
if $data56 != 8.00000 then
  return -1
endi
706
if $data57 != NULL then
S
slguan 已提交
707 708
  return -1
endi
S
Shengliang Guan 已提交
709
if $data58 != null then
S
slguan 已提交
710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732
  return -1
endi
if $data61 != -10 then
  return -1
endi
if $data62 != 15 then
  return -1
endi
if $data63 != 14 then
  return -1
endi
if $data64 != 13 then
  return -1
endi
if $data65 != 12 then
  return -1
endi
if $data66 != 11.00000 then
  return -1
endi
if $data67 != 10.000000000 then
  return -1
endi
S
Shengliang Guan 已提交
733
if $data68 != null then
S
slguan 已提交
734 735 736 737 738 739 740 741 742 743 744 745 746
  return -1
endi

print ======== step8
sql alter table tb add column h binary(10)
sql insert into tb values(now-7d, -7, 18, 17, 16, 15, 14, 13, '11')
sql select * from tb order by ts asc
if $rows != 8 then
  return -1
endi
if $data01 != -28 then
  return -1
endi
747
if $data02 != NULL then
S
slguan 已提交
748 749
  return -1
endi
750
if $data03 != NULL then
S
slguan 已提交
751 752
  return -1
endi
753
if $data04 != NULL then
S
slguan 已提交
754 755
  return -1
endi
756
if $data05 != NULL then
S
slguan 已提交
757 758
  return -1
endi
759
if $data06 != NULL then
S
slguan 已提交
760 761
  return -1
endi
762
if $data07 != NULL then
S
slguan 已提交
763 764
  return -1
endi
765
if $data08 != NULL then
S
slguan 已提交
766 767 768 769 770 771 772 773
  return -1
endi
if $data11 != -25 then
  return -1
endi
if $data12 != 0 then
  return -1
endi
774
if $data13 != NULL then
S
slguan 已提交
775 776
  return -1
endi
777
if $data14 != NULL then
S
slguan 已提交
778 779
  return -1
endi
780
if $data15 != NULL then
S
slguan 已提交
781 782
  return -1
endi
783
if $data16 != NULL then
S
slguan 已提交
784 785
  return -1
endi
786
if $data17 != NULL then
S
slguan 已提交
787 788
  return -1
endi
789
if $data18 != NULL then
S
slguan 已提交
790 791 792 793 794 795 796 797 798 799 800
  return -1
endi
if $data21 != -22 then
  return -1
endi
if $data22 != 3 then
  return -1
endi
if $data23 != 0 then
  return -1
endi
801
if $data24 != NULL then
S
slguan 已提交
802 803
  return -1
endi
804
if $data25 != NULL then
S
slguan 已提交
805 806
  return -1
endi
807
if $data26 != NULL then
S
slguan 已提交
808 809
  return -1
endi
810
if $data27 != NULL then
S
slguan 已提交
811 812
  return -1
endi
813
if $data28 != NULL then
S
slguan 已提交
814 815 816 817 818 819 820 821 822 823 824 825 826 827
  return -1
endi
if $data31 != -19 then
  return -1
endi
if $data32 != 6 then
  return -1
endi
if $data33 != 3 then
  return -1
endi
if $data34 != 0 then
  return -1
endi
828
if $data35 != NULL then
S
slguan 已提交
829 830
  return -1
endi
831
if $data36 != NULL then
S
slguan 已提交
832 833
  return -1
endi
834
if $data37 != NULL then
S
slguan 已提交
835 836
  return -1
endi
837
if $data38 != NULL then
S
slguan 已提交
838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854
  return -1
endi
if $data41 != -16 then
  return -1
endi
if $data42 != 9 then
  return -1
endi
if $data43 != 5 then
  return -1
endi
if $data44 != 4 then
  return -1
endi
if $data45 != 3 then
  return -1
endi
855
if $data46 != NULL then
S
slguan 已提交
856 857
  return -1
endi
858
if $data47 != NULL then
S
slguan 已提交
859 860
  return -1
endi
861
if $data48 != NULL then
S
slguan 已提交
862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881
  return -1
endi
if $data51 != -13 then
  return -1
endi
if $data52 != 12 then
  return -1
endi
if $data53 != 11 then
  return -1
endi
if $data54 != 10 then
  return -1
endi
if $data55 != 9 then
  return -1
endi
if $data56 != 8.00000 then
  return -1
endi
882
if $data57 != NULL then
S
slguan 已提交
883 884
  return -1
endi
885
if $data58 != NULL then
S
slguan 已提交
886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908
  return -1
endi
if $data61 != -10 then
  return -1
endi
if $data62 != 15 then
  return -1
endi
if $data63 != 14 then
  return -1
endi
if $data64 != 13 then
  return -1
endi
if $data65 != 12 then
  return -1
endi
if $data66 != 11.00000 then
  return -1
endi
if $data67 != 10.000000000 then
  return -1
endi
909
if $data68 != NULL then
S
slguan 已提交
910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935
  return -1
endi
if $data71 != -7 then
  return -1
endi
if $data72 != 18 then
  return -1
endi
if $data73 != 17 then
  return -1
endi
if $data74 != 16 then
  return -1
endi
if $data75 != 15 then
  return -1
endi
if $data76 != 14.00000 then
  return -1
endi
if $data77 != 13.000000000 then
  return -1
endi
if $data78 != 11 then
  return -1
endi
S
Shengliang Guan 已提交
936
if $data79 != null then
S
slguan 已提交
937 938 939 940
  return -1
endi

print ======== step9
S
Shengliang Guan 已提交
941

S
slguan 已提交
942
system sh/exec.sh -n dnode1 -s stop -x SIGINT
H
Haojun Liao 已提交
943
sleep 3000
S
slguan 已提交
944
system sh/exec.sh -n dnode1 -s start
H
Haojun Liao 已提交
945
sleep 3000
S
slguan 已提交
946

S
Shengliang Guan 已提交
947
sql select * from tb order by ts asc
S
slguan 已提交
948 949 950 951 952 953
if $rows != 8 then
  return -1
endi
if $data01 != -28 then
  return -1
endi
954
if $data02 != NULL then
S
slguan 已提交
955 956
  return -1
endi
957
if $data03 != NULL then
S
slguan 已提交
958 959
  return -1
endi
960
if $data04 != NULL then
S
slguan 已提交
961 962
  return -1
endi
963
if $data05 != NULL then
S
slguan 已提交
964 965
  return -1
endi
966
if $data06 != NULL then
S
slguan 已提交
967 968
  return -1
endi
969
if $data07 != NULL then
S
slguan 已提交
970 971
  return -1
endi
972
if $data08 != NULL then
S
slguan 已提交
973 974 975 976 977 978 979 980
  return -1
endi
if $data11 != -25 then
  return -1
endi
if $data12 != 0 then
  return -1
endi
981
if $data13 != NULL then
S
slguan 已提交
982 983
  return -1
endi
984
if $data14 != NULL then
S
slguan 已提交
985 986
  return -1
endi
987
if $data15 != NULL then
S
slguan 已提交
988 989
  return -1
endi
990
if $data16 != NULL then
S
slguan 已提交
991 992
  return -1
endi
993
if $data17 != NULL then
S
slguan 已提交
994 995
  return -1
endi
996
if $data18 != NULL then
S
slguan 已提交
997 998 999 1000 1001 1002 1003 1004 1005 1006 1007
  return -1
endi
if $data21 != -22 then
  return -1
endi
if $data22 != 3 then
  return -1
endi
if $data23 != 0 then
  return -1
endi
1008
if $data24 != NULL then
S
slguan 已提交
1009 1010
  return -1
endi
1011
if $data25 != NULL then
S
slguan 已提交
1012 1013
  return -1
endi
1014
if $data26 != NULL then
S
slguan 已提交
1015 1016
  return -1
endi
1017
if $data27 != NULL then
S
slguan 已提交
1018 1019
  return -1
endi
1020
if $data28 != NULL then
S
slguan 已提交
1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034
  return -1
endi
if $data31 != -19 then
  return -1
endi
if $data32 != 6 then
  return -1
endi
if $data33 != 3 then
  return -1
endi
if $data34 != 0 then
  return -1
endi
1035
if $data35 != NULL then
S
slguan 已提交
1036 1037
  return -1
endi
1038
if $data36 != NULL then
S
slguan 已提交
1039 1040
  return -1
endi
1041
if $data37 != NULL then
S
slguan 已提交
1042 1043
  return -1
endi
1044
if $data38 != NULL then
S
slguan 已提交
1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061
  return -1
endi
if $data41 != -16 then
  return -1
endi
if $data42 != 9 then
  return -1
endi
if $data43 != 5 then
  return -1
endi
if $data44 != 4 then
  return -1
endi
if $data45 != 3 then
  return -1
endi
1062
if $data46 != NULL then
S
slguan 已提交
1063 1064
  return -1
endi
1065
if $data47 != NULL then
S
slguan 已提交
1066 1067
  return -1
endi
1068
if $data48 != NULL then
S
slguan 已提交
1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088
  return -1
endi
if $data51 != -13 then
  return -1
endi
if $data52 != 12 then
  return -1
endi
if $data53 != 11 then
  return -1
endi
if $data54 != 10 then
  return -1
endi
if $data55 != 9 then
  return -1
endi
if $data56 != 8.00000 then
  return -1
endi
1089
if $data57 != NULL then
S
slguan 已提交
1090 1091
  return -1
endi
1092
if $data58 != NULL then
S
slguan 已提交
1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115
  return -1
endi
if $data61 != -10 then
  return -1
endi
if $data62 != 15 then
  return -1
endi
if $data63 != 14 then
  return -1
endi
if $data64 != 13 then
  return -1
endi
if $data65 != 12 then
  return -1
endi
if $data66 != 11.00000 then
  return -1
endi
if $data67 != 10.000000000 then
  return -1
endi
1116
if $data68 != NULL then
S
slguan 已提交
1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142
  return -1
endi
if $data71 != -7 then
  return -1
endi
if $data72 != 18 then
  return -1
endi
if $data73 != 17 then
  return -1
endi
if $data74 != 16 then
  return -1
endi
if $data75 != 15 then
  return -1
endi
if $data76 != 14.00000 then
  return -1
endi
if $data77 != 13.000000000 then
  return -1
endi
if $data78 != 11 then
  return -1
endi
S
Shengliang Guan 已提交
1143 1144 1145
if $data79 != null then
  return -1
endi
guanshengliang's avatar
scripts  
guanshengliang 已提交
1146 1147

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