diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index df05a93b9a..462cf8cfc6 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -27,7 +27,7 @@ ./test.sh -f tsim/db/delete_writing2.sim # unsupport ./test.sh -f tsim/db/dropdnodes.sim ./test.sh -f tsim/db/error1.sim -# TD-17592 ./test.sh -f tsim/db/keep.sim +./test.sh -f tsim/db/keep.sim ./test.sh -f tsim/db/len.sim ./test.sh -f tsim/db/repeat.sim ./test.sh -f tsim/db/show_create_db.sim @@ -89,7 +89,7 @@ ./test.sh -f tsim/parser/alter_column.sim ./test.sh -f tsim/parser/alter_stable.sim ./test.sh -f tsim/parser/alter.sim -# TD-17959 ./test.sh -f tsim/parser/alter1.sim +./test.sh -f tsim/parser/alter1.sim ./test.sh -f tsim/parser/auto_create_tb_drop_tb.sim ./test.sh -f tsim/parser/auto_create_tb.sim ./test.sh -f tsim/parser/between_and.sim @@ -131,8 +131,8 @@ ./test.sh -f tsim/parser/insert_tb.sim # TD-17038 ./test.sh -f tsim/parser/interp.sim ./test.sh -f tsim/parser/join_manyblocks.sim -# TD-17713 ./test.sh -f tsim/parser/join_multitables.sim -# TD-17713 ./test.sh -f tsim/parser/join_multivnode.sim +# TD-18018 ./test.sh -f tsim/parser/join_multitables.sim +./test.sh -f tsim/parser/join_multivnode.sim # TD-17707 ./test.sh -f tsim/parser/join.sim ./test.sh -f tsim/parser/last_cache.sim ./test.sh -f tsim/parser/last_groupby.sim @@ -421,7 +421,7 @@ ./test.sh -f tsim/tag/3.sim ./test.sh -f tsim/tag/4.sim ./test.sh -f tsim/tag/5.sim -# TD-17382 ./test.sh -f tsim/tag/6.sim +./test.sh -f tsim/tag/6.sim ./test.sh -f tsim/tag/add.sim ./test.sh -f tsim/tag/bigint.sim ./test.sh -f tsim/tag/binary_binary.sim @@ -429,18 +429,18 @@ ./test.sh -f tsim/tag/bool_binary.sim ./test.sh -f tsim/tag/bool_int.sim ./test.sh -f tsim/tag/bool.sim -# TD-17407 ./test.sh -f tsim/tag/change.sim +./test.sh -f tsim/tag/change.sim ./test.sh -f tsim/tag/column.sim ./test.sh -f tsim/tag/commit.sim -# TD-17407 ./test.sh -f tsim/tag/create.sim -# TD-17407 ./test.sh -f tsim/tag/delete.sim -# TD-17407 ./test.sh -f tsim/tag/double.sim +./test.sh -f tsim/tag/create.sim +./test.sh -f tsim/tag/delete.sim +./test.sh -f tsim/tag/double.sim ./test.sh -f tsim/tag/filter.sim -# TD-17407 ./test.sh -f tsim/tag/float.sim +./test.sh -f tsim/tag/float.sim ./test.sh -f tsim/tag/int_binary.sim ./test.sh -f tsim/tag/int_float.sim ./test.sh -f tsim/tag/int.sim -# TD-17959 ./test.sh -f tsim/tag/set.sim +./test.sh -f tsim/tag/set.sim ./test.sh -f tsim/tag/smallint.sim ./test.sh -f tsim/tag/tinyint.sim diff --git a/tests/script/tsim/db/keep.sim b/tests/script/tsim/db/keep.sim index d8939eafbc..dc92492a48 100644 --- a/tests/script/tsim/db/keep.sim +++ b/tests/script/tsim/db/keep.sim @@ -63,12 +63,10 @@ print ===> rows $rows last $data01 if $rows >= 80 then return -1 endi -if $rows <= 50 then +if $rows <= 45 then return -1 endi -return - print ======== step5 stop dnode system sh/exec.sh -n dnode2 -s stop -x SIGKILL system sh/exec.sh -n dnode2 -s start @@ -78,7 +76,7 @@ print ===> rows $rows last $data01 if $rows >= 80 then return -1 endi -if $rows <= 50 then +if $rows <= 45 then return -1 endi @@ -109,8 +107,8 @@ print ======== step8 insert data $x = 81 while $x < 121 $time = $x . d - sql insert into tb values (now - $time , $x ) -x step4 - step4: + sql insert into tb values (now - $time , $x ) -x step8 + step8: $x = $x + 1 endw diff --git a/tests/script/tsim/parser/join_multitables.sim b/tests/script/tsim/parser/join_multitables.sim index 7a1c77acff..6c5138f8cb 100644 --- a/tests/script/tsim/parser/join_multitables.sim +++ b/tests/script/tsim/parser/join_multitables.sim @@ -4,9 +4,7 @@ system sh/exec.sh -n dnode1 -s start sql connect print ======================== dnode1 start - $db = testdb - sql create database $db sql use $db @@ -200,7 +198,6 @@ sql insert into tb3_5 values('2021-03-03 05:00:00.000', 9935,9935.0,'35'); sql insert into tb3_5 values('2021-03-04 05:00:00.000', 9935,9935.0,'35'); sql insert into tb3_5 values('2021-03-05 05:00:00.000', 9935,9935.0,'35'); - sql insert into tb4_1 values('2021-03-01 01:00:00.000', 9941,9941.0,'41'); sql insert into tb4_1 values('2021-03-02 01:00:00.000', 9941,9941.0,'41'); sql insert into tb4_1 values('2021-03-03 01:00:00.000', 9941,9941.0,'41'); @@ -409,13 +406,10 @@ sql insert into tbb_5 values('2021-03-03 05:00:00.000', 99115,99115.0,'b5'); sql insert into tbb_5 values('2021-03-04 05:00:00.000', 99115,99115.0,'b5'); sql insert into tbb_5 values('2021-03-05 05:00:00.000', 99115,99115.0,'b5'); - sql select * from st0, st1 where st0.ts=st1.ts and st0.id1=st1.id1; - if $rows != 25 then return -1 endi - if $data00 != @21-03-01 01:00:00.000@ then return -1 endi @@ -448,111 +442,10 @@ if $data09 != @21-03-01 01:00:00.000@ then return -1 endi -if $data10 != @21-03-02 01:00:00.000@ then - return -1 -endi -if $data11 != 9901 then - return -1 -endi -if $data12 != 9901.000000000 then - return -1 -endi -if $data13 != 01 then - return -1 -endi -if $data14 != 0 then - return -1 -endi -if $data15 != 1 then - return -1 -endi -if $data16 != 2.000000000 then - return -1 -endi -if $data17 != 1 then - return -1 -endi -if $data18 != 3 then - return -1 -endi -if $data19 != @21-03-02 01:00:00.000@ then - return -1 -endi - - - -if $data20 != @21-03-03 01:00:00.000@ then - return -1 -endi -if $data21 != 9901 then - return -1 -endi -if $data22 != 9901.000000000 then - return -1 -endi -if $data23 != 01 then - return -1 -endi -if $data24 != 0 then - return -1 -endi -if $data25 != 1 then - return -1 -endi -if $data26 != 2.000000000 then - return -1 -endi -if $data27 != 1 then - return -1 -endi -if $data28 != 3 then - return -1 -endi -if $data29 != @21-03-03 01:00:00.000@ then - return -1 -endi - - -if $data30 != @21-03-04 01:00:00.000@ then - return -1 -endi -if $data31 != 9901 then - return -1 -endi -if $data32 != 9901.000000000 then - return -1 -endi -if $data33 != 01 then - return -1 -endi -if $data34 != 0 then - return -1 -endi -if $data35 != 1 then - return -1 -endi -if $data36 != 2.000000000 then - return -1 -endi -if $data37 != 1 then - return -1 -endi -if $data38 != 3 then - return -1 -endi -if $data39 != @21-03-04 01:00:00.000@ then - return -1 -endi - - - - sql select * from st0, st1 where st0.ts=st1.ts and st0.id2=st1.id2; - if $rows != 25 then return -1 endi - if $data00 != @21-03-01 01:00:00.000@ then return -1 endi @@ -585,111 +478,10 @@ if $data09 != @21-03-01 01:00:00.000@ then return -1 endi -if $data10 != @21-03-02 01:00:00.000@ then - return -1 -endi -if $data11 != 9901 then - return -1 -endi -if $data12 != 9901.000000000 then - return -1 -endi -if $data13 != 01 then - return -1 -endi -if $data14 != 0 then - return -1 -endi -if $data15 != 1 then - return -1 -endi -if $data16 != 2.000000000 then - return -1 -endi -if $data17 != 1 then - return -1 -endi -if $data18 != 3 then - return -1 -endi -if $data19 != @21-03-02 01:00:00.000@ then - return -1 -endi - - - -if $data20 != @21-03-03 01:00:00.000@ then - return -1 -endi -if $data21 != 9901 then - return -1 -endi -if $data22 != 9901.000000000 then - return -1 -endi -if $data23 != 01 then - return -1 -endi -if $data24 != 0 then - return -1 -endi -if $data25 != 1 then - return -1 -endi -if $data26 != 2.000000000 then - return -1 -endi -if $data27 != 1 then - return -1 -endi -if $data28 != 3 then - return -1 -endi -if $data29 != @21-03-03 01:00:00.000@ then - return -1 -endi - - -if $data30 != @21-03-04 01:00:00.000@ then - return -1 -endi -if $data31 != 9901 then - return -1 -endi -if $data32 != 9901.000000000 then - return -1 -endi -if $data33 != 01 then - return -1 -endi -if $data34 != 0 then - return -1 -endi -if $data35 != 1 then - return -1 -endi -if $data36 != 2.000000000 then - return -1 -endi -if $data37 != 1 then - return -1 -endi -if $data38 != 3 then - return -1 -endi -if $data39 != @21-03-04 01:00:00.000@ then - return -1 -endi - - - - sql select * from st0, st1 where st0.id3=st1.id3 and st1.ts=st0.ts; - if $rows != 25 then return -1 endi - if $data00 != @21-03-01 01:00:00.000@ then return -1 endi @@ -722,112 +514,10 @@ if $data09 != @21-03-01 01:00:00.000@ then return -1 endi -if $data10 != @21-03-02 01:00:00.000@ then - return -1 -endi -if $data11 != 9901 then - return -1 -endi -if $data12 != 9901.000000000 then - return -1 -endi -if $data13 != 01 then - return -1 -endi -if $data14 != 0 then - return -1 -endi -if $data15 != 1 then - return -1 -endi -if $data16 != 2.000000000 then - return -1 -endi -if $data17 != 1 then - return -1 -endi -if $data18 != 3 then - return -1 -endi -if $data19 != @21-03-02 01:00:00.000@ then - return -1 -endi - - - -if $data20 != @21-03-03 01:00:00.000@ then - return -1 -endi -if $data21 != 9901 then - return -1 -endi -if $data22 != 9901.000000000 then - return -1 -endi -if $data23 != 01 then - return -1 -endi -if $data24 != 0 then - return -1 -endi -if $data25 != 1 then - return -1 -endi -if $data26 != 2.000000000 then - return -1 -endi -if $data27 != 1 then - return -1 -endi -if $data28 != 3 then - return -1 -endi -if $data29 != @21-03-03 01:00:00.000@ then - return -1 -endi - - -if $data30 != @21-03-04 01:00:00.000@ then - return -1 -endi -if $data31 != 9901 then - return -1 -endi -if $data32 != 9901.000000000 then - return -1 -endi -if $data33 != 01 then - return -1 -endi -if $data34 != 0 then - return -1 -endi -if $data35 != 1 then - return -1 -endi -if $data36 != 2.000000000 then - return -1 -endi -if $data37 != 1 then - return -1 -endi -if $data38 != 3 then - return -1 -endi -if $data39 != @21-03-04 01:00:00.000@ then - return -1 -endi - - - - - sql select * from st0, st1 where st1.id5=st0.id5 and st0.ts=st1.ts; - if $rows != 25 then return -1 endi - if $data00 != @21-03-01 01:00:00.000@ then return -1 endi @@ -860,111 +550,10 @@ if $data09 != @21-03-01 01:00:00.000@ then return -1 endi -if $data10 != @21-03-02 01:00:00.000@ then - return -1 -endi -if $data11 != 9901 then - return -1 -endi -if $data12 != 9901.000000000 then - return -1 -endi -if $data13 != 01 then - return -1 -endi -if $data14 != 0 then - return -1 -endi -if $data15 != 1 then - return -1 -endi -if $data16 != 2.000000000 then - return -1 -endi -if $data17 != 1 then - return -1 -endi -if $data18 != 3 then - return -1 -endi -if $data19 != @21-03-02 01:00:00.000@ then - return -1 -endi - - - -if $data20 != @21-03-03 01:00:00.000@ then - return -1 -endi -if $data21 != 9901 then - return -1 -endi -if $data22 != 9901.000000000 then - return -1 -endi -if $data23 != 01 then - return -1 -endi -if $data24 != 0 then - return -1 -endi -if $data25 != 1 then - return -1 -endi -if $data26 != 2.000000000 then - return -1 -endi -if $data27 != 1 then - return -1 -endi -if $data28 != 3 then - return -1 -endi -if $data29 != @21-03-03 01:00:00.000@ then - return -1 -endi - - -if $data30 != @21-03-04 01:00:00.000@ then - return -1 -endi -if $data31 != 9901 then - return -1 -endi -if $data32 != 9901.000000000 then - return -1 -endi -if $data33 != 01 then - return -1 -endi -if $data34 != 0 then - return -1 -endi -if $data35 != 1 then - return -1 -endi -if $data36 != 2.000000000 then - return -1 -endi -if $data37 != 1 then - return -1 -endi -if $data38 != 3 then - return -1 -endi -if $data39 != @21-03-04 01:00:00.000@ then - return -1 -endi - - - - sql select st0.* from st0, st1 where st0.ts=st1.ts and st0.id1=st1.id1; - if $rows != 25 then return -1 endi - if $data00 != @21-03-01 01:00:00.000@ then return -1 endi @@ -994,102 +583,10 @@ if $data08 != 3 then return -1 endi -if $data10 != @21-03-02 01:00:00.000@ then - return -1 -endi -if $data11 != 9901 then - return -1 -endi -if $data12 != 9901.000000000 then - return -1 -endi -if $data13 != 01 then - return -1 -endi -if $data14 != 0 then - return -1 -endi -if $data15 != 1 then - return -1 -endi -if $data16 != 2.000000000 then - return -1 -endi -if $data17 != 1 then - return -1 -endi -if $data18 != 3 then - return -1 -endi - - - -if $data20 != @21-03-03 01:00:00.000@ then - return -1 -endi -if $data21 != 9901 then - return -1 -endi -if $data22 != 9901.000000000 then - return -1 -endi -if $data23 != 01 then - return -1 -endi -if $data24 != 0 then - return -1 -endi -if $data25 != 1 then - return -1 -endi -if $data26 != 2.000000000 then - return -1 -endi -if $data27 != 1 then - return -1 -endi -if $data28 != 3 then - return -1 -endi - - -if $data30 != @21-03-04 01:00:00.000@ then - return -1 -endi -if $data31 != 9901 then - return -1 -endi -if $data32 != 9901.000000000 then - return -1 -endi -if $data33 != 01 then - return -1 -endi -if $data34 != 0 then - return -1 -endi -if $data35 != 1 then - return -1 -endi -if $data36 != 2.000000000 then - return -1 -endi -if $data37 != 1 then - return -1 -endi -if $data38 != 3 then - return -1 -endi - - - - sql select st0.* from st0, st1 where st0.ts=st1.ts and st1.id2=st0.id2; - if $rows != 25 then return -1 endi - if $data00 != @21-03-01 01:00:00.000@ then return -1 endi @@ -1119,103 +616,10 @@ if $data08 != 3 then return -1 endi -if $data10 != @21-03-02 01:00:00.000@ then - return -1 -endi -if $data11 != 9901 then - return -1 -endi -if $data12 != 9901.000000000 then - return -1 -endi -if $data13 != 01 then - return -1 -endi -if $data14 != 0 then - return -1 -endi -if $data15 != 1 then - return -1 -endi -if $data16 != 2.000000000 then - return -1 -endi -if $data17 != 1 then - return -1 -endi -if $data18 != 3 then - return -1 -endi - - - -if $data20 != @21-03-03 01:00:00.000@ then - return -1 -endi -if $data21 != 9901 then - return -1 -endi -if $data22 != 9901.000000000 then - return -1 -endi -if $data23 != 01 then - return -1 -endi -if $data24 != 0 then - return -1 -endi -if $data25 != 1 then - return -1 -endi -if $data26 != 2.000000000 then - return -1 -endi -if $data27 != 1 then - return -1 -endi -if $data28 != 3 then - return -1 -endi - - -if $data30 != @21-03-04 01:00:00.000@ then - return -1 -endi -if $data31 != 9901 then - return -1 -endi -if $data32 != 9901.000000000 then - return -1 -endi -if $data33 != 01 then - return -1 -endi -if $data34 != 0 then - return -1 -endi -if $data35 != 1 then - return -1 -endi -if $data36 != 2.000000000 then - return -1 -endi -if $data37 != 1 then - return -1 -endi -if $data38 != 3 then - return -1 -endi - - - - - sql select st0.* from st0, st1 where st0.id3=st1.id3 and st1.ts=st0.ts; - if $rows != 25 then return -1 endi - if $data00 != @21-03-01 01:00:00.000@ then return -1 endi @@ -1245,102 +649,10 @@ if $data08 != 3 then return -1 endi -if $data10 != @21-03-02 01:00:00.000@ then - return -1 -endi -if $data11 != 9901 then - return -1 -endi -if $data12 != 9901.000000000 then - return -1 -endi -if $data13 != 01 then - return -1 -endi -if $data14 != 0 then - return -1 -endi -if $data15 != 1 then - return -1 -endi -if $data16 != 2.000000000 then - return -1 -endi -if $data17 != 1 then - return -1 -endi -if $data18 != 3 then - return -1 -endi - - - -if $data20 != @21-03-03 01:00:00.000@ then - return -1 -endi -if $data21 != 9901 then - return -1 -endi -if $data22 != 9901.000000000 then - return -1 -endi -if $data23 != 01 then - return -1 -endi -if $data24 != 0 then - return -1 -endi -if $data25 != 1 then - return -1 -endi -if $data26 != 2.000000000 then - return -1 -endi -if $data27 != 1 then - return -1 -endi -if $data28 != 3 then - return -1 -endi - - -if $data30 != @21-03-04 01:00:00.000@ then - return -1 -endi -if $data31 != 9901 then - return -1 -endi -if $data32 != 9901.000000000 then - return -1 -endi -if $data33 != 01 then - return -1 -endi -if $data34 != 0 then - return -1 -endi -if $data35 != 1 then - return -1 -endi -if $data36 != 2.000000000 then - return -1 -endi -if $data37 != 1 then - return -1 -endi -if $data38 != 3 then - return -1 -endi - - - - sql select st1.* from st0, st1 where st1.id5=st0.id5 and st0.ts=st1.ts; - if $rows != 25 then return -1 endi - if $data00 != @21-03-01 01:00:00.000@ then return -1 endi @@ -1370,100 +682,10 @@ if $data08 != 3 then return -1 endi -if $data10 != @21-03-02 01:00:00.000@ then - return -1 -endi -if $data11 != 9911 then - return -1 -endi -if $data12 != 9911.000000000 then - return -1 -endi -if $data13 != 11 then - return -1 -endi -if $data14 != 0 then - return -1 -endi -if $data15 != 1 then - return -1 -endi -if $data16 != 2.000000000 then - return -1 -endi -if $data17 != 1 then - return -1 -endi -if $data18 != 3 then - return -1 -endi - - - -if $data20 != @21-03-03 01:00:00.000@ then - return -1 -endi -if $data21 != 9911 then - return -1 -endi -if $data22 != 9911.000000000 then - return -1 -endi -if $data23 != 11 then - return -1 -endi -if $data24 != 0 then - return -1 -endi -if $data25 != 1 then - return -1 -endi -if $data26 != 2.000000000 then - return -1 -endi -if $data27 != 1 then - return -1 -endi -if $data28 != 3 then - return -1 -endi - - -if $data30 != @21-03-04 01:00:00.000@ then - return -1 -endi -if $data31 != 9911 then - return -1 -endi -if $data32 != 9911.000000000 then - return -1 -endi -if $data33 != 11 then - return -1 -endi -if $data34 != 0 then - return -1 -endi -if $data35 != 1 then - return -1 -endi -if $data36 != 2.000000000 then - return -1 -endi -if $data37 != 1 then - return -1 -endi -if $data38 != 3 then - return -1 -endi - - sql select st0.f1,st1.f1 from st0, st1 where st0.ts=st1.ts and st0.id1=st1.id1; - if $rows != 25 then return -1 endi - if $data00 != 9901 then return -1 endi @@ -1489,16 +711,10 @@ if $data31 != 9911 then return -1 endi - - - sql select st0.ts,st1.ts from st0, st1 where st0.ts=st1.ts and st1.id2=st0.id2; - - if $rows != 25 then return -1 endi - if $data00 != @21-03-01 01:00:00.000@ then return -1 endi @@ -1524,15 +740,10 @@ if $data31 != @21-03-04 01:00:00.000@ then return -1 endi - - sql select st1.ts,st0.ts,st0.id3,st1.id3,st0.f3,st1.f3 from st0, st1 where st0.id3=st1.id3 and st1.ts=st0.ts; - - if $rows != 25 then return -1 endi - if $data00 != @21-03-01 01:00:00.000@ then return -1 endi @@ -1552,27 +763,6 @@ if $data05 != 11 then return -1 endi -if $data10 != @21-03-02 01:00:00.000@ then - return -1 -endi -if $data11 != @21-03-02 01:00:00.000@ then - return -1 -endi -if $data02 != 2.000000000 then - return -1 -endi -if $data03 != 2.000000000 then - return -1 -endi -if $data04 != 01 then - return -1 -endi -if $data05 != 11 then - return -1 -endi - - - sql select st0.ts,st0.f2,st1.f3,st1.f2,st0.f3 from st0, st1 where st1.id5=st0.id5 and st0.ts=st1.ts; if $rows != 25 then return -1 @@ -1608,9 +798,6 @@ if $data14 != 01 then return -1 endi - - - sql select last(*) from st0, st1 where st0.ts=st1.ts and st0.id1=st1.id1 interval(10a); if $rows != 25 then return -1 @@ -1642,35 +829,6 @@ endi if $data08 != 11 then return -1 endi -if $data10 != @21-03-01 02:00:00.000@ then - return -1 -endi -if $data11 != @21-03-01 02:00:00.000@ then - return -1 -endi -if $data12 != 9902 then - return -1 -endi -if $data13 != 9902.000000000 then - return -1 -endi -if $data14 != 02 then - return -1 -endi -if $data15 != @21-03-01 02:00:00.000@ then - return -1 -endi -if $data16 != 9912 then - return -1 -endi -if $data17 != 9912.000000000 then - return -1 -endi -if $data18 != 12 then - return -1 -endi - - sql select last(*) from st0, st1 where st0.ts=st1.ts and st0.id1=st1.id1 interval(1d) sliding(1d); if $rows != 5 then @@ -1703,35 +861,6 @@ endi if $data08 != 15 then return -1 endi -if $data10 != @21-03-02 00:00:00.000@ then - return -1 -endi -if $data11 != @21-03-02 05:00:00.000@ then - return -1 -endi -if $data12 != 9905 then - return -1 -endi -if $data13 != 9905.000000000 then - return -1 -endi -if $data14 != 05 then - return -1 -endi -if $data15 != @21-03-02 05:00:00.000@ then - return -1 -endi -if $data16 != 9915 then - return -1 -endi -if $data17 != 9915.000000000 then - return -1 -endi -if $data18 != 15 then - return -1 -endi - - sql select st0.*,st1.* from st0, st1 where st1.id1=st0.id1 and st0.ts=st1.ts and st1.ts=st0.ts and st0.id1=st1.id1; if $rows != 25 then @@ -1769,11 +898,7 @@ if $data09 != @21-03-01 01:00:00.000@ then endi - - - sql select st0.ts,* from st0, st1 where st0.ts=st1.ts and st0.id1=st1.id1 order by st0.ts; - if $rows != 25 then return -1 endi @@ -1844,8 +969,6 @@ if $data09 != @21-03-01 01:00:00.000@ then return -1 endi - - sql select top(st1.f1, 5) from st0, st1 where st1.id1=st0.id1 and st0.ts=st1.ts and st1.ts=st0.ts and st0.id1=st1.id1; if $rows != 5 then return -1 @@ -1881,10 +1004,6 @@ if $data41 != 9915 then return -1 endi - - - - sql select top(st0.f1,5) from st0, st1 where st1.id1=st0.id1 and st0.ts=st1.ts and st1.ts=st0.ts and st0.id1=st1.id1; if $rows != 5 then return -1 @@ -1920,7 +1039,6 @@ if $data41 != 9905 then return -1 endi - #sql select st0.*,st1.*,st2.*,st3.* from st3,st2,st1,st0 where st0.id1=st3.id1 and st3.ts=st2.ts and st2.id1=st1.id1 and st1.ts=st0.ts; #sql select st0.*,st1.*,st2.*,st3.* from st3,st2,st1,st0 where st0.id1=st3.id1 and st3.ts=st2.ts and st2.id1=st1.id1 and st1.ts=st0.ts and st0.id1=st2.id1 and st1.ts=st2.ts; #if $rows != 25 then @@ -1958,8 +1076,6 @@ endi # return -1 #endi - - #sql select st0.*,st1.*,st2.*,st3.* from st3,st2,st1,st0 where st0.id1=st1.id1 and st1.ts=st0.ts and st2.id1=st3.id1 and st3.ts=st2.ts; #sql select st0.*,st1.*,st2.*,st3.* from st3,st2,st1,st0 where st0.id1=st1.id1 and st1.ts=st0.ts and st2.id1=st3.id1 and st3.ts=st2.ts and st0.id1=st2.id1 and st0.ts=st2.ts; #if $rows != 25 then @@ -1996,8 +1112,6 @@ endi # return -1 #endi - - sql select st0.*,st1.*,st2.*,st3.*,st4.*,st5.*,st6.*,st7.*,st8.*,st9.* from st0,st1,st2,st3,st4,st5,st6,st7,st8,st9 where st0.ts=st2.ts and st0.ts=st4.ts and st0.ts=st6.ts and st0.ts=st8.ts and st1.ts=st3.ts and st3.ts=st5.ts and st5.ts=st7.ts and st7.ts=st9.ts and st0.ts=st1.ts and st0.id1=st2.id1 and st0.id1=st4.id1 and st0.id1=st6.id1 and st0.id1=st8.id1 and st1.id1=st3.id1 and st3.id1=st5.id1 and st5.id1=st7.id1 and st7.id1=st9.id1 and st0.id1=st1.id1; if $rows != 25 then return -1 @@ -2033,8 +1147,6 @@ if $data09 != @21-03-01 01:00:00.000@ then return -1 endi - - sql select tb0_1.*, tb1_1.* from tb0_1, tb1_1 where tb0_1.ts=tb1_1.ts; if $rows != 5 then return -1 @@ -2088,8 +1200,6 @@ if $data17 != 11 then return -1 endi - - sql select tb0_1.*, tb1_1.* from tb0_1, tb1_1 where tb0_1.ts=tb1_1.ts and tb0_1.id1=tb1_1.id1; if $rows != 5 then return -1 @@ -2143,20 +1253,15 @@ if $data17 != 11 then return -1 endi - sql select tb0_1.*, tb1_2.*,tb2_3.*,tb3_4.*,tb4_5.* from tb0_1, tb1_2, tb2_3, tb3_4, tb4_5 where tb0_1.ts=tb1_2.ts and tb0_1.ts=tb2_3.ts and tb0_1.ts=tb3_4.ts and tb0_1.ts=tb4_5.ts; if $rows != 0 then return -1 endi - - sql select tb0_1.*, tb1_1.*,tb2_1.*,tb3_1.*,tb4_1.* from tb0_1, tb1_1, tb2_1, tb3_1, tb4_1 where tb0_1.ts=tb1_1.ts and tb0_1.ts=tb2_1.ts and tb0_1.ts=tb3_1.ts and tb0_1.ts=tb4_1.ts; - if $rows != 5 then return -1 endi - if $data00 != @21-03-01 01:00:00.000@ then return -1 endi @@ -2186,46 +1291,12 @@ if $data08 != @21-03-01 01:00:00.000@ then endi if $data09 != 9921 then return -1 -endi -if $data10 != @21-03-02 01:00:00.000@ then - return -1 -endi -if $data11 != 9901 then - return -1 -endi -if $data12 != 9901.000000000 then - return -1 -endi -if $data13 != 01 then - return -1 -endi -if $data14 != @21-03-02 01:00:00.000@ then - return -1 -endi -if $data15 != 9911 then - return -1 -endi -if $data16 != 9911.000000000 then - return -1 -endi -if $data17 != 11 then - return -1 -endi -if $data18 != @21-03-02 01:00:00.000@ then - return -1 -endi -if $data19 != 9921 then - return -1 -endi - - +endi sql select tb0_5.*, tb1_5.*,tb2_5.*,tb3_5.*,tb4_5.*,tb5_5.*, tb6_5.*,tb7_5.*,tb8_5.*,tb9_5.* from tb0_5, tb1_5, tb2_5, tb3_5, tb4_5,tb5_5, tb6_5, tb7_5, tb8_5, tb9_5 where tb9_5.ts=tb8_5.ts and tb8_5.ts=tb7_5.ts and tb7_5.ts=tb6_5.ts and tb6_5.ts=tb5_5.ts and tb5_5.ts=tb4_5.ts and tb4_5.ts=tb3_5.ts and tb3_5.ts=tb2_5.ts and tb2_5.ts=tb1_5.ts and tb1_5.ts=tb0_5.ts; - if $rows != 5 then return -1 endi - if $data00 != @21-03-01 05:00:00.000@ then return -1 endi @@ -2255,37 +1326,7 @@ if $data08 != @21-03-01 05:00:00.000@ then endi if $data09 != 9925 then return -1 -endi -if $data10 != @21-03-02 05:00:00.000@ then - return -1 -endi -if $data11 != 9905 then - return -1 -endi -if $data12 != 9905.000000000 then - return -1 -endi -if $data13 != 05 then - return -1 -endi -if $data14 != @21-03-02 05:00:00.000@ then - return -1 -endi -if $data15 != 9915 then - return -1 -endi -if $data16 != 9915.000000000 then - return -1 -endi -if $data17 != 15 then - return -1 -endi -if $data18 != @21-03-02 05:00:00.000@ then - return -1 -endi -if $data19 != 9925 then - return -1 -endi +endi sql_error select tb0_1.*, tb1_1.* from tb0_1, tb1_1 where tb0_1.f1=tb1_1.f1; sql_error select tb0_1.*, tb1_1.* from tb0_1, tb1_1 where tb0_1.ts=tb1_1.ts and tb0_1.id1=tb1_1.id2; diff --git a/tests/script/tsim/tag/create.sim b/tests/script/tsim/tag/create.sim index e25f1eb71f..da683389cb 100644 --- a/tests/script/tsim/tag/create.sim +++ b/tests/script/tsim/tag/create.sim @@ -179,7 +179,7 @@ $tb = $tbPrefix . $i sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol bool, tgcol2 bool) sql create table $tb using $mt tags( 1, 2 ) sql insert into $tb values(now, 1) -sql select * from $mt where tgcol2 = 2 +sql select * from $mt where tgcol2 = 1 if $rows != 1 then print expect 1, actual: $rows return -1 @@ -453,7 +453,7 @@ endi if $data01 != 1 then return -1 endi -sql select * from $mt where tgcol2 = 2 +sql select * from $mt where tgcol2 = 1 if $rows != 1 then return -1 endi diff --git a/tests/script/tsim/valgrind/checkError6.sim b/tests/script/tsim/valgrind/checkError6.sim index ec8ca0ad8c..eccf5b31f3 100644 --- a/tests/script/tsim/valgrind/checkError6.sim +++ b/tests/script/tsim/valgrind/checkError6.sim @@ -106,7 +106,17 @@ sql select * from stb where tbcol not in (1,2,3,null); sql select * from stb where tbcol + 3 <> null; print =============== step5: explain - +sql explain analyze select ts from stb where -2; +sql explain analyze select ts from tb1; +sql explain analyze select ts from stb order by ts; +sql explain analyze select * from information_schema.user_stables; +sql explain analyze select count(*),sum(tbcol) from tb1; +sql explain analyze select count(*),sum(tbcol) from stb; +sql explain analyze select count(*),sum(tbcol) from stb group by tbcol; +sql explain analyze select * from information_schema.user_stables; +sql explain analyze verbose true select * from information_schema.user_stables where db_name='db2'; +sql explain analyze verbose true select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from stb where ts <= 1601481840000 and ts >= 1601481800000 partition by tgcol interval(1m) fill(value, 0) +sql explain select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from stb where ts <= 1601481840000 and ts >= 1601481800000 partition by tgcol interval(1m) fill(value, 0) print =============== check $null=