From fbcf0dab2c8f621fdeb684ae4c18248c529c1e7e Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sat, 2 Jul 2022 19:24:06 +0800 Subject: [PATCH] test: show indexes --- tests/script/tsim/sma/drop_sma.sim | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tests/script/tsim/sma/drop_sma.sim b/tests/script/tsim/sma/drop_sma.sim index 73ada2de56..67e39023b5 100644 --- a/tests/script/tsim/sma/drop_sma.sim +++ b/tests/script/tsim/sma/drop_sma.sim @@ -53,6 +53,22 @@ sql create sma index sma_index_name1 on stb function(max(c1),max(c2),min(c1)) in print --> drop stb sql drop table stb; +print --> show sma +sql show indexes 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 + return -1 +endi +if $data[0][0] != stb then + return -1 +endi + + print ========== step4 repeat print --> create stb @@ -64,6 +80,21 @@ sql create sma index sma_index_name1 on stb function(max(c1),max(c2),min(c1)) in print --> drop stb sql drop table stb; +print --> show sma +sql show indexes from stb +if $rows != 1 then + return -1 +endi +if $data[0][0] != sma_index_name1 then + return -1 +endi +if $data[0][0] != d1 then + return -1 +endi +if $data[0][0] != stb then + return -1 +endi + print ========== step5 sql drop database if exists db; sql create database db duration 300;