From c92db0aef065face6733f2bfc087f7c745054b49 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Wed, 10 Mar 2021 10:47:21 +0800 Subject: [PATCH] TD-3220 --- tests/script/general/db/topic1.sim | 73 +++--- tests/script/general/db/topic2.sim | 344 +++++++++++++---------------- tests/script/jenkins/basic.txt | 2 + tests/script/jenkins/basic_7.txt | 2 + 4 files changed, 198 insertions(+), 223 deletions(-) diff --git a/tests/script/general/db/topic1.sim b/tests/script/general/db/topic1.sim index 0f1ad60f3b..586d1006b4 100644 --- a/tests/script/general/db/topic1.sim +++ b/tests/script/general/db/topic1.sim @@ -365,7 +365,7 @@ if $data7_db != 20,20,30 then return -1 endi -sql_error alter database db keep 40 +sql_error alter topic db keep 40 sql alter database db keep 40 sql show databases print keep $data7_db @@ -596,6 +596,9 @@ endi print ============== step db1 sql create database d1 +sql_error alter database d1 partitions 2 +sql_error alter topic d1 partitions 2 + sql show topics; if $rows != 0 then return -1 @@ -613,11 +616,11 @@ if $rows != 0 then endi sql show databases; -if $rows != 0 then +if $rows != 1 then return -1 endi -sql drop database db +sql drop database d1 sql show topics; if $rows != 0 then return -1 @@ -651,7 +654,7 @@ if $rows != 1 then return -1 endi -sql drop database db +sql drop database d1 sql show topics; if $rows != 0 then return -1 @@ -685,7 +688,7 @@ if $rows != 1 then return -1 endi -sql drop database db +sql drop database d1 sql show topics; if $rows != 0 then return -1 @@ -696,23 +699,23 @@ if $rows != 0 then return -1 endi -print ============== step partitons -sql create partiton t1 partitons 5 +print ============== step partitions +sql create topic t1 partitions 5 -sql_error alter database t1 partitons -1 -sql_error alter database t1 partitons 0 -sql_error alter database t1 partitons 1 -sql_error alter database t1 partitons 2 -sql_error alter database t1 partitons 3 -sql_error alter database t1 partitons 100 -sql_error alter database t1 partitons 1000 -sql_error alter database t1 partitons 10000 +sql_error alter database t1 partitions -1 +sql_error alter database t1 partitions 0 +sql_error alter database t1 partitions 1 +sql_error alter database t1 partitions 2 +sql_error alter database t1 partitions 3 +sql_error alter database t1 partitions 100 +sql_error alter database t1 partitions 1000 +sql_error alter database t1 partitions 10000 -sql_error alter topic t1 partitons -1 -sql_error alter topic t1 partitons 0 -sql_error alter database t1 partitons 10000 +sql_error alter topic t1 partitions -1 +sql_error alter topic t1 partitions 0 +sql_error alter database t1 partitions 10000 -sql alter topic t1 partitons 1 +sql alter topic t1 partitions 1 sql show topics; if $rows != 1 then return -1 @@ -728,12 +731,12 @@ if $data00 != t1 then return -1 endi #tables -if $data02 != 6 then +if $data02 != 1 then return -1 endi #numofvgroups sql show t1.vgroups; -if $rows < 6 then +if $rows != 1 then return -1 endi sql show t1.stables; @@ -741,11 +744,11 @@ if $rows != 1 then return -1 endi sql show t1.tables; -if $rows < 6 then +if $rows != 1 then return -1 endi -sql alter topic t1 partitons 2 +sql alter topic t1 partitions 2 sql show topics; if $rows != 1 then return -1 @@ -761,12 +764,12 @@ if $data00 != t1 then return -1 endi #tables -if $data02 != 6 then +if $data02 != 2 then return -1 endi #numofvgroups sql show t1.vgroups; -if $rows < 6 then +if $rows != 2 then return -1 endi sql show t1.stables; @@ -774,11 +777,11 @@ if $rows != 1 then return -1 endi sql show t1.tables; -if $rows < 6 then +if $rows != 2 then return -1 endi -sql alter topic t1 partitons 3 +sql alter topic t1 partitions 3 sql show topics; if $rows != 1 then return -1 @@ -794,12 +797,12 @@ if $data00 != t1 then return -1 endi #tables -if $data02 != 6 then +if $data02 != 3 then return -1 endi #numofvgroups sql show t1.vgroups; -if $rows < 6 then +if $rows != 3 then return -1 endi sql show t1.stables; @@ -807,11 +810,11 @@ if $rows != 1 then return -1 endi sql show t1.tables; -if $rows < 6 then +if $rows != 3 then return -1 endi -sql alter topic t1 partitons 20 +sql alter topic t1 partitions 10 sql show topics; if $rows != 1 then return -1 @@ -827,12 +830,12 @@ if $data00 != t1 then return -1 endi #tables -if $data02 != 6 then +if $data02 != 10 then return -1 endi #numofvgroups sql show t1.vgroups; -if $rows < 6 then +if $rows != 10 then return -1 endi sql show t1.stables; @@ -840,10 +843,8 @@ if $rows != 1 then return -1 endi sql show t1.tables; -if $rows < 6 then +if $rows != 10 then return -1 endi - - system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/general/db/topic2.sim b/tests/script/general/db/topic2.sim index 21f3ada588..11b1b5256d 100644 --- a/tests/script/general/db/topic2.sim +++ b/tests/script/general/db/topic2.sim @@ -12,63 +12,57 @@ sql show t1.tables if $rows != 2 then return -1 endi -if $data00 != p1 then - return -1 -endi -if $data10 != p2 then - return -1 -endi sql show t1.vgroups if $rows != 2 then return -1 endi -sql insert into t1.p1 values(now, '1'); -sql insert into t1.p1 values(now, '2'); -sql insert into t1.p1 values(now, '3'); -sql insert into t1.p1 values(now, '4')(now, '5')(now, '6')(now, '7')(now, '8')(now, '9'); -sql insert into t1.p1 values(now, '14')(now, '15')(now, '16')(now, '17')(now, '18')(now, '19'); -sql insert into t1.p1 values(now, '24')(now, '25')(now, '16')(now, '17')(now, '18')(now, '19'); +sql insert into t1.p1 values(1, '1'); +sql insert into t1.p1 values(1, '2'); +sql insert into t1.p1 values(1, '3'); +sql insert into t1.p1 values(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '9'); +sql insert into t1.p1 values(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15'); +sql insert into t1.p1 values(1, '16')(2, '17')(3, '18')(4, '19')(5, '20')(6, '21')(7, '22')(8, '23')(9, '24')(10, '25')(11, '26')(12, '27')(13, '28')(14, '29')(15, '30')(16, '31')(17, '32')(18, '33'); -sql insert into t1.p2 values(now, '1'); -sql insert into t1.p2 values(now, '2'); -sql insert into t1.p2 values(now, '3'); -sql insert into t1.p2 values(now, '4')(now, '5')(now, '6')(now, '7')(now, '8')(now, '9'); -sql insert into t1.p2 values(now, '14')(now, '15')(now, '16')(now, '17')(now, '18')(now, '19'); -sql insert into t1.p2 values(now, '24')(now, '25')(now, '16')(now, '17')(now, '18')(now, '19'); +sql insert into t1.p2 values(1, '1'); +sql insert into t1.p2 values(1, '2'); +sql insert into t1.p2 values(1, '3'); +sql insert into t1.p2 values(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '9'); +sql insert into t1.p2 values(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15'); +sql insert into t1.p2 values(1, '16')(2, '17')(3, '18')(4, '19')(5, '20')(6, '21')(7, '22')(8, '23')(9, '24')(10, '25')(11, '26')(12, '27')(13, '28')(14, '29')(15, '30')(16, '31')(17, '32')(18, '33'); -sql_error insert into t1.p3 values(now, '1'); -sql_error insert into t1.p3 values(now, '2'); -sql_error insert into t1.p3 values(now, '3'); -sql_error insert into t1.p3 values(now, '4')(now, '5')(now, '6')(now, '7')(now, '8')(now, '9'); -sql_error insert into t1.p3 values(now, '14')(now, '15')(now, '16')(now, '17')(now, '18')(now, '19'); -sql_error insert into t1.p3 values(now, '24')(now, '25')(now, '16')(now, '17')(now, '18')(now, '19'); +sql_error insert into t1.p3 values(1, '1'); +sql_error insert into t1.p3 values(1, '2'); +sql_error insert into t1.p3 values(1, '3'); +sql_error insert into t1.p3 values(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '9'); +sql_error insert into t1.p3 values(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15'); +sql_error insert into t1.p3 values(1, '16')(2, '17')(3, '18')(4, '19')(5, '20')(6, '21')(7, '22')(8, '23')(9, '24')(10, '25')(11, '26')(12, '27')(13, '28')(14, '29')(15, '30')(16, '31')(17, '32')(18, '33'); -sql select * from t1.p1 order by off desc -if $rows != 21 then +sql select * from t1.p1 order by off asc +if $rows != 33 then return -1 endi -if $data00 != 1 then +if $data01 != 1 then return -1 endi -if $data10 != 2 then +if $data11 != 2 then return -1 endi -if $data10 != 3 then +if $data21 != 3 then return -1 endi -sql select * from t1.p2 order by off desc -if $rows != 21 then +sql select * from t1.p2 order by off asc +if $rows != 33 then return -1 endi -if $data00 != 1 then +if $data01 != 1 then return -1 endi -if $data10 != 2 then +if $data11 != 2 then return -1 endi -if $data10 != 3 then +if $data21 != 3 then return -1 endi @@ -78,111 +72,99 @@ sql show t1.tables if $rows != 4 then return -1 endi -if $data00 != p1 then - return -1 -endi -if $data10 != p2 then - return -1 -endi -if $data10 != p3 then - return -1 -endi -if $data10 != p4 then - return -1 -endi sql show t1.vgroups if $rows != 4 then return -1 endi -sql insert into t1.p1 values(now, '1'); -sql insert into t1.p1 values(now, '2'); -sql insert into t1.p1 values(now, '3'); -sql insert into t1.p1 values(now, '4')(now, '5')(now, '6')(now, '7')(now, '8')(now, '9'); -sql insert into t1.p1 values(now, '14')(now, '15')(now, '16')(now, '17')(now, '18')(now, '19'); -sql insert into t1.p1 values(now, '24')(now, '25')(now, '16')(now, '17')(now, '18')(now, '19'); +sql insert into t1.p1 values(1, '1'); +sql insert into t1.p1 values(1, '2'); +sql insert into t1.p1 values(1, '3'); +sql insert into t1.p1 values(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '9'); +sql insert into t1.p1 values(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15'); +sql insert into t1.p1 values(1, '16')(2, '17')(3, '18')(4, '19')(5, '20')(6, '21')(7, '22')(8, '23')(9, '24')(10, '25')(11, '26')(12, '27')(13, '28')(14, '29')(15, '30')(16, '31')(17, '32')(18, '33'); -sql insert into t1.p2 values(now, '1'); -sql insert into t1.p2 values(now, '2'); -sql insert into t1.p2 values(now, '3'); -sql insert into t1.p2 values(now, '4')(now, '5')(now, '6')(now, '7')(now, '8')(now, '9'); -sql insert into t1.p2 values(now, '14')(now, '15')(now, '16')(now, '17')(now, '18')(now, '19'); -sql insert into t1.p2 values(now, '24')(now, '25')(now, '16')(now, '17')(now, '18')(now, '19'); +sql insert into t1.p2 values(1, '1'); +sql insert into t1.p2 values(1, '2'); +sql insert into t1.p2 values(1, '3'); +sql insert into t1.p2 values(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '9'); +sql insert into t1.p2 values(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15'); +sql insert into t1.p2 values(1, '16')(2, '17')(3, '18')(4, '19')(5, '20')(6, '21')(7, '22')(8, '23')(9, '24')(10, '25')(11, '26')(12, '27')(13, '28')(14, '29')(15, '30')(16, '31')(17, '32')(18, '33'); -sql insert into t1.p3 values(now, '1'); -sql insert into t1.p3 values(now, '2'); -sql insert into t1.p3 values(now, '3'); -sql insert into t1.p3 values(now, '4')(now, '5')(now, '6')(now, '7')(now, '8')(now, '9'); -sql insert into t1.p3 values(now, '14')(now, '15')(now, '16')(now, '17')(now, '18')(now, '19'); -sql insert into t1.p3 values(now, '24')(now, '25')(now, '16')(now, '17')(now, '18')(now, '19'); +sql insert into t1.p3 values(1, '1'); +sql insert into t1.p3 values(1, '2'); +sql insert into t1.p3 values(1, '3'); +sql insert into t1.p3 values(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '9'); +sql insert into t1.p3 values(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15'); +sql insert into t1.p3 values(1, '16')(2, '17')(3, '18')(4, '19')(5, '20')(6, '21')(7, '22')(8, '23')(9, '24')(10, '25')(11, '26')(12, '27')(13, '28')(14, '29')(15, '30')(16, '31')(17, '32')(18, '33'); -sql insert into t1.p4 values(now, '1'); -sql insert into t1.p4 values(now, '2'); -sql insert into t1.p4 values(now, '3'); -sql insert into t1.p4 values(now, '4')(now, '5')(now, '6')(now, '7')(now, '8')(now, '9'); -sql insert into t1.p4 values(now, '14')(now, '15')(now, '16')(now, '17')(now, '18')(now, '19'); -sql insert into t1.p4 values(now, '24')(now, '25')(now, '16')(now, '17')(now, '18')(now, '19'); +sql insert into t1.p4 values(1, '1'); +sql insert into t1.p4 values(1, '2'); +sql insert into t1.p4 values(1, '3'); +sql insert into t1.p4 values(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '9'); +sql insert into t1.p4 values(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15'); +sql insert into t1.p4 values(1, '16')(2, '17')(3, '18')(4, '19')(5, '20')(6, '21')(7, '22')(8, '23')(9, '24')(10, '25')(11, '26')(12, '27')(13, '28')(14, '29')(15, '30')(16, '31')(17, '32')(18, '33'); -sql_error insert into t1.p5 values(now, '1'); -sql_error insert into t1.p5 values(now, '2'); -sql_error insert into t1.p5 values(now, '3'); -sql_error insert into t1.p5 values(now, '4')(now, '5')(now, '6')(now, '7')(now, '8')(now, '9'); -sql_error insert into t1.p5 values(now, '14')(now, '15')(now, '16')(now, '17')(now, '18')(now, '19'); -sql_error insert into t1.p5 values(now, '24')(now, '25')(now, '16')(now, '17')(now, '18')(now, '19'); +sql_error insert into t1.p5 values(1, '1'); +sql_error insert into t1.p5 values(1, '2'); +sql_error insert into t1.p5 values(1, '3'); +sql_error insert into t1.p5 values(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '9'); +sql_error insert into t1.p5 values(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15'); +sql_error insert into t1.p5 values(1, '16')(2, '17')(3, '18')(4, '19')(5, '20')(6, '21')(7, '22')(8, '23')(9, '24')(10, '25')(11, '26')(12, '27')(13, '28')(14, '29')(15, '30')(16, '31')(17, '32')(18, '33'); -sql select * from t1.p1 order by off desc -if $rows != 42 then +sql select * from t1.p1 order by off asc +if $rows != 66 then return -1 endi -if $data00 != 1 then +if $data01 != 1 then return -1 endi -if $data10 != 2 then +if $data11 != 2 then return -1 endi -if $data10 != 3 then +if $data21 != 3 then return -1 endi -sql select * from t1.p2 order by off desc -if $rows != 42 then +sql select * from t1.p2 order by off asc +if $rows != 66 then return -1 endi -if $data00 != 1 then +if $data01 != 1 then return -1 endi -if $data10 != 2 then +if $data11 != 2 then return -1 endi -if $data10 != 3 then +if $data21 != 3 then return -1 endi -sql select * from t1.p3 order by off desc -if $rows != 21 then +sql select * from t1.p3 order by off asc +if $rows != 33 then return -1 endi -if $data00 != 1 then +if $data01 != 1 then return -1 endi -if $data10 != 2 then +if $data11 != 2 then return -1 endi -if $data10 != 3 then +if $data21 != 3 then return -1 endi -sql select * from t1.p3 order by off desc -if $rows != 21 then +sql select * from t1.p4 order by off asc +if $rows != 33 then return -1 endi -if $data00 != 1 then +if $data01 != 1 then return -1 endi -if $data10 != 2 then +if $data11 != 2 then return -1 endi -if $data10 != 3 then +if $data21 != 3 then return -1 endi @@ -192,66 +174,63 @@ sql show t1.tables if $rows != 1 then return -1 endi -if $data00 != p1 then - return -1 -endi sql show t1.vgroups if $rows != 1 then return -1 endi -sql insert into t1.p1 values(now, '1'); -sql insert into t1.p1 values(now, '2'); -sql insert into t1.p1 values(now, '3'); -sql insert into t1.p1 values(now, '4')(now, '5')(now, '6')(now, '7')(now, '8')(now, '9'); -sql insert into t1.p1 values(now, '14')(now, '15')(now, '16')(now, '17')(now, '18')(now, '19'); -sql insert into t1.p1 values(now, '24')(now, '25')(now, '16')(now, '17')(now, '18')(now, '19'); +sql insert into t1.p1 values(1, '1'); +sql insert into t1.p1 values(1, '2'); +sql insert into t1.p1 values(1, '3'); +sql insert into t1.p1 values(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '9'); +sql insert into t1.p1 values(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15'); +sql insert into t1.p1 values(1, '16')(2, '17')(3, '18')(4, '19')(5, '20')(6, '21')(7, '22')(8, '23')(9, '24')(10, '25')(11, '26')(12, '27')(13, '28')(14, '29')(15, '30')(16, '31')(17, '32')(18, '33'); -sql_error insert into t1.p2 values(now, '1'); -sql_error insert into t1.p2 values(now, '2'); -sql_error insert into t1.p2 values(now, '3'); -sql_error insert into t1.p2 values(now, '4')(now, '5')(now, '6')(now, '7')(now, '8')(now, '9'); -sql_error insert into t1.p2 values(now, '14')(now, '15')(now, '16')(now, '17')(now, '18')(now, '19'); -sql_error insert into t1.p2 values(now, '24')(now, '25')(now, '16')(now, '17')(now, '18')(now, '19'); +sql_error insert into t1.p2 values(1, '1'); +sql_error insert into t1.p2 values(1, '2'); +sql_error insert into t1.p2 values(1, '3'); +sql_error insert into t1.p2 values(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '9'); +sql_error insert into t1.p2 values(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15'); +sql_error insert into t1.p2 values(1, '16')(2, '17')(3, '18')(4, '19')(5, '20')(6, '21')(7, '22')(8, '23')(9, '24')(10, '25')(11, '26')(12, '27')(13, '28')(14, '29')(15, '30')(16, '31')(17, '32')(18, '33'); -sql_error insert into t1.p3 values(now, '1'); -sql_error insert into t1.p3 values(now, '2'); -sql_error insert into t1.p3 values(now, '3'); -sql_error insert into t1.p3 values(now, '4')(now, '5')(now, '6')(now, '7')(now, '8')(now, '9'); -sql_error insert into t1.p3 values(now, '14')(now, '15')(now, '16')(now, '17')(now, '18')(now, '19'); -sql_error insert into t1.p3 values(now, '24')(now, '25')(now, '16')(now, '17')(now, '18')(now, '19'); +sql_error insert into t1.p3 values(1, '1'); +sql_error insert into t1.p3 values(1, '2'); +sql_error insert into t1.p3 values(1, '3'); +sql_error insert into t1.p3 values(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '9'); +sql_error insert into t1.p3 values(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15'); +sql_error insert into t1.p3 values(1, '16')(2, '17')(3, '18')(4, '19')(5, '20')(6, '21')(7, '22')(8, '23')(9, '24')(10, '25')(11, '26')(12, '27')(13, '28')(14, '29')(15, '30')(16, '31')(17, '32')(18, '33'); -sql_error insert into t1.p4 values(now, '1'); -sql_error insert into t1.p4 values(now, '2'); -sql_error insert into t1.p4 values(now, '3'); -sql_error insert into t1.p4 values(now, '4')(now, '5')(now, '6')(now, '7')(now, '8')(now, '9'); -sql_error insert into t1.p4 values(now, '14')(now, '15')(now, '16')(now, '17')(now, '18')(now, '19'); -sql_error insert into t1.p4 values(now, '24')(now, '25')(now, '16')(now, '17')(now, '18')(now, '19'); +sql_error insert into t1.p4 values(1, '1'); +sql_error insert into t1.p4 values(1, '2'); +sql_error insert into t1.p4 values(1, '3'); +sql_error insert into t1.p4 values(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '9'); +sql_error insert into t1.p4 values(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15'); +sql_error insert into t1.p4 values(1, '16')(2, '17')(3, '18')(4, '19')(5, '20')(6, '21')(7, '22')(8, '23')(9, '24')(10, '25')(11, '26')(12, '27')(13, '28')(14, '29')(15, '30')(16, '31')(17, '32')(18, '33'); -sql_error insert into t1.p5 values(now, '1'); -sql_error insert into t1.p5 values(now, '2'); -sql_error insert into t1.p5 values(now, '3'); -sql_error insert into t1.p5 values(now, '4')(now, '5')(now, '6')(now, '7')(now, '8')(now, '9'); -sql_error insert into t1.p5 values(now, '14')(now, '15')(now, '16')(now, '17')(now, '18')(now, '19'); -sql_error insert into t1.p5 values(now, '24')(now, '25')(now, '16')(now, '17')(now, '18')(now, '19'); +sql_error insert into t1.p5 values(1, '1'); +sql_error insert into t1.p5 values(1, '2'); +sql_error insert into t1.p5 values(1, '3'); +sql_error insert into t1.p5 values(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '9'); +sql_error insert into t1.p5 values(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15'); +sql_error insert into t1.p5 values(1, '16')(2, '17')(3, '18')(4, '19')(5, '20')(6, '21')(7, '22')(8, '23')(9, '24')(10, '25')(11, '26')(12, '27')(13, '28')(14, '29')(15, '30')(16, '31')(17, '32')(18, '33'); -sql select * from t1.p1 order by off desc -if $rows != 63 then +sql select * from t1.p1 order by off asc +if $rows != 99 then return -1 endi -if $data00 != 1 then +if $data01 != 1 then return -1 endi -if $data10 != 2 then +if $data11 != 2 then return -1 endi -if $data10 != 3 then +if $data21 != 3 then return -1 endi -sql_error select * from t1.p2 order by off desc -sql_error select * from t1.p3 order by off desc -sql_error select * from t1.p4 order by off desc +sql_error select * from t1.p2 order by off asc +sql_error select * from t1.p3 order by off asc +sql_error select * from t1.p4 order by off asc print ==== step4 sql alter topic t1 partitions 3; @@ -259,92 +238,83 @@ sql show t1.tables if $rows != 3 then return -1 endi -if $data00 != p1 then - return -1 -endi -if $data00 != p2 then - return -1 -endi -if $data00 != p3 then - return -1 -endi sql show t1.vgroups if $rows != 3 then return -1 endi -sql insert into t1.p1 values(now, '1'); -sql insert into t1.p1 values(now, '2'); -sql insert into t1.p1 values(now, '3'); -sql insert into t1.p1 values(now, '4')(now, '5')(now, '6')(now, '7')(now, '8')(now, '9'); -sql insert into t1.p1 values(now, '14')(now, '15')(now, '16')(now, '17')(now, '18')(now, '19'); -sql insert into t1.p1 values(now, '24')(now, '25')(now, '16')(now, '17')(now, '18')(now, '19'); +sql insert into t1.p1 values(1, '1'); +sql insert into t1.p1 values(1, '2'); +sql insert into t1.p1 values(1, '3'); +sql insert into t1.p1 values(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '9'); +sql insert into t1.p1 values(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15'); +sql insert into t1.p1 values(1, '16')(2, '17')(3, '18')(4, '19')(5, '20')(6, '21')(7, '22')(8, '23')(9, '24')(10, '25')(11, '26')(12, '27')(13, '28')(14, '29')(15, '30')(16, '31')(17, '32')(18, '33'); -sql insert into t1.p2 values(now, '1'); -sql insert into t1.p2 values(now, '2'); -sql insert into t1.p2 values(now, '3'); -sql insert into t1.p2 values(now, '4')(now, '5')(now, '6')(now, '7')(now, '8')(now, '9'); -sql insert into t1.p2 values(now, '14')(now, '15')(now, '16')(now, '17')(now, '18')(now, '19'); -sql insert into t1.p2 values(now, '24')(now, '25')(now, '16')(now, '17')(now, '18')(now, '19'); +sql insert into t1.p2 values(1, '1'); +sql insert into t1.p2 values(1, '2'); +sql insert into t1.p2 values(1, '3'); +sql insert into t1.p2 values(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '9'); +sql insert into t1.p2 values(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15'); +sql insert into t1.p2 values(1, '16')(2, '17')(3, '18')(4, '19')(5, '20')(6, '21')(7, '22')(8, '23')(9, '24')(10, '25')(11, '26')(12, '27')(13, '28')(14, '29')(15, '30')(16, '31')(17, '32')(18, '33'); -sql insert into t1.p3 values(now, '1'); -sql insert into t1.p3 values(now, '2'); -sql insert into t1.p3 values(now, '3'); -sql insert into t1.p3 values(now, '4')(now, '5')(now, '6')(now, '7')(now, '8')(now, '9'); -sql insert into t1.p3 values(now, '14')(now, '15')(now, '16')(now, '17')(now, '18')(now, '19'); -sql insert into t1.p3 values(now, '24')(now, '25')(now, '16')(now, '17')(now, '18')(now, '19'); +sql insert into t1.p3 values(1, '1'); +sql insert into t1.p3 values(1, '2'); +sql insert into t1.p3 values(1, '3'); +sql insert into t1.p3 values(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '9'); +sql insert into t1.p3 values(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15'); +sql insert into t1.p3 values(1, '16')(2, '17')(3, '18')(4, '19')(5, '20')(6, '21')(7, '22')(8, '23')(9, '24')(10, '25')(11, '26')(12, '27')(13, '28')(14, '29')(15, '30')(16, '31')(17, '32')(18, '33'); -sql insert into t1.p4 values(now, '1'); -sql insert into t1.p5 values(now, '1'); -sql insert into t1.p6 values(now, '1'); -sql_error select * from t1.p4 order by off desc -sql_error select * from t1.p5 order by off desc -sql_error select * from t1.p6 order by off desc +sql_error insert into t1.p4 values(1, '1'); +sql_error insert into t1.p5 values(1, '1'); +sql_error insert into t1.p6 values(1, '1'); +sql_error select * from t1.p4 order by off asc +sql_error select * from t1.p5 order by off asc +sql_error select * from t1.p6 order by off asc -sql select * from t1.p1 order by off desc -if $rows != 84 then +sql select * from t1.p1 order by off asc +if $rows != 132 then return -1 endi -if $data00 != 1 then +if $data01 != 1 then return -1 endi -if $data10 != 2 then +if $data11 != 2 then return -1 endi -if $data10 != 3 then +if $data21 != 3 then return -1 endi -sql select * from t1.p1 order by off desc -if $rows != 21 then +sql select * from t1.p2 order by off asc +if $rows != 33 then return -1 endi -if $data00 != 1 then +if $data01 != 1 then return -1 endi -if $data10 != 2 then +if $data11 != 2 then return -1 endi -if $data10 != 3 then +if $data21 != 3 then return -1 endi -sql select * from t1.p1 order by off desc -if $rows != 21 then +sql select * from t1.p3 order by off asc +if $rows != 33 then return -1 endi -if $data00 != 1 then +if $data01 != 1 then return -1 endi -if $data10 != 2 then +if $data11 != 2 then return -1 endi -if $data10 != 3 then +if $data21 != 3 then return -1 endi -sql select * from t1.ps order by off desc -if $rows != 126 then +sql select * from t1.ps order by off asc +if $rows != 198 then return -1 endi diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 4f42d043d9..fc56e34dca 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -68,6 +68,8 @@ cd ../../../debug; make ./test.sh -f general/db/repeat.sim ./test.sh -f general/db/tables.sim ./test.sh -f general/db/vnodes.sim +./test.sh -f general/db/topic1.sim +./test.sh -f general/db/topic2.sim ./test.sh -f general/db/nosuchfile.sim ./test.sh -f general/field/2.sim diff --git a/tests/script/jenkins/basic_7.txt b/tests/script/jenkins/basic_7.txt index 27d7d4ff97..d951e0a48d 100644 --- a/tests/script/jenkins/basic_7.txt +++ b/tests/script/jenkins/basic_7.txt @@ -38,6 +38,8 @@ ./test.sh -f general/db/repeat.sim ./test.sh -f general/db/tables.sim ./test.sh -f general/db/vnodes.sim +./test.sh -f general/db/topic1.sim +./test.sh -f general/db/topic2.sim ./test.sh -f general/table/autocreate.sim ./test.sh -f general/table/basic1.sim ./test.sh -f general/table/basic2.sim -- GitLab