test: show indexes
This commit is contained in:
parent
fbcf0dab2c
commit
900216f77f
|
@ -50,24 +50,23 @@ sql create table if not exists stb (ts timestamp, c1 int, c2 float, c3 double) t
|
|||
print --> create sma
|
||||
sql create sma index sma_index_name1 on stb function(max(c1),max(c2),min(c1)) interval(6m,10s) sliding(6m);
|
||||
|
||||
print --> drop stb
|
||||
sql drop table stb;
|
||||
|
||||
print --> show sma
|
||||
sql show indexes from d1
|
||||
sql show indexes from stb from d1;
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
if $data[0][0] != sma_index_name1 then
|
||||
return -1
|
||||
endi
|
||||
if $data[0][0] != d1 then
|
||||
if $data[0][1] != d1 then
|
||||
return -1
|
||||
endi
|
||||
if $data[0][0] != stb then
|
||||
if $data[0][2] != stb then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print --> drop stb
|
||||
sql drop table stb;
|
||||
|
||||
print ========== step4 repeat
|
||||
|
||||
|
@ -77,24 +76,24 @@ sql create table if not exists stb (ts timestamp, c1 int, c2 float, c3 double) t
|
|||
print --> create sma
|
||||
sql create sma index sma_index_name1 on stb function(max(c1),max(c2),min(c1)) interval(6m,10s) sliding(6m);
|
||||
|
||||
print --> drop stb
|
||||
sql drop table stb;
|
||||
|
||||
print --> show sma
|
||||
sql show indexes from stb
|
||||
sql show indexes from stb from d1;
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
if $data[0][0] != sma_index_name1 then
|
||||
return -1
|
||||
endi
|
||||
if $data[0][0] != d1 then
|
||||
if $data[0][1] != d1 then
|
||||
return -1
|
||||
endi
|
||||
if $data[0][0] != stb then
|
||||
if $data[0][2] != stb then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print --> drop stb
|
||||
sql drop table stb;
|
||||
|
||||
print ========== step5
|
||||
sql drop database if exists db;
|
||||
sql create database db duration 300;
|
||||
|
|
Loading…
Reference in New Issue