From 1df7f8d274a2c44cb7a503ea86a87fededa256b1 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Mon, 6 Jun 2022 23:06:25 +0800 Subject: [PATCH] test:update some test scripts. --- tests/script/tsim/query/complex_having.sim | 12 ++++++------ tests/script/tsim/query/crash_sql.sim | 6 ++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/script/tsim/query/complex_having.sim b/tests/script/tsim/query/complex_having.sim index ef58228f34..6a4aa6ea28 100644 --- a/tests/script/tsim/query/complex_having.sim +++ b/tests/script/tsim/query/complex_having.sim @@ -105,7 +105,7 @@ endi sql select sum(c1) ,count(c1) from ct4 group by c1 having count(c7) < 1 or sum(c1) > 2 ; print ====> sql : select sum(c1) ,count(c1) from ct4 group by c1 having count(c7) < 1 or sum(c1) > 2 ; print ====> rows: $rows -if $rows != 7 then +if $rows != 8 then return -1 endi @@ -214,9 +214,9 @@ print =================== count all rows sql select count(c1) from stb1 print ====> sql : select count(c1) from stb1 print ====> rows: $data00 -if $data00 != 20 then - print expect 20, actual: $data00 - return -1 +if $data00 != 17 then + print expect 17, actual: $data00 + return -1 endi #================================================= @@ -246,7 +246,7 @@ print =================== count all rows sql select count(c1) from stb1 print ====> sql : select count(c1) from stb1 print ====> rows: $data00 -if $data00 != 20 then +if $data00 != 17 then return -1 endi @@ -279,7 +279,7 @@ endi sql select sum(c1) ,count(c1) from ct4 group by c1 having count(c7) < 1 or sum(c1) > 2 ; print ====> sql : select sum(c1) ,count(c1) from ct4 group by c1 having count(c7) < 1 or sum(c1) > 2 ; print ====> rows: $rows -if $rows != 7 then +if $rows != 8 then return -1 endi diff --git a/tests/script/tsim/query/crash_sql.sim b/tests/script/tsim/query/crash_sql.sim index 44671fbb0d..b2b9239232 100644 --- a/tests/script/tsim/query/crash_sql.sim +++ b/tests/script/tsim/query/crash_sql.sim @@ -25,7 +25,7 @@ sql connect print =============== create database sql create database db sql show databases -if $rows != 2 then +if $rows != 3 then return -1 endi @@ -96,8 +96,6 @@ sql insert into ct4 values ( '2022-05-21 01:01:01.000', NULL, NULL, NULL, NULL, print ================ start query ====================== print ================ SQL used to cause taosd or taos shell crash -sql select sum(c1) ,count(c1) from ct4 group by c1 having sum(c10) between 0 and 1 ; - - +sql_error select sum(c1) ,count(c1) from ct4 group by c1 having sum(c10) between 0 and 1 ; #system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file -- GitLab