提交 c92db0ae 编写于 作者: S Shengliang Guan

TD-3220

上级 521113ec
...@@ -365,7 +365,7 @@ if $data7_db != 20,20,30 then ...@@ -365,7 +365,7 @@ if $data7_db != 20,20,30 then
return -1 return -1
endi endi
sql_error alter database db keep 40 sql_error alter topic db keep 40
sql alter database db keep 40 sql alter database db keep 40
sql show databases sql show databases
print keep $data7_db print keep $data7_db
...@@ -596,6 +596,9 @@ endi ...@@ -596,6 +596,9 @@ endi
print ============== step db1 print ============== step db1
sql create database d1 sql create database d1
sql_error alter database d1 partitions 2
sql_error alter topic d1 partitions 2
sql show topics; sql show topics;
if $rows != 0 then if $rows != 0 then
return -1 return -1
...@@ -613,11 +616,11 @@ if $rows != 0 then ...@@ -613,11 +616,11 @@ if $rows != 0 then
endi endi
sql show databases; sql show databases;
if $rows != 0 then if $rows != 1 then
return -1 return -1
endi endi
sql drop database db sql drop database d1
sql show topics; sql show topics;
if $rows != 0 then if $rows != 0 then
return -1 return -1
...@@ -651,7 +654,7 @@ if $rows != 1 then ...@@ -651,7 +654,7 @@ if $rows != 1 then
return -1 return -1
endi endi
sql drop database db sql drop database d1
sql show topics; sql show topics;
if $rows != 0 then if $rows != 0 then
return -1 return -1
...@@ -685,7 +688,7 @@ if $rows != 1 then ...@@ -685,7 +688,7 @@ if $rows != 1 then
return -1 return -1
endi endi
sql drop database db sql drop database d1
sql show topics; sql show topics;
if $rows != 0 then if $rows != 0 then
return -1 return -1
...@@ -696,23 +699,23 @@ if $rows != 0 then ...@@ -696,23 +699,23 @@ if $rows != 0 then
return -1 return -1
endi endi
print ============== step partitons print ============== step partitions
sql create partiton t1 partitons 5 sql create topic t1 partitions 5
sql_error alter database t1 partitons -1 sql_error alter database t1 partitions -1
sql_error alter database t1 partitons 0 sql_error alter database t1 partitions 0
sql_error alter database t1 partitons 1 sql_error alter database t1 partitions 1
sql_error alter database t1 partitons 2 sql_error alter database t1 partitions 2
sql_error alter database t1 partitons 3 sql_error alter database t1 partitions 3
sql_error alter database t1 partitons 100 sql_error alter database t1 partitions 100
sql_error alter database t1 partitons 1000 sql_error alter database t1 partitions 1000
sql_error alter database t1 partitons 10000 sql_error alter database t1 partitions 10000
sql_error alter topic t1 partitons -1 sql_error alter topic t1 partitions -1
sql_error alter topic t1 partitons 0 sql_error alter topic t1 partitions 0
sql_error alter database t1 partitons 10000 sql_error alter database t1 partitions 10000
sql alter topic t1 partitons 1 sql alter topic t1 partitions 1
sql show topics; sql show topics;
if $rows != 1 then if $rows != 1 then
return -1 return -1
...@@ -728,12 +731,12 @@ if $data00 != t1 then ...@@ -728,12 +731,12 @@ if $data00 != t1 then
return -1 return -1
endi endi
#tables #tables
if $data02 != 6 then if $data02 != 1 then
return -1 return -1
endi endi
#numofvgroups #numofvgroups
sql show t1.vgroups; sql show t1.vgroups;
if $rows < 6 then if $rows != 1 then
return -1 return -1
endi endi
sql show t1.stables; sql show t1.stables;
...@@ -741,11 +744,11 @@ if $rows != 1 then ...@@ -741,11 +744,11 @@ if $rows != 1 then
return -1 return -1
endi endi
sql show t1.tables; sql show t1.tables;
if $rows < 6 then if $rows != 1 then
return -1 return -1
endi endi
sql alter topic t1 partitons 2 sql alter topic t1 partitions 2
sql show topics; sql show topics;
if $rows != 1 then if $rows != 1 then
return -1 return -1
...@@ -761,12 +764,12 @@ if $data00 != t1 then ...@@ -761,12 +764,12 @@ if $data00 != t1 then
return -1 return -1
endi endi
#tables #tables
if $data02 != 6 then if $data02 != 2 then
return -1 return -1
endi endi
#numofvgroups #numofvgroups
sql show t1.vgroups; sql show t1.vgroups;
if $rows < 6 then if $rows != 2 then
return -1 return -1
endi endi
sql show t1.stables; sql show t1.stables;
...@@ -774,11 +777,11 @@ if $rows != 1 then ...@@ -774,11 +777,11 @@ if $rows != 1 then
return -1 return -1
endi endi
sql show t1.tables; sql show t1.tables;
if $rows < 6 then if $rows != 2 then
return -1 return -1
endi endi
sql alter topic t1 partitons 3 sql alter topic t1 partitions 3
sql show topics; sql show topics;
if $rows != 1 then if $rows != 1 then
return -1 return -1
...@@ -794,12 +797,12 @@ if $data00 != t1 then ...@@ -794,12 +797,12 @@ if $data00 != t1 then
return -1 return -1
endi endi
#tables #tables
if $data02 != 6 then if $data02 != 3 then
return -1 return -1
endi endi
#numofvgroups #numofvgroups
sql show t1.vgroups; sql show t1.vgroups;
if $rows < 6 then if $rows != 3 then
return -1 return -1
endi endi
sql show t1.stables; sql show t1.stables;
...@@ -807,11 +810,11 @@ if $rows != 1 then ...@@ -807,11 +810,11 @@ if $rows != 1 then
return -1 return -1
endi endi
sql show t1.tables; sql show t1.tables;
if $rows < 6 then if $rows != 3 then
return -1 return -1
endi endi
sql alter topic t1 partitons 20 sql alter topic t1 partitions 10
sql show topics; sql show topics;
if $rows != 1 then if $rows != 1 then
return -1 return -1
...@@ -827,12 +830,12 @@ if $data00 != t1 then ...@@ -827,12 +830,12 @@ if $data00 != t1 then
return -1 return -1
endi endi
#tables #tables
if $data02 != 6 then if $data02 != 10 then
return -1 return -1
endi endi
#numofvgroups #numofvgroups
sql show t1.vgroups; sql show t1.vgroups;
if $rows < 6 then if $rows != 10 then
return -1 return -1
endi endi
sql show t1.stables; sql show t1.stables;
...@@ -840,10 +843,8 @@ if $rows != 1 then ...@@ -840,10 +843,8 @@ if $rows != 1 then
return -1 return -1
endi endi
sql show t1.tables; sql show t1.tables;
if $rows < 6 then if $rows != 10 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT
...@@ -12,63 +12,57 @@ sql show t1.tables ...@@ -12,63 +12,57 @@ sql show t1.tables
if $rows != 2 then if $rows != 2 then
return -1 return -1
endi endi
if $data00 != p1 then
return -1
endi
if $data10 != p2 then
return -1
endi
sql show t1.vgroups sql show t1.vgroups
if $rows != 2 then if $rows != 2 then
return -1 return -1
endi endi
sql insert into t1.p1 values(now, '1'); sql insert into t1.p1 values(1, '1');
sql insert into t1.p1 values(now, '2'); sql insert into t1.p1 values(1, '2');
sql insert into t1.p1 values(now, '3'); sql insert into t1.p1 values(1, '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(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '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(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15');
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, '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(1, '1');
sql insert into t1.p2 values(now, '2'); sql insert into t1.p2 values(1, '2');
sql insert into t1.p2 values(now, '3'); sql insert into t1.p2 values(1, '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(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '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(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15');
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, '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(1, '1');
sql_error insert into t1.p3 values(now, '2'); sql_error insert into t1.p3 values(1, '2');
sql_error insert into t1.p3 values(now, '3'); sql_error insert into t1.p3 values(1, '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(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '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(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15');
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, '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 sql select * from t1.p1 order by off asc
if $rows != 21 then if $rows != 33 then
return -1 return -1
endi endi
if $data00 != 1 then if $data01 != 1 then
return -1 return -1
endi endi
if $data10 != 2 then if $data11 != 2 then
return -1 return -1
endi endi
if $data10 != 3 then if $data21 != 3 then
return -1 return -1
endi endi
sql select * from t1.p2 order by off desc sql select * from t1.p2 order by off asc
if $rows != 21 then if $rows != 33 then
return -1 return -1
endi endi
if $data00 != 1 then if $data01 != 1 then
return -1 return -1
endi endi
if $data10 != 2 then if $data11 != 2 then
return -1 return -1
endi endi
if $data10 != 3 then if $data21 != 3 then
return -1 return -1
endi endi
...@@ -78,111 +72,99 @@ sql show t1.tables ...@@ -78,111 +72,99 @@ sql show t1.tables
if $rows != 4 then if $rows != 4 then
return -1 return -1
endi 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 sql show t1.vgroups
if $rows != 4 then if $rows != 4 then
return -1 return -1
endi endi
sql insert into t1.p1 values(now, '1'); sql insert into t1.p1 values(1, '1');
sql insert into t1.p1 values(now, '2'); sql insert into t1.p1 values(1, '2');
sql insert into t1.p1 values(now, '3'); sql insert into t1.p1 values(1, '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(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '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(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15');
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, '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(1, '1');
sql insert into t1.p2 values(now, '2'); sql insert into t1.p2 values(1, '2');
sql insert into t1.p2 values(now, '3'); sql insert into t1.p2 values(1, '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(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '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(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15');
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, '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(1, '1');
sql insert into t1.p3 values(now, '2'); sql insert into t1.p3 values(1, '2');
sql insert into t1.p3 values(now, '3'); sql insert into t1.p3 values(1, '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(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '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(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15');
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, '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(1, '1');
sql insert into t1.p4 values(now, '2'); sql insert into t1.p4 values(1, '2');
sql insert into t1.p4 values(now, '3'); sql insert into t1.p4 values(1, '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(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '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(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15');
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, '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(1, '1');
sql_error insert into t1.p5 values(now, '2'); sql_error insert into t1.p5 values(1, '2');
sql_error insert into t1.p5 values(now, '3'); sql_error insert into t1.p5 values(1, '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(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '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(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15');
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, '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 sql select * from t1.p1 order by off asc
if $rows != 42 then if $rows != 66 then
return -1 return -1
endi endi
if $data00 != 1 then if $data01 != 1 then
return -1 return -1
endi endi
if $data10 != 2 then if $data11 != 2 then
return -1 return -1
endi endi
if $data10 != 3 then if $data21 != 3 then
return -1 return -1
endi endi
sql select * from t1.p2 order by off desc sql select * from t1.p2 order by off asc
if $rows != 42 then if $rows != 66 then
return -1 return -1
endi endi
if $data00 != 1 then if $data01 != 1 then
return -1 return -1
endi endi
if $data10 != 2 then if $data11 != 2 then
return -1 return -1
endi endi
if $data10 != 3 then if $data21 != 3 then
return -1 return -1
endi endi
sql select * from t1.p3 order by off desc sql select * from t1.p3 order by off asc
if $rows != 21 then if $rows != 33 then
return -1 return -1
endi endi
if $data00 != 1 then if $data01 != 1 then
return -1 return -1
endi endi
if $data10 != 2 then if $data11 != 2 then
return -1 return -1
endi endi
if $data10 != 3 then if $data21 != 3 then
return -1 return -1
endi endi
sql select * from t1.p3 order by off desc sql select * from t1.p4 order by off asc
if $rows != 21 then if $rows != 33 then
return -1 return -1
endi endi
if $data00 != 1 then if $data01 != 1 then
return -1 return -1
endi endi
if $data10 != 2 then if $data11 != 2 then
return -1 return -1
endi endi
if $data10 != 3 then if $data21 != 3 then
return -1 return -1
endi endi
...@@ -192,66 +174,63 @@ sql show t1.tables ...@@ -192,66 +174,63 @@ sql show t1.tables
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
if $data00 != p1 then
return -1
endi
sql show t1.vgroups sql show t1.vgroups
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql insert into t1.p1 values(now, '1'); sql insert into t1.p1 values(1, '1');
sql insert into t1.p1 values(now, '2'); sql insert into t1.p1 values(1, '2');
sql insert into t1.p1 values(now, '3'); sql insert into t1.p1 values(1, '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(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '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(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15');
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, '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(1, '1');
sql_error insert into t1.p2 values(now, '2'); sql_error insert into t1.p2 values(1, '2');
sql_error insert into t1.p2 values(now, '3'); sql_error insert into t1.p2 values(1, '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(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '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(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15');
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, '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(1, '1');
sql_error insert into t1.p3 values(now, '2'); sql_error insert into t1.p3 values(1, '2');
sql_error insert into t1.p3 values(now, '3'); sql_error insert into t1.p3 values(1, '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(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '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(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15');
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, '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(1, '1');
sql_error insert into t1.p4 values(now, '2'); sql_error insert into t1.p4 values(1, '2');
sql_error insert into t1.p4 values(now, '3'); sql_error insert into t1.p4 values(1, '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(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '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(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15');
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, '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(1, '1');
sql_error insert into t1.p5 values(now, '2'); sql_error insert into t1.p5 values(1, '2');
sql_error insert into t1.p5 values(now, '3'); sql_error insert into t1.p5 values(1, '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(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '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(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15');
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, '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 sql select * from t1.p1 order by off asc
if $rows != 63 then if $rows != 99 then
return -1 return -1
endi endi
if $data00 != 1 then if $data01 != 1 then
return -1 return -1
endi endi
if $data10 != 2 then if $data11 != 2 then
return -1 return -1
endi endi
if $data10 != 3 then if $data21 != 3 then
return -1 return -1
endi endi
sql_error select * from t1.p2 order by off desc sql_error select * from t1.p2 order by off asc
sql_error select * from t1.p3 order by off desc sql_error select * from t1.p3 order by off asc
sql_error select * from t1.p4 order by off desc sql_error select * from t1.p4 order by off asc
print ==== step4 print ==== step4
sql alter topic t1 partitions 3; sql alter topic t1 partitions 3;
...@@ -259,92 +238,83 @@ sql show t1.tables ...@@ -259,92 +238,83 @@ sql show t1.tables
if $rows != 3 then if $rows != 3 then
return -1 return -1
endi 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 sql show t1.vgroups
if $rows != 3 then if $rows != 3 then
return -1 return -1
endi endi
sql insert into t1.p1 values(now, '1'); sql insert into t1.p1 values(1, '1');
sql insert into t1.p1 values(now, '2'); sql insert into t1.p1 values(1, '2');
sql insert into t1.p1 values(now, '3'); sql insert into t1.p1 values(1, '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(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '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(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15');
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, '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(1, '1');
sql insert into t1.p2 values(now, '2'); sql insert into t1.p2 values(1, '2');
sql insert into t1.p2 values(now, '3'); sql insert into t1.p2 values(1, '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(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '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(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15');
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, '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(1, '1');
sql insert into t1.p3 values(now, '2'); sql insert into t1.p3 values(1, '2');
sql insert into t1.p3 values(now, '3'); sql insert into t1.p3 values(1, '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(1, '4')(2, '5')(3, '6')(4, '7')(5, '8')(6, '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(1, '10')(2, '11')(3, '12')(4, '13')(5, '14')(6, '15');
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, '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_error insert into t1.p4 values(1, '1');
sql insert into t1.p5 values(now, '1'); sql_error insert into t1.p5 values(1, '1');
sql insert into t1.p6 values(now, '1'); sql_error insert into t1.p6 values(1, '1');
sql_error select * from t1.p4 order by off desc sql_error select * from t1.p4 order by off asc
sql_error select * from t1.p5 order by off desc sql_error select * from t1.p5 order by off asc
sql_error select * from t1.p6 order by off desc sql_error select * from t1.p6 order by off asc
sql select * from t1.p1 order by off desc sql select * from t1.p1 order by off asc
if $rows != 84 then if $rows != 132 then
return -1 return -1
endi endi
if $data00 != 1 then if $data01 != 1 then
return -1 return -1
endi endi
if $data10 != 2 then if $data11 != 2 then
return -1 return -1
endi endi
if $data10 != 3 then if $data21 != 3 then
return -1 return -1
endi endi
sql select * from t1.p1 order by off desc sql select * from t1.p2 order by off asc
if $rows != 21 then if $rows != 33 then
return -1 return -1
endi endi
if $data00 != 1 then if $data01 != 1 then
return -1 return -1
endi endi
if $data10 != 2 then if $data11 != 2 then
return -1 return -1
endi endi
if $data10 != 3 then if $data21 != 3 then
return -1 return -1
endi endi
sql select * from t1.p1 order by off desc sql select * from t1.p3 order by off asc
if $rows != 21 then if $rows != 33 then
return -1 return -1
endi endi
if $data00 != 1 then if $data01 != 1 then
return -1 return -1
endi endi
if $data10 != 2 then if $data11 != 2 then
return -1 return -1
endi endi
if $data10 != 3 then if $data21 != 3 then
return -1 return -1
endi endi
sql select * from t1.ps order by off desc sql select * from t1.ps order by off asc
if $rows != 126 then if $rows != 198 then
return -1 return -1
endi endi
......
...@@ -68,6 +68,8 @@ cd ../../../debug; make ...@@ -68,6 +68,8 @@ cd ../../../debug; make
./test.sh -f general/db/repeat.sim ./test.sh -f general/db/repeat.sim
./test.sh -f general/db/tables.sim ./test.sh -f general/db/tables.sim
./test.sh -f general/db/vnodes.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/db/nosuchfile.sim
./test.sh -f general/field/2.sim ./test.sh -f general/field/2.sim
......
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
./test.sh -f general/db/repeat.sim ./test.sh -f general/db/repeat.sim
./test.sh -f general/db/tables.sim ./test.sh -f general/db/tables.sim
./test.sh -f general/db/vnodes.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/autocreate.sim
./test.sh -f general/table/basic1.sim ./test.sh -f general/table/basic1.sim
./test.sh -f general/table/basic2.sim ./test.sh -f general/table/basic2.sim
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册