2022-04-20 12:02:10 +00:00
|
|
|
system sh/stop_dnodes.sh
|
|
|
|
|
system sh/deploy.sh -n dnode1 -i 1
|
2022-07-16 07:11:36 +00:00
|
|
|
system sh/deploy.sh -n dnode2 -i 2
|
2022-07-07 02:30:00 +00:00
|
|
|
system sh/cfg.sh -n dnode1 -c debugflag -v 131
|
2022-07-16 07:11:36 +00:00
|
|
|
system sh/cfg.sh -n dnode2 -c debugflag -v 131
|
2022-07-05 13:05:51 +00:00
|
|
|
system sh/exec.sh -n dnode1 -s start -v
|
2022-07-16 07:11:36 +00:00
|
|
|
system sh/exec.sh -n dnode2 -s start -v
|
2022-07-05 13:05:51 +00:00
|
|
|
sql connect
|
|
|
|
|
|
2022-07-17 14:17:30 +00:00
|
|
|
|
2022-07-16 07:11:36 +00:00
|
|
|
print =============== step1: create alter drop show user
|
2022-07-06 02:46:57 +00:00
|
|
|
sql create user u1 pass 'taosdata'
|
2022-08-11 12:56:31 +00:00
|
|
|
sql select * from information_schema.ins_users
|
2022-07-06 02:46:57 +00:00
|
|
|
sql alter user u1 sysinfo 1
|
|
|
|
|
sql alter user u1 enable 1
|
|
|
|
|
sql alter user u1 pass 'taosdata'
|
|
|
|
|
sql drop user u1
|
|
|
|
|
sql_error alter user u2 sysinfo 0
|
|
|
|
|
|
2022-07-16 07:11:36 +00:00
|
|
|
print =============== step2 create drop dnode
|
2022-07-07 01:54:03 +00:00
|
|
|
sql create dnode $hostname port 7200
|
2022-07-16 07:11:36 +00:00
|
|
|
sql create dnode $hostname port 7300
|
2023-05-29 08:12:26 +00:00
|
|
|
sql drop dnode 3 force
|
2022-07-07 06:50:37 +00:00
|
|
|
sql alter dnode 1 'debugflag 131'
|
2022-07-05 13:05:51 +00:00
|
|
|
|
2022-08-11 12:56:31 +00:00
|
|
|
print =============== step3: select * from information_schema.ins_dnodes
|
2022-07-16 07:11:36 +00:00
|
|
|
$x = 0
|
|
|
|
|
step3:
|
|
|
|
|
$x = $x + 1
|
|
|
|
|
sleep 1000
|
|
|
|
|
if $x == 60 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-16 07:11:36 +00:00
|
|
|
print ===> $data00 $data01 $data02 $data03 $data04 $data05
|
|
|
|
|
print ===> $data10 $data11 $data12 $data13 $data14 $data15
|
|
|
|
|
if $rows != 2 then
|
|
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
if $data(1)[4] != ready then
|
|
|
|
|
goto step3
|
|
|
|
|
endi
|
|
|
|
|
if $data(2)[4] != ready then
|
|
|
|
|
goto step3
|
|
|
|
|
endi
|
|
|
|
|
|
2022-07-13 03:54:41 +00:00
|
|
|
print =============== create database, stable, table
|
|
|
|
|
sql create database db vgroups 3
|
|
|
|
|
sql use db
|
|
|
|
|
sql create table stb (ts timestamp, c int) tags (t int)
|
|
|
|
|
sql create table t0 using stb tags (0)
|
|
|
|
|
sql create table tba (ts timestamp, c1 binary(10), c2 nchar(10));
|
2022-07-09 12:27:24 +00:00
|
|
|
|
|
|
|
|
print =============== run show xxxx
|
2022-08-11 12:56:31 +00:00
|
|
|
sql select * from information_schema.ins_dnodes
|
2022-07-16 07:11:36 +00:00
|
|
|
if $rows != 2 then
|
2022-07-09 12:27:24 +00:00
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
2022-08-11 13:21:59 +00:00
|
|
|
sql select * from information_schema.ins_mnodes
|
2022-07-09 12:27:24 +00:00
|
|
|
if $rows != 1 then
|
|
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
2022-08-11 12:26:40 +00:00
|
|
|
sql select * from information_schema.ins_databases
|
2022-07-13 03:54:41 +00:00
|
|
|
if $rows != 3 then
|
|
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
|
|
|
|
sql show stables
|
|
|
|
|
if $rows != 1 then
|
|
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
|
|
|
|
sql show tables
|
|
|
|
|
if $rows != 2 then
|
2022-07-09 12:27:24 +00:00
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
2022-08-11 12:56:31 +00:00
|
|
|
sql select * from information_schema.ins_users
|
2022-07-09 12:27:24 +00:00
|
|
|
if $rows != 1 then
|
|
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
|
|
|
|
print =============== run select * from information_schema.xxxx
|
2022-08-01 12:47:08 +00:00
|
|
|
sql select * from information_schema.ins_dnodes
|
2022-07-16 07:11:36 +00:00
|
|
|
if $rows != 2 then
|
2022-07-09 12:27:24 +00:00
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
2022-08-01 12:47:08 +00:00
|
|
|
sql select * from information_schema.ins_mnodes
|
2022-07-09 12:27:24 +00:00
|
|
|
if $rows != 1 then
|
|
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
2022-08-01 12:47:08 +00:00
|
|
|
sql select * from information_schema.ins_databases
|
2022-07-13 03:54:41 +00:00
|
|
|
if $rows != 3 then
|
|
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
2022-08-01 12:47:08 +00:00
|
|
|
sql select * from information_schema.ins_stables
|
2022-07-13 03:54:41 +00:00
|
|
|
if $rows != 1 then
|
|
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
2022-08-01 12:47:08 +00:00
|
|
|
sql select * from information_schema.ins_tables
|
2022-07-28 11:10:18 +00:00
|
|
|
if $rows <= 0 then
|
2022-07-13 03:54:41 +00:00
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
2022-08-01 12:47:08 +00:00
|
|
|
sql select * from information_schema.ins_users
|
2022-07-09 12:27:24 +00:00
|
|
|
if $rows != 1 then
|
|
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
2022-08-01 12:47:08 +00:00
|
|
|
sql select * from information_schema.ins_vgroups
|
2022-07-13 03:54:41 +00:00
|
|
|
if $rows != 3 then
|
|
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
2022-07-09 12:27:24 +00:00
|
|
|
sql show variables;
|
2024-06-24 02:18:09 +00:00
|
|
|
if $rows != 9 then
|
2022-07-09 12:27:24 +00:00
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
|
|
|
|
sql show dnode 1 variables;
|
|
|
|
|
if $rows <= 0 then
|
|
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
|
|
|
|
sql show local variables;
|
|
|
|
|
if $rows <= 0 then
|
|
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
2022-07-05 13:05:51 +00:00
|
|
|
print =============== stop
|
2022-04-20 12:02:10 +00:00
|
|
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
2022-07-16 07:11:36 +00:00
|
|
|
system sh/exec.sh -n dnode2 -s stop -x SIGINT
|
2022-04-20 12:02:10 +00:00
|
|
|
|
2022-07-06 04:00:03 +00:00
|
|
|
print =============== check
|
2022-07-13 03:25:33 +00:00
|
|
|
$null=
|
2022-07-05 13:05:51 +00:00
|
|
|
|
2022-07-13 03:25:33 +00:00
|
|
|
system_content sh/checkValgrind.sh -n dnode1
|
2022-07-05 13:05:51 +00:00
|
|
|
print cmd return result ----> [ $system_content ]
|
2022-07-16 07:11:36 +00:00
|
|
|
if $system_content > 0 then
|
2022-07-13 03:25:33 +00:00
|
|
|
return -1
|
2022-04-20 12:02:10 +00:00
|
|
|
endi
|
2022-04-20 12:29:50 +00:00
|
|
|
|
|
|
|
|
if $system_content == $null then
|
2022-07-13 03:25:33 +00:00
|
|
|
return -1
|
2022-04-20 12:29:50 +00:00
|
|
|
endi
|
2022-07-16 07:11:36 +00:00
|
|
|
|
|
|
|
|
system_content sh/checkValgrind.sh -n dnode2
|
|
|
|
|
print cmd return result ----> [ $system_content ]
|
2022-07-19 04:00:43 +00:00
|
|
|
if $system_content > 0 then
|
2022-07-16 07:11:36 +00:00
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
|
|
|
|
if $system_content == $null then
|
|
|
|
|
return -1
|
2022-07-17 14:17:30 +00:00
|
|
|
endi
|