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

69 lines
1.7 KiB
Text
Raw Normal View History

2022-07-05 08:09:40 +00:00
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
2022-08-01 02:44:02 +00:00
system sh/exec.sh -n dnode1 -s start -v
2022-07-05 08:09:40 +00:00
sql connect
2022-08-11 12:56:31 +00:00
print =============== step1: create drop select * from information_schema.ins_dnodes
2022-07-05 08:09:40 +00:00
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
print ---> dnode not ready!
2022-07-05 08:09:40 +00:00
return -1
endi
2022-08-11 12:56:31 +00:00
sql select * from information_schema.ins_dnodes
print ---> $data00 $data01 $data02 $data03 $data04 $data05
2022-07-05 08:09:40 +00:00
if $rows != 1 then
return -1
endi
if $data(1)[4] != ready then
goto step1
endi
2022-07-26 06:41:39 +00:00
$tbPrefix = tb
$tbNum = 5
$rowNum = 10
2022-07-26 06:41:39 +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)
2022-07-13 03:25:33 +00:00
2022-07-26 06:41:39 +00:00
$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
2022-07-16 05:37:46 +00:00
2022-07-26 06:41:39 +00:00
print =============== step3: tb
2022-08-01 02:44:02 +00:00
sql select * from tb1 where ts in ('2018-07-10 16:31:01', '2022-07-10 16:31:03', 1657441865000);
sql select * from tb1 where tbcol2 in (257);
sql select * from tb1 where tbcol3 in (2, 257);
sql select * from stb where ts in ('2018-07-10 16:31:01', '2022-07-10 16:31:03', 1657441865000);
sql select * from stb where tbcol2 in (257);
sql select * from stb where tbcol3 in (2, 257);
2022-07-09 12:27:24 +00:00
_OVER:
2022-07-05 08:09:40 +00:00
system sh/exec.sh -n dnode1 -s stop -x SIGINT
print =============== check
2022-07-13 03:25:33 +00:00
$null=
2022-07-13 03:25:33 +00:00
system_content sh/checkValgrind.sh -n dnode1
print cmd return result ----> [ $system_content ]
2022-07-20 03:23:19 +00:00
if $system_content > 0 then
2022-07-13 03:25:33 +00:00
return -1
endi
if $system_content == $null then
2022-07-13 03:25:33 +00:00
return -1
endi