scalar_str_concat_len.sim 18.5 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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
system sh/stop_dnodes.sh

system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 500
sql connect

$dbPrefix = db
$tbPrefix = ct
$mtPrefix = st
$quote = '
$tbNum = 2
$rowNum = 50

print =============== step1 create stable/table
$i = 0
$db = $dbPrefix . $i
$mt = $mtPrefix . $i

sql drop database $db -x step1
step1:
sql create database $db
sql use $db
sql create table $mt (ts timestamp, c1 int, c2 binary(10), c3 binary(30), c4 binary(40), c5 binary(50), c6 nchar(10), c7 nchar(20), c8 nchar(30), c9 nchar(40)) TAGS (tgcol int)
$i = 0
while $i < $tbNum
  $tb = $tbPrefix . $i
  sql create table $tb using $mt tags( $i )

  $x = 0

  $z2 = $x . 2 
  $y2 = $quote . $z2 
  $y2 = $y2 . $quote

  $z3 = $x . 3 
  $y3 = $quote . $z3 
  $y3 = $y3 . $quote

  $z4 = $x . 4 
  $y4 = $quote . $z4
  $y4 = $y4 . $quote

  $z5 = $x . 5 
  $y5 = $quote . $z5
  $y5 = $y5 . $quote

  $z6 = $x . 6 
  $y6 = $quote . $z6
  $y6 = $y6 . $quote

  $z7 = $x . 7 
  $y7 = $quote . $z7
  $y7 = $y7 . $quote

  $z8 = $x . 8 
  $y8 = $quote . $z8
  $y8 = $y8 . $quote

  $z9 = $x . 9 
  $y9 = $quote . $z9
  $y9 = $y9 . $quote

  while $x < $rowNum
    $cc = $x * 60000
    $ms = 1601481600000 + $cc
    
    sql insert into $tb values ($ms , $x , $y2 , $y3 , $y4 , $y5 , $y6 , $y7 , $y8 , $y9 )
    $x = $x + 1
					$z2 = $x . 2 
					$y2 = $quote . $z2 
					$y2 = $y2 . $quote

					$z3 = $x . 3 
					$y3 = $quote . $z3 
					$y3 = $y3 . $quote

					$z4 = $x . 4 
					$y4 = $quote . $z4
					$y4 = $y4 . $quote

					$z5 = $x . 5 
					$y5 = $quote . $z5
					$y5 = $y5 . $quote

					$z6 = $x . 6 
					$y6 = $quote . $z6
					$y6 = $y6 . $quote

					$z7 = $x . 7 
					$y7 = $quote . $z7
					$y7 = $y7 . $quote

					$z8 = $x . 8 
					$y8 = $quote . $z8
					$y8 = $y8 . $quote

					$z9 = $x . 9 
					$y9 = $quote . $z9
					$y9 = $y9 . $quote
  endw

  $i = $i + 1
endw

print ================= step2
$i = 1
$tb = $tbPrefix . $i
$stb = $mtPrefix . 0

print sql select concat(c2, c3, c4, c5) from $tb
sql select concat(c2, c3, c4, c5) from $tb
print $data00
if $data00 != 02030405 then
  return -1
endi

print sql select concat_ws('data',c2,c3,c4,c5) from $tb
sql select concat_ws('data',c2,c3,c4,c5) from $tb
print $data00

if $data00 != 02data03data04data05 then
  return -1
endi
print sql select concat(c6, c7, c8, c9) from $tb
sql select concat(c6, c7, c8, c9) from $tb
print $data00
if $data00 != 06070809 then
  return -1
endi

print sql select concat_ws('data' ,c6,c7,c8,c9) from $tb
sql select concat_ws('data' ,c6,c7,c8,c9) from $tb
print $data00

if $data00 != 06data07data08data09 then
  return -1
endi

print sql select length(concat(c2, c3, c4, c5)) from $tb
sql select length(concat(c2, c3, c4, c5)) from $tb
print $data00
if $data00 != 8 then
  return -1
endi

148 149 150 151 152 153 154
print sql select char_length(concat(c2, c3, c4, c5)) from $tb
sql select char_length(concat(c2, c3, c4, c5)) from $tb
print $data00
if $data00 != 8 then
  return -1
endi

155 156 157 158 159 160 161
print sql select length(concat_ws('data',c2,c3,c4,c5)) from $tb
sql select length(concat_ws('data',c2,c3,c4,c5)) from $tb
print $data00

if $data00 != 20 then
  return -1
endi
162 163 164 165 166 167 168 169 170

print sql select char_length(concat_ws('data',c2,c3,c4,c5)) from $tb
sql select char_length(concat_ws('data',c2,c3,c4,c5)) from $tb
print $data00

if $data00 != 20 then
  return -1
endi

171 172 173 174 175 176 177
print sql select length(concat(c6, c7, c8, c9)) from $tb
sql select length(concat(c6, c7, c8, c9)) from $tb
print $data00
if $data00 != 32 then
  return -1
endi

178 179 180 181 182 183 184
print sql select char_length(concat(c6, c7, c8, c9)) from $tb
sql select char_length(concat(c6, c7, c8, c9)) from $tb
print $data00
if $data00 != 8 then
  return -1
endi

185 186 187 188 189 190 191 192
print sql select length(concat_ws('data' ,c6,c7,c8,c9)) from $tb
sql select length(concat_ws('data' ,c6,c7,c8,c9)) from $tb
print $data00

if $data00 != 80 then
  return -1
endi

193 194 195 196 197 198 199
print sql select char_length(concat_ws('data', c6,c7,c8,c9)) from $tb
sql select char_length(concat_ws('data', c6, c7, c8, c9)) from $tb
print $data00
if $data00 != 20 then
  return -1
endi

200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
print sql_error select concat(c1, c2, c3, c4, c5) from $tb
sql_error select concat(c1, c2, c3, c4, c5) from $tb
print sql_error select concat_ws('data',c1,c2,c3,c4,c5) from $tb
sql_error select concat_ws('data',c1,c2,c3,c4,c5) from $tb

print ===============> step 3 sql_error stable, group by, window
sql_error select concat(c2) from $stb group by tbname;

sql_error select concat(c2) from $stb group by tgcol;

sql_error select concat(c2) from $stb group by c3;

sql_error select concat(c2) from $stb interval(1m);

sql_error select concat(c2) from $stb state_window(c7);

sql_error select concat(c2) from $tb state_window(c7);

sql_error select concat(c2) from $stb session(ts, 30s);

sql_error select concat(c2) from $tb session(ts, 30s);

sql_error select concat(c2) from $stb slimit 2;

sql_error select concat(c2) from $stb interval(1m) slimit 2;

sql_error select length(c2) from $stb group by tbname;

sql_error select length(c2) from $stb group by tgcol;

sql_error select length(c2) from $stb group by c3;

sql_error select length(c2) from $stb interval(1m);

sql_error select length(c2) from $stb state_window(c7);

sql_error select length(c2) from $tb state_window(c7);

sql_error select length(c2) from $stb session(ts, 30s);

sql_error select length(c2) from $tb session(ts, 30s);

sql_error select length(c2) from $stb slimit 2;

sql_error select length(c2) from $stb interval(1m) slimit 2;

sql_error select concat_ws(c2) from $stb group by tbname;

sql_error select concat_ws(c2) from $stb group by tgcol;

sql_error select concat_ws(c2) from $stb group by c3;

sql_error select concat_ws(c2) from $stb interval(1m);

sql_error select concat_ws(c2) from $stb state_window(c7);

sql_error select concat_ws(c2) from $tb state_window(c7);

sql_error select concat_ws(c2) from $stb session(ts, 30s);

sql_error select concat_ws(c2) from $tb session(ts, 30s);

sql_error select concat_ws(c2) from $stb slimit 2;

sql_error select concat_ws(c2) from $stb interval(1m) slimit 2;
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285

sql_error select char_length(c2) from $stb group by tbname;

sql_error select char_length(c2) from $stb group by tgcol;

sql_error select char_length(c2) from $stb group by c3;

sql_error select char_length(c2) from $stb interval(1m);

sql_error select char_length(c2) from $stb state_window(c7);

sql_error select char_length(c2) from $tb state_window(c7);

sql_error select char_length(c2) from $stb session(ts, 30s);

sql_error select char_length(c2) from $tb session(ts, 30s);

sql_error select char_length(c2) from $stb slimit 2;

sql_error select char_length(c2) from $stb interval(1m) slimit 2;

286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303
print =============== trival test

print execute sql select concat(c2,c3),concat(c2,c3,c4),concat(c2,c3,c4,c5) from ct1

sql select concat(c2,c3),concat(c2,c3,c4),concat(c2,c3,c4,c5) from ct1

if $rows != 50 then 
  return -1
endi
if $data00 != @0203@ then
 return -1
endi
if $data01 != @020304@ then
 return -1
endi
if $data02 != @02030405@ then
 return -1
endi
S
shenglian zhou 已提交
304
if $data10 != @1213@ then
305 306
 return -1
endi
S
shenglian zhou 已提交
307
if $data11 != @121314@ then
308 309
 return -1
endi
S
shenglian zhou 已提交
310
if $data12 != @12131415@ then
311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334
 return -1
endi
print execute sql select concat('taos',c2,c3),concat('taos',c2,c4),concat('taos',c2,c5),concat('taos',c3,c4),concat('taos',c3,c5) from ct1

sql select concat('taos',c2,c3),concat('taos',c2,c4),concat('taos',c2,c5),concat('taos',c3,c4),concat('taos',c3,c5) from ct1

if $rows != 50 then 
  return -1
endi
if $data00 != @taos0203@ then
 return -1
endi
if $data01 != @taos0204@ then
 return -1
endi
if $data02 != @taos0205@ then
 return -1
endi
if $data03 != @taos0304@ then
 return -1
endi
if $data04 != @taos0305@ then
 return -1
endi
S
shenglian zhou 已提交
335
if $data10 != @taos1213@ then
336 337
 return -1
endi
S
shenglian zhou 已提交
338
if $data11 != @taos1214@ then
339 340
 return -1
endi
S
shenglian zhou 已提交
341
if $data12 != @taos1215@ then
342 343
 return -1
endi
S
shenglian zhou 已提交
344
if $data13 != @taos1314@ then
345 346
 return -1
endi
S
shenglian zhou 已提交
347
if $data14 != @taos1315@ then
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371
 return -1
endi
print execute sql select concat(c6,c7,'taos'),concat(c6,c8,'taos'),concat(c6,c9,'taos'),concat(c7,c8,'taos'),concat(c7,c9,'taos') from ct1

sql select concat(c6,c7,'taos'),concat(c6,c8,'taos'),concat(c6,c9,'taos'),concat(c7,c8,'taos'),concat(c7,c9,'taos') from ct1

if $rows != 50 then 
  return -1
endi
if $data00 != @0607taos@ then
 return -1
endi
if $data01 != @0608taos@ then
 return -1
endi
if $data02 != @0609taos@ then
 return -1
endi
if $data03 != @0708taos@ then
 return -1
endi
if $data04 != @0709taos@ then
 return -1
endi
S
shenglian zhou 已提交
372
if $data10 != @1617taos@ then
373 374
 return -1
endi
S
shenglian zhou 已提交
375
if $data11 != @1618taos@ then
376 377
 return -1
endi
S
shenglian zhou 已提交
378
if $data12 != @1619taos@ then
379 380
 return -1
endi
S
shenglian zhou 已提交
381
if $data13 != @1718taos@ then
382 383
 return -1
endi
S
shenglian zhou 已提交
384
if $data14 != @1719taos@ then
385 386
 return -1
endi
S
shenglian zhou 已提交
387
print execute sql select concat('data',c7,'taos'),concat('data',c8,'taos'),concat('data',c9,'taos'),concat(c7,c8,'taos'),concat(c7,c9,'taos') from ct1
388

S
shenglian zhou 已提交
389
sql select concat('data',c7,'taos'),concat('data',c8,'taos'),concat('data',c9,'taos'),concat(c7,c8,'taos'),concat(c7,c9,'taos') from ct1
390 391 392 393

if $rows != 50 then 
  return -1
endi
S
shenglian zhou 已提交
394
if $data00 != @data07taos@ then
395 396
 return -1
endi
S
shenglian zhou 已提交
397
if $data01 != @data08taos@ then
398 399
 return -1
endi
S
shenglian zhou 已提交
400
if $data02 != @data09taos@ then
401 402
 return -1
endi
S
shenglian zhou 已提交
403
if $data03 != @0708taos@ then
404 405
 return -1
endi
S
shenglian zhou 已提交
406
if $data04 != @0709taos@ then
407 408
 return -1
endi
S
shenglian zhou 已提交
409
if $data10 != @data17taos@ then
410 411
 return -1
endi
S
shenglian zhou 已提交
412
if $data11 != @data18taos@ then
413 414
 return -1
endi
S
shenglian zhou 已提交
415
if $data12 != @data19taos@ then
416 417
 return -1
endi
S
shenglian zhou 已提交
418
if $data13 != @1718taos@ then
419 420
 return -1
endi
S
shenglian zhou 已提交
421
if $data14 != @1719taos@ then
422 423
 return -1
endi
S
shenglian zhou 已提交
424
print execute sql select concat_ws('jeff',c2,c3),concat_ws('jeff',c2,c3,c4),concat_ws('jeff',c2,c3,c4,c5) from ct1
425

S
shenglian zhou 已提交
426
sql select concat_ws('jeff',c2,c3),concat_ws('jeff',c2,c3,c4),concat_ws('jeff',c2,c3,c4,c5) from ct1
427 428 429 430

if $rows != 50 then 
  return -1
endi
S
shenglian zhou 已提交
431
if $data00 != @02jeff03@ then
432 433
 return -1
endi
S
shenglian zhou 已提交
434
if $data01 != @02jeff03jeff04@ then
435 436
 return -1
endi
S
shenglian zhou 已提交
437
if $data02 != @02jeff03jeff04jeff05@ then
438 439
 return -1
endi
S
shenglian zhou 已提交
440
if $data10 != @12jeff13@ then
441 442
 return -1
endi
S
shenglian zhou 已提交
443
if $data11 != @12jeff13jeff14@ then
444 445
 return -1
endi
S
shenglian zhou 已提交
446
if $data12 != @12jeff13jeff14jeff15@ then
447 448
 return -1
endi
S
shenglian zhou 已提交
449
print execute sql select concat_ws('jeff','taos',c2,c3),concat_ws('jeff','taos',c2,c4),concat_ws('jeff','taos',c2,c5),concat_ws('jeff','taos',c3,c4),concat_ws('jeff','taos',c3,c5) from ct1
450

S
shenglian zhou 已提交
451
sql select concat_ws('jeff','taos',c2,c3),concat_ws('jeff','taos',c2,c4),concat_ws('jeff','taos',c2,c5),concat_ws('jeff','taos',c3,c4),concat_ws('jeff','taos',c3,c5) from ct1
452 453 454 455

if $rows != 50 then 
  return -1
endi
S
shenglian zhou 已提交
456
if $data00 != @taosjeff02jeff03@ then
457 458
 return -1
endi
S
shenglian zhou 已提交
459
if $data01 != @taosjeff02jeff04@ then
460 461
 return -1
endi
S
shenglian zhou 已提交
462
if $data02 != @taosjeff02jeff05@ then
463 464
 return -1
endi
S
shenglian zhou 已提交
465
if $data03 != @taosjeff03jeff04@ then
466 467
 return -1
endi
S
shenglian zhou 已提交
468
if $data04 != @taosjeff03jeff05@ then
469 470
 return -1
endi
S
shenglian zhou 已提交
471
if $data10 != @taosjeff12jeff13@ then
472 473
 return -1
endi
S
shenglian zhou 已提交
474
if $data11 != @taosjeff12jeff14@ then
475 476
 return -1
endi
S
shenglian zhou 已提交
477
if $data12 != @taosjeff12jeff15@ then
478 479
 return -1
endi
S
shenglian zhou 已提交
480
if $data13 != @taosjeff13jeff14@ then
481 482
 return -1
endi
S
shenglian zhou 已提交
483
if $data14 != @taosjeff13jeff15@ then
484 485
 return -1
endi
S
shenglian zhou 已提交
486
print execute sql select concat_ws('jeff','data',c3),concat_ws('jeff','data',c3,c4),concat_ws('jeff','data',c3,c4,c5) from ct1
487

S
shenglian zhou 已提交
488
sql select concat_ws('jeff','data',c3),concat_ws('jeff','data',c3,c4),concat_ws('jeff','data',c3,c4,c5) from ct1
489 490 491 492

if $rows != 50 then 
  return -1
endi
S
shenglian zhou 已提交
493 494 495 496
if $data00 != @datajeff03@ then
 return -1
endi
if $data01 != @datajeff03jeff04@ then
497 498
 return -1
endi
S
shenglian zhou 已提交
499
if $data02 != @datajeff03jeff04jeff05@ then
500 501
 return -1
endi
S
shenglian zhou 已提交
502
if $data10 != @datajeff13@ then
503 504
 return -1
endi
S
shenglian zhou 已提交
505
if $data11 != @datajeff13jeff14@ then
506 507
 return -1
endi
S
shenglian zhou 已提交
508
if $data12 != @datajeff13jeff14jeff15@ then
509 510
 return -1
endi
S
shenglian zhou 已提交
511
print execute sql select concat_ws('jeff','data',c7,'taos'),concat_ws('jeff','data',c8,'taos'),concat_ws('jeff','data',c9,'taos'),concat_ws('jeff',c7,c8,'taos'),concat_ws('jeff',c7,c9,'taos') from ct1
512

S
shenglian zhou 已提交
513
sql select concat_ws('jeff','data',c7,'taos'),concat_ws('jeff','data',c8,'taos'),concat_ws('jeff','data',c9,'taos'),concat_ws('jeff',c7,c8,'taos'),concat_ws('jeff',c7,c9,'taos') from ct1
514 515 516 517

if $rows != 50 then 
  return -1
endi
S
shenglian zhou 已提交
518
if $data00 != @datajeff07jefftaos@ then
519 520
 return -1
endi
S
shenglian zhou 已提交
521
if $data01 != @datajeff08jefftaos@ then
522 523
 return -1
endi
S
shenglian zhou 已提交
524
if $data02 != @datajeff09jefftaos@ then
525 526
 return -1
endi
S
shenglian zhou 已提交
527
if $data03 != @07jeff08jefftaos@ then
528 529
 return -1
endi
S
shenglian zhou 已提交
530
if $data04 != @07jeff09jefftaos@ then
531 532
 return -1
endi
S
shenglian zhou 已提交
533
if $data10 != @datajeff17jefftaos@ then
534 535
 return -1
endi
S
shenglian zhou 已提交
536
if $data11 != @datajeff18jefftaos@ then
537 538
 return -1
endi
S
shenglian zhou 已提交
539
if $data12 != @datajeff19jefftaos@ then
540 541
 return -1
endi
S
shenglian zhou 已提交
542
if $data13 != @17jeff18jefftaos@ then
543 544
 return -1
endi
S
shenglian zhou 已提交
545
if $data14 != @17jeff19jefftaos@ then
546 547
 return -1
endi
S
shenglian zhou 已提交
548
print execute sql select length(concat(c2,c3)),length(concat(c2,c3,c4)),length(concat(c2,c3,c4,c5)) from ct1
549

S
shenglian zhou 已提交
550
sql select length(concat(c2,c3)),length(concat(c2,c3,c4)),length(concat(c2,c3,c4,c5)) from ct1
551 552 553 554

if $rows != 50 then 
  return -1
endi
S
shenglian zhou 已提交
555
if $data00 != @4@ then
556 557
 return -1
endi
S
shenglian zhou 已提交
558
if $data01 != @6@ then
559 560
 return -1
endi
S
shenglian zhou 已提交
561
if $data02 != @8@ then
562 563
 return -1
endi
S
shenglian zhou 已提交
564
if $data10 != @4@ then
565 566
 return -1
endi
S
shenglian zhou 已提交
567 568 569 570
if $data11 != @6@ then
 return -1
endi
if $data12 != @8@ then
571 572
 return -1
endi
S
shenglian zhou 已提交
573
print execute sql select length(concat(c6,c7,'taos')),length(concat(c6,c8,'taos')),length(concat(c6,c9,'taos')),length(concat(c7,c8,'taos')),length(concat(c7,c9,'taos')) from ct1
574

S
shenglian zhou 已提交
575
sql select length(concat(c6,c7,'taos')),length(concat(c6,c8,'taos')),length(concat(c6,c9,'taos')),length(concat(c7,c8,'taos')),length(concat(c7,c9,'taos')) from ct1
576 577 578 579

if $rows != 50 then 
  return -1
endi
S
shenglian zhou 已提交
580
if $data00 != @32@ then
581 582
 return -1
endi
S
shenglian zhou 已提交
583
if $data01 != @32@ then
584 585
 return -1
endi
S
shenglian zhou 已提交
586
if $data02 != @32@ then
587 588
 return -1
endi
S
shenglian zhou 已提交
589
if $data03 != @32@ then
590 591
 return -1
endi
S
shenglian zhou 已提交
592
if $data04 != @32@ then
593 594
 return -1
endi
S
shenglian zhou 已提交
595
if $data10 != @32@ then
596 597
 return -1
endi
S
shenglian zhou 已提交
598
if $data11 != @32@ then
599 600
 return -1
endi
S
shenglian zhou 已提交
601
if $data12 != @32@ then
602 603
 return -1
endi
S
shenglian zhou 已提交
604
if $data13 != @32@ then
605 606
 return -1
endi
S
shenglian zhou 已提交
607
if $data14 != @32@ then
608 609
 return -1
endi
S
shenglian zhou 已提交
610
print execute sql select length(concat_ws('jeff','taos',c2,c3)),length(concat_ws('jeff','taos',c2,c4)),length(concat_ws('jeff','taos',c2,c5)),length(concat_ws('jeff','taos',c3,c4)),length(concat_ws('jeff','taos',c3,c5)) from ct1
611

S
shenglian zhou 已提交
612
sql select length(concat_ws('jeff','taos',c2,c3)),length(concat_ws('jeff','taos',c2,c4)),length(concat_ws('jeff','taos',c2,c5)),length(concat_ws('jeff','taos',c3,c4)),length(concat_ws('jeff','taos',c3,c5)) from ct1
613 614 615 616

if $rows != 50 then 
  return -1
endi
S
shenglian zhou 已提交
617
if $data00 != @16@ then
618 619
 return -1
endi
S
shenglian zhou 已提交
620
if $data01 != @16@ then
621 622
 return -1
endi
S
shenglian zhou 已提交
623
if $data02 != @16@ then
624 625
 return -1
endi
S
shenglian zhou 已提交
626
if $data03 != @16@ then
627 628
 return -1
endi
S
shenglian zhou 已提交
629
if $data04 != @16@ then
630 631
 return -1
endi
S
shenglian zhou 已提交
632
if $data10 != @16@ then
633 634
 return -1
endi
S
shenglian zhou 已提交
635
if $data11 != @16@ then
636 637
 return -1
endi
S
shenglian zhou 已提交
638
if $data12 != @16@ then
639 640
 return -1
endi
S
shenglian zhou 已提交
641
if $data13 != @16@ then
642 643
 return -1
endi
S
shenglian zhou 已提交
644
if $data14 != @16@ then
645 646
 return -1
endi
S
shenglian zhou 已提交
647
print execute sql select length(concat_ws('jeff',c6,c7,'taos')),length(concat_ws('jeff',c6,c8,'taos')),length(concat_ws('jeff',c6,c9,'taos')),length(concat_ws('jeff',c7,c8,'taos')),length(concat_ws('jeff',c7,c9,'taos')) from ct1
648

S
shenglian zhou 已提交
649
sql select length(concat_ws('jeff',c6,c7,'taos')),length(concat_ws('jeff',c6,c8,'taos')),length(concat_ws('jeff',c6,c9,'taos')),length(concat_ws('jeff',c7,c8,'taos')),length(concat_ws('jeff',c7,c9,'taos')) from ct1
650 651 652 653

if $rows != 50 then 
  return -1
endi
S
shenglian zhou 已提交
654
if $data00 != @64@ then
655 656
 return -1
endi
S
shenglian zhou 已提交
657
if $data01 != @64@ then
658 659
 return -1
endi
S
shenglian zhou 已提交
660
if $data02 != @64@ then
661 662
 return -1
endi
S
shenglian zhou 已提交
663
if $data03 != @64@ then
664 665
 return -1
endi
S
shenglian zhou 已提交
666
if $data04 != @64@ then
667 668
 return -1
endi
S
shenglian zhou 已提交
669
if $data10 != @64@ then
670 671
 return -1
endi
S
shenglian zhou 已提交
672
if $data11 != @64@ then
673 674
 return -1
endi
S
shenglian zhou 已提交
675
if $data12 != @64@ then
676 677
 return -1
endi
S
shenglian zhou 已提交
678
if $data13 != @64@ then
679 680
 return -1
endi
S
shenglian zhou 已提交
681
if $data14 != @64@ then
682 683
 return -1
endi
S
shenglian zhou 已提交
684
print execute sql select char_length(concat(c2,'taos',c3)),char_length(concat(c2,'taos',c4)),char_length(concat(c2,'taos',c5)),char_length(concat(c3,'taos',c4)),char_length(concat(c3,'taos',c5)) from ct1
685

S
shenglian zhou 已提交
686
sql select char_length(concat(c2,'taos',c3)),char_length(concat(c2,'taos',c4)),char_length(concat(c2,'taos',c5)),char_length(concat(c3,'taos',c4)),char_length(concat(c3,'taos',c5)) from ct1
687 688 689 690

if $rows != 50 then 
  return -1
endi
S
shenglian zhou 已提交
691
if $data00 != @8@ then
692 693
 return -1
endi
S
shenglian zhou 已提交
694
if $data01 != @8@ then
695 696
 return -1
endi
S
shenglian zhou 已提交
697
if $data02 != @8@ then
698 699
 return -1
endi
S
shenglian zhou 已提交
700
if $data03 != @8@ then
701 702
 return -1
endi
S
shenglian zhou 已提交
703
if $data04 != @8@ then
704 705
 return -1
endi
S
shenglian zhou 已提交
706
if $data10 != @8@ then
707 708
 return -1
endi
S
shenglian zhou 已提交
709
if $data11 != @8@ then
710 711
 return -1
endi
S
shenglian zhou 已提交
712
if $data12 != @8@ then
713 714
 return -1
endi
S
shenglian zhou 已提交
715
if $data13 != @8@ then
716 717
 return -1
endi
S
shenglian zhou 已提交
718
if $data14 != @8@ then
719 720
 return -1
endi
S
shenglian zhou 已提交
721
print execute sql select char_length(concat(c6,'taos')),char_length(concat(c7,'taos')),char_length(concat(c8,'taos')),char_length(concat(c9,'taos')) from ct1
722

S
shenglian zhou 已提交
723
sql select char_length(concat(c6,'taos')),char_length(concat(c7,'taos')),char_length(concat(c8,'taos')),char_length(concat(c9,'taos')) from ct1
724 725 726 727

if $rows != 50 then 
  return -1
endi
S
shenglian zhou 已提交
728
if $data00 != @6@ then
729 730
 return -1
endi
S
shenglian zhou 已提交
731
if $data01 != @6@ then
732 733
 return -1
endi
S
shenglian zhou 已提交
734
if $data02 != @6@ then
735 736
 return -1
endi
S
shenglian zhou 已提交
737
if $data03 != @6@ then
738 739
 return -1
endi
S
shenglian zhou 已提交
740
if $data10 != @6@ then
741 742
 return -1
endi
S
shenglian zhou 已提交
743
if $data11 != @6@ then
744 745
 return -1
endi
S
shenglian zhou 已提交
746
if $data12 != @6@ then
747 748
 return -1
endi
S
shenglian zhou 已提交
749
if $data13 != @6@ then
750 751
 return -1
endi
S
shenglian zhou 已提交
752
print execute sql select char_length(concat_ws('jeff',c2,'taos',c3)),char_length(concat_ws('jeff',c2,'taos',c4)),char_length(concat_ws('jeff',c2,'taos',c5)),char_length(concat_ws('jeff',c3,'taos',c4)),char_length(concat_ws('jeff',c3,'taos',c5)) from ct1
753

S
shenglian zhou 已提交
754
sql select char_length(concat_ws('jeff',c2,'taos',c3)),char_length(concat_ws('jeff',c2,'taos',c4)),char_length(concat_ws('jeff',c2,'taos',c5)),char_length(concat_ws('jeff',c3,'taos',c4)),char_length(concat_ws('jeff',c3,'taos',c5)) from ct1
755 756 757 758

if $rows != 50 then 
  return -1
endi
S
shenglian zhou 已提交
759
if $data00 != @16@ then
760 761
 return -1
endi
S
shenglian zhou 已提交
762
if $data01 != @16@ then
763 764
 return -1
endi
S
shenglian zhou 已提交
765
if $data02 != @16@ then
766 767
 return -1
endi
S
shenglian zhou 已提交
768
if $data03 != @16@ then
769 770
 return -1
endi
S
shenglian zhou 已提交
771
if $data04 != @16@ then
772 773
 return -1
endi
S
shenglian zhou 已提交
774
if $data10 != @16@ then
775 776
 return -1
endi
S
shenglian zhou 已提交
777
if $data11 != @16@ then
778 779
 return -1
endi
S
shenglian zhou 已提交
780
if $data12 != @16@ then
781 782
 return -1
endi
S
shenglian zhou 已提交
783
if $data13 != @16@ then
784 785
 return -1
endi
S
shenglian zhou 已提交
786
if $data14 != @16@ then
787 788
 return -1
endi
S
shenglian zhou 已提交
789
print execute sql select char_length(concat_ws('jeff',c6,'taos')),char_length(concat_ws('jeff',c7,'taos')),char_length(concat_ws('jeff',c8,'taos')),char_length(concat_ws('jeff',c9,'taos')) from ct1
790

S
shenglian zhou 已提交
791
sql select char_length(concat_ws('jeff',c6,'taos')),char_length(concat_ws('jeff',c7,'taos')),char_length(concat_ws('jeff',c8,'taos')),char_length(concat_ws('jeff',c9,'taos')) from ct1
792 793 794 795

if $rows != 50 then 
  return -1
endi
S
shenglian zhou 已提交
796
if $data00 != @10@ then
797 798
 return -1
endi
S
shenglian zhou 已提交
799
if $data01 != @10@ then
800 801
 return -1
endi
S
shenglian zhou 已提交
802
if $data02 != @10@ then
803 804 805 806 807
 return -1
endi
if $data03 != @10@ then
 return -1
endi
S
shenglian zhou 已提交
808
if $data10 != @10@ then
809 810
 return -1
endi
S
shenglian zhou 已提交
811
if $data11 != @10@ then
812 813
 return -1
endi
S
shenglian zhou 已提交
814
if $data12 != @10@ then
815 816
 return -1
endi
S
shenglian zhou 已提交
817
if $data13 != @10@ then
818 819
 return -1
endi
820 821 822 823 824 825 826 827 828
print =============== clear
#sql drop database $db
#sql show databases
#if $rows != 0 then 
#  return -1
#endi

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