TDengine/tests/script/tsim/valgrind/basic1.sim

64 lines
1.3 KiB
Text
Raw Normal View History

2022-05-21 12:10:37 +00:00
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
2022-07-16 05:37:46 +00:00
system sh/exec.sh -n dnode1 -s start -v
2022-05-21 12:10:37 +00:00
sql connect
2022-08-11 12:56:31 +00:00
print =============== step1: create drop select * from information_schema.ins_dnodes
2022-07-18 02:57:56 +00:00
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
print ---> dnode not ready!
return -1
endi
2022-08-11 12:56:31 +00:00
sql select * from information_schema.ins_dnodes
2022-07-18 02:57:56 +00:00
print ---> $data00 $data01 $data02 $data03 $data04 $data05
if $rows != 1 then
2022-07-04 12:36:45 +00:00
return -1
endi
2022-07-18 02:57:56 +00:00
if $data(1)[4] != ready then
goto step1
2022-07-06 13:45:01 +00:00
endi
2022-07-26 03:25:54 +00:00
$tbPrefix = tb
$tbNum = 5
$rowNum = 10
2022-07-18 02:57:56 +00:00
2022-07-26 03:25:54 +00:00
print =============== step2: prepare data
sql create database db vgroups 2
sql use db
sql create table if not exists stb (ts timestamp, tbcol int, tbcol2 float, tbcol3 double) tags (tgcol int unsigned)
$i = 0
while $i < $tbNum
$tb = $tbPrefix . $i
sql create table $tb using stb tags( $i )
$x = 0
while $x < $rowNum
$cc = $x * 60000
$ms = 1601481600000 + $cc
sql insert into $tb values ($ms , $x , $x , $x )
$x = $x + 1
endw
$i = $i + 1
endw
print =============== step3: tb
2022-08-01 02:17:44 +00:00
sql select _wstart, count(*) from tb1 session(ts,1m)
2022-07-18 02:57:56 +00:00
2022-07-04 12:36:45 +00:00
_OVER:
2022-05-21 12:10:37 +00:00
system sh/exec.sh -n dnode1 -s stop -x SIGINT
2022-07-09 12:27:24 +00:00
print =============== check
2022-07-13 03:25:33 +00:00
$null=
2022-07-09 12:27:24 +00:00
2022-07-13 03:25:33 +00:00
system_content sh/checkValgrind.sh -n dnode1
2022-07-09 12:27:24 +00:00
print cmd return result ----> [ $system_content ]
2022-07-18 02:57:56 +00:00
if $system_content > 0 then
2022-07-13 03:25:33 +00:00
return -1
2022-07-09 12:27:24 +00:00
endi
if $system_content == $null then
2022-07-13 03:25:33 +00:00
return -1
2022-07-16 10:58:29 +00:00
endi