system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start sql connect print =============== create database sql create database d1 sql show databases if $rows != 1 then return -1 endi print $data00 $data01 $data02 sql use d1 print =============== create super table sql create table st (ts timestamp, i int) tags (j int) sql show stables if $rows != 1 then return -1 endi print $data00 $data01 $data02 sql create table st2 (ts timestamp, i float) tags (j int) sql show stables if $rows != 2 then return -1 endi print $data00 $data01 $data02 print $data10 $data11 $data12 sql drop table st2 sql show stables if $rows != 1 then return -1 endi print $data00 $data01 $data02 print $data10 $data11 $data12 print =============== create child table sql create table c1 using st tags(1) sql create table c2 using st tags(2) sql show tables if $rows != 2 then return -1 endi sql create table c3 using st tags(3) c4 using st tags(4) c5 using st tags(5) c6 using st tags(6) c7 using st tags(7) sql show tables if $rows != 7 then return -1 endi print $data00 $data01 $data02 print $data10 $data11 $data22 print $data20 $data11 $data22 print =============== insert data sql insert into c1 values(now+1s, 1) sql insert into c1 values(now+2s, 2) sql insert into c1 values(now+3s, 3) print =============== query data sql select * from c1 if $rows != 3 then return -1 endi print $data00 $data01 print $data10 $data11 print $data20 $data11 if $data01 != 1 then return -1 endi if $data11 != 2 then return -1 endi if $data21 != 3 then return -1 endi system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s start print =============== query data sql select * from c1 if $rows != 3 then return -1 endi print $data00 $data01 print $data10 $data11 print $data20 $data11 if $data01 != 1 then return -1 endi if $data11 != 2 then return -1 endi if $data21 != 3 then return -1 endi system sh/exec.sh -n dnode1 -s stop -x SIGINT