improve case stability
This commit is contained in:
39
tools/deploy/mysql_test/include/minor_merge_tenant.inc
Normal file
39
tools/deploy/mysql_test/include/minor_merge_tenant.inc
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
alter system minor freeze;
|
||||||
|
--disable_query_log
|
||||||
|
--disable_result_log
|
||||||
|
|
||||||
|
let $__i__=180;
|
||||||
|
let $__j__ = 10;
|
||||||
|
while($__i__ > 0)
|
||||||
|
{
|
||||||
|
sleep 1;
|
||||||
|
dec $__i__;
|
||||||
|
dec $__j__;
|
||||||
|
|
||||||
|
if ($TENANT == 'mysql') {
|
||||||
|
let $__memstore_cnt__ = query_get_value(select count(*) as cnt from oceanbase.__all_virtual_memstore_info where tablet_id >= 200000, cnt, 1);
|
||||||
|
}
|
||||||
|
if ($TENANT == 'oracle') {
|
||||||
|
select count(*) into @cnt from SYS.gv$ob_memstore_info where tablet_id >= 200000;
|
||||||
|
let $__memstore_cnt__ = query_get_value(select @cnt as RES from dual, RES, 1);
|
||||||
|
# --echo $__memstore_cnt__
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($__memstore_cnt__ == 0)
|
||||||
|
{
|
||||||
|
let $__i__ = -5;
|
||||||
|
}
|
||||||
|
if ($__j__ == 0)
|
||||||
|
{
|
||||||
|
alter system minor freeze;
|
||||||
|
let $__j__ = 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($__i__ != -5)
|
||||||
|
{
|
||||||
|
--echo minor freeze failed
|
||||||
|
}
|
||||||
|
|
||||||
|
--enable_query_log
|
||||||
|
--enable_result_log
|
||||||
@ -1,5 +0,0 @@
|
|||||||
connect (obsys,$OBMYSQL_MS0,admin,$OBMYSQL_PWD,test,$OBMYSQL_PORT);
|
|
||||||
connection obsys;
|
|
||||||
alter system minor freeze tenant = all;
|
|
||||||
disconnect obsys;
|
|
||||||
connection default;
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
# set __table_id__ outside
|
|
||||||
|
|
||||||
--disable_query_log
|
|
||||||
--disable_result_log
|
|
||||||
|
|
||||||
connect (obsys_minor,$OBMYSQL_MS0,admin,$OBMYSQL_PWD,test,$OBMYSQL_PORT);
|
|
||||||
connection obsys_minor;
|
|
||||||
|
|
||||||
|
|
||||||
let $__i__=180;
|
|
||||||
while($__i__ > 0)
|
|
||||||
{
|
|
||||||
sleep 1;
|
|
||||||
dec $__i__;
|
|
||||||
let $__memstore_cnt__ = query_get_value(select count(*) as cnt from oceanbase.__all_virtual_memstore_info where is_active='NO', cnt, 1);
|
|
||||||
if ($__memstore_cnt__ == 0)
|
|
||||||
{
|
|
||||||
let $__i__ = -5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($__i__ != -5)
|
|
||||||
{
|
|
||||||
--echo minor freeze failed
|
|
||||||
}
|
|
||||||
disconnect obsys_minor;
|
|
||||||
connection default;
|
|
||||||
|
|
||||||
--enable_query_log
|
|
||||||
--enable_result_log
|
|
||||||
@ -8,7 +8,7 @@ delete from aa;
|
|||||||
insert into aa(a2, a3) values (10, 15), (10, 14), (10, 12), (11, 13), (12, 12), (12, 10);
|
insert into aa(a2, a3) values (10, 15), (10, 14), (10, 12), (11, 13), (12, 12), (12, 10);
|
||||||
delete from bb;
|
delete from bb;
|
||||||
insert into bb(b2, b3) values (10, 14), (11, 14), (11, 13), (12, 11), (12, 10);
|
insert into bb(b2, b3) values (10, 14), (11, 14), (11, 13), (12, 11), (12, 10);
|
||||||
alter system minor freeze tenant = all;
|
alter system minor freeze;
|
||||||
select /*+ use_merge(aa, bb) */ a2, b3 from aa, bb where a2 = b2 and a3 = b3 order by a2, a3;
|
select /*+ use_merge(aa, bb) */ a2, b3 from aa, bb where a2 = b2 and a3 = b3 order by a2, a3;
|
||||||
a2 b3
|
a2 b3
|
||||||
10 14
|
10 14
|
||||||
|
|||||||
@ -21,9 +21,7 @@ delete from aa;
|
|||||||
insert into aa(a2, a3) values (10, 15), (10, 14), (10, 12), (11, 13), (12, 12), (12, 10);
|
insert into aa(a2, a3) values (10, 15), (10, 14), (10, 12), (11, 13), (12, 12), (12, 10);
|
||||||
delete from bb;
|
delete from bb;
|
||||||
insert into bb(b2, b3) values (10, 14), (11, 14), (11, 13), (12, 11), (12, 10);
|
insert into bb(b2, b3) values (10, 14), (11, 14), (11, 13), (12, 11), (12, 10);
|
||||||
--source mysql_test/include/minorfreeze.inc
|
--source mysql_test/include/minor_merge_tenant.inc
|
||||||
--real_sleep 10
|
|
||||||
--source mysql_test/include/wait_minor_merge.inc
|
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
call dbms_stats.gather_table_stats('test','aa', method_opt=>'FOR ALL COLUMNS SIZE AUTO');
|
call dbms_stats.gather_table_stats('test','aa', method_opt=>'FOR ALL COLUMNS SIZE AUTO');
|
||||||
call dbms_stats.gather_table_stats('test','bb', method_opt=>'FOR ALL COLUMNS SIZE AUTO');
|
call dbms_stats.gather_table_stats('test','bb', method_opt=>'FOR ALL COLUMNS SIZE AUTO');
|
||||||
|
|||||||
@ -53,8 +53,7 @@ explain select /*+index(test_table index_1)*/ * from test_table where age = 22;
|
|||||||
select count(*) from test_table where name = 'name22';
|
select count(*) from test_table where name = 'name22';
|
||||||
explain select /*+index(test_table index_2)*/ * from test_table where name = 'name22';
|
explain select /*+index(test_table index_2)*/ * from test_table where name = 'name22';
|
||||||
|
|
||||||
--source mysql_test/include/minorfreeze.inc
|
--source mysql_test/include/minor_merge_tenant.inc
|
||||||
--source mysql_test/include/wait_minor_merge.inc
|
|
||||||
call dbms_stats.gather_table_stats('TEST', 'test_table');
|
call dbms_stats.gather_table_stats('TEST', 'test_table');
|
||||||
|
|
||||||
# case 2: all data in sstable, not memtable data
|
# case 2: all data in sstable, not memtable data
|
||||||
|
|||||||
Reference in New Issue
Block a user