52 lines
1.6 KiB
Plaintext
52 lines
1.6 KiB
Plaintext
system sh/stop_dnodes.sh
|
|
system sh/deploy.sh -n dnode1 -i 1
|
|
system sh/exec.sh -n dnode1 -s start
|
|
sql connect
|
|
|
|
sql drop database if exists db1;
|
|
sql create database db1 vgroups 1;
|
|
sql use db1;
|
|
sql create stable sta (ts timestamp, col1 int) tags(t1 int);
|
|
sql create table tba1 using sta tags(1);
|
|
|
|
sql insert into tba1 values ('2023-11-17 16:29:00', 1);
|
|
sql insert into tba1 values ('2023-11-17 16:29:02', 3);
|
|
sql insert into tba1 values ('2023-11-17 16:29:03', 4);
|
|
sql insert into tba1 values ('2023-11-17 16:29:04', 5);
|
|
|
|
|
|
sql select a.*,b.* from tba1 a, (select * from tba1 order by ts) b where a.ts=b.ts;
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
sql select a.*,b.* from (select * from tba1 order by ts) a, tba1 b where a.ts=b.ts;
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
sql select a.*,b.* from tba1 a, (select * from tba1 order by ts desc) b where a.ts=b.ts;
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
sql select a.*,b.* from (select * from tba1 order by ts desc) a, tba1 b where a.ts=b.ts;
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
sql select a.*,b.* from (select * from tba1 order by ts) a, (select * from tba1 order by ts) b where a.ts=b.ts;
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
sql select a.*,b.* from (select * from tba1 order by ts desc) a, (select * from tba1 order by ts desc) b where a.ts=b.ts;
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
sql select a.*,b.* from (select * from tba1 order by ts) a, (select * from tba1 order by ts desc) b where a.ts=b.ts;
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
sql select a.*,b.* from (select * from tba1 order by ts desc) a, (select * from tba1 order by ts) b where a.ts=b.ts;
|
|
if $rows != 4 then
|
|
return -1
|
|
endi
|
|
|
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|