patch 4.0
This commit is contained in:
@ -1,25 +0,0 @@
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
connection default;
|
||||
let $tenant_id = query_get_value(select effective_tenant_id() as ID from dual, ID, 1);
|
||||
connect (obsys_ydm,$OBMYSQL_MS0,admin,$OBMYSQL_PWD,test,$OBMYSQL_PORT);
|
||||
connection obsys_ydm;
|
||||
let $__i__= 100;
|
||||
while($__i__ > 0)
|
||||
{
|
||||
sleep 1;
|
||||
dec $__i__;
|
||||
|
||||
## 检查有没有分区的列级统计信息还没有汇报上来
|
||||
let $__num__ = query_get_value(select count(*) as num from oceanbase.__all_virtual_meta_table a where a.tenant_id = $tenant_id and not exists (select 1 from oceanbase.__all_virtual_column_statistic b where a.table_id = b.table_id and a.partition_id = b.partition_id and b.tenant_id = $tenant_id), num, 1);
|
||||
if($__num__ == 0)
|
||||
{
|
||||
let $__i__ = -5;
|
||||
}
|
||||
}
|
||||
|
||||
connection default;
|
||||
disconnect obsys_ydm;
|
||||
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
@ -1,24 +0,0 @@
|
||||
|
||||
let $server_cnt = query_get_value(select count(*) as cnt from oceanbase.__all_server, cnt, 1);
|
||||
|
||||
let $schema_version = query_get_value(select max(schema_version) as max_schema_version from oceanbase.__all_tenant_history, max_schema_version, 1);
|
||||
|
||||
let $sync_cnt = 0;
|
||||
|
||||
let $i = 10;
|
||||
while($i > 0)
|
||||
{
|
||||
sleep 1;
|
||||
dec $i;
|
||||
let $sync_cnt = query_get_value(select count(*) as cnt from oceanbase.__all_virtual_server_schema_info where refreshed_schema_version >= $schema_version and tenant_id = 1, cnt, 1);
|
||||
if ($sync_cnt == $server_cnt)
|
||||
{
|
||||
let $i = -4;
|
||||
}
|
||||
}
|
||||
|
||||
if ($i != -4)
|
||||
{
|
||||
--echo check tenant sync timeout, sync_cnt:$sync_cnt, server_cnt:$server_cnt
|
||||
eval select * from oceanbase.__all_virtual_server_schema_info where refreshed_schema_version >= $schema_version and tenant_id = 1;
|
||||
}
|
||||
10
tools/deploy/mysql_test/include/explain_end.inc
Normal file
10
tools/deploy/mysql_test/include/explain_end.inc
Normal file
@ -0,0 +1,10 @@
|
||||
connect (obsys_explain,$OBMYSQL_MS0,admin,$OBMYSQL_PWD,test,$OBMYSQL_PORT);
|
||||
connection obsys_explain;
|
||||
--disable_query_log
|
||||
alter system set_tp tp_no = 509, error_code = 0, frequency = 1;
|
||||
alter system set_tp tp_no = 368, error_code = 0, frequency = 1;
|
||||
alter system set_tp tp_no = 918, error_code = 0, frequency = 1;
|
||||
--enable_query_log
|
||||
disconnect obsys_explain;
|
||||
connection default;
|
||||
sleep 6;
|
||||
9
tools/deploy/mysql_test/include/explain_init.inc
Normal file
9
tools/deploy/mysql_test/include/explain_init.inc
Normal file
@ -0,0 +1,9 @@
|
||||
connect (obsys_explain,$OBMYSQL_MS0,admin,$OBMYSQL_PWD,test,$OBMYSQL_PORT);
|
||||
connection obsys_explain;
|
||||
--disable_query_log
|
||||
alter system set_tp tp_no = 509, error_code = 4016, frequency = 1;
|
||||
alter system set_tp tp_no = 368, error_code = 4016, frequency = 1;
|
||||
alter system set_tp tp_no = 918, error_code = 4016, frequency = 1;
|
||||
--enable_query_log
|
||||
disconnect obsys_explain;
|
||||
connection default;
|
||||
@ -1,32 +0,0 @@
|
||||
## 功能: 获取指定租户的ip&port
|
||||
# 1.最好使用前sleep下,否则tenant_schema有可能还未刷到server上导致连接不上
|
||||
# 2.如果分布于多个server,取unit_id最小的
|
||||
## 用法:
|
||||
# 1.设置待连接的tenant_name
|
||||
# 2.source本文件
|
||||
# 3.connect
|
||||
## 模板:
|
||||
# sleep 3;
|
||||
# let $__tenant_name__ = 'tt1';
|
||||
# --source mysql_test/include/get_tenant_server.inc
|
||||
# connect (conn1,$TE_SERVER_IP,root@tt1,,*NO-ONE*,$TE_SERVER_PORT);
|
||||
|
||||
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
connect (obsys,$OBMYSQL_MS0,admin,$OBMYSQL_PWD,test,$OBMYSQL_PORT);
|
||||
connection obsys;
|
||||
let $__tenant_id__ = `select tenant_id from oceanbase.__all_tenant where tenant_name = $__tenant_name__ limit 1`;
|
||||
let $__resource_pool_id__ = `select resource_pool_id from oceanbase.__all_resource_pool where tenant_id = $__tenant_id__ limit 1`;
|
||||
|
||||
let $__svr_ip__ = `select svr_ip from oceanbase.__all_unit where resource_pool_id = $__resource_pool_id__ limit 1`;
|
||||
let $__svr_port__ = `select svr_port from oceanbase.__all_unit where resource_pool_id = $__resource_pool_id__ limit 1`;
|
||||
|
||||
let $__inner_port__ = `select inner_port from oceanbase.__all_server where svr_ip = '$__svr_ip__' and svr_port = $__svr_port__ limit 1`;
|
||||
|
||||
let $TE_SERVER_IP = $__svr_ip__;
|
||||
let $TE_SERVER_PORT = $__inner_port__;
|
||||
disconnect obsys;
|
||||
connection default;
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
@ -1,6 +1,6 @@
|
||||
connect (obsys_idm,$OBMYSQL_MS0,admin,$OBMYSQL_PWD,test,$OBMYSQL_PORT);
|
||||
connection obsys_idm;
|
||||
set ob_enable_index_direct_select=1;
|
||||
alter system set merger_check_interval = '10s';
|
||||
alter system set merger_check_interval = '10s' tenant all;
|
||||
disconnect obsys_idm;
|
||||
connection default;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
connect (obsys,$OBMYSQL_MS0,admin,$OBMYSQL_PWD,test,$OBMYSQL_PORT);
|
||||
connection obsys;
|
||||
alter system major freeze;
|
||||
alter system minor freeze tenant = all;
|
||||
disconnect obsys;
|
||||
connection default;
|
||||
@ -1 +1 @@
|
||||
--replace_regex /REPLICA_NUM = [0-9]*/REPLICA_NUM = NUM/g /ROW_FORMAT = (DYNAMIC|COMPRESSED|COMPACT|REDUNDANT|CONDENSED)[ ]*//g /(NOCOMPRESS|COMPRESS) (FOR)*[ ]*(BASIC|OLTP|QUERY|ARCHIVE)*[ ]*//g /zstd_1\.3\.8/lz4_1.0/g /OBFK_[0-9]*/OBFK_1234/g /OBIDX_[0-9]*/OBIDX_1234/g /OBCHECK_[0-9]*/OBCHECK_1234/g /OBPK_[0-9]*/OBPK_1234/g /OBUNIQUE_[0-9]*/OBUNIQUE_1234/g /zone1;zone2/zone1/g /BLOCK_SIZE = [0-9]*/BLOCK_SIZE = SIZE/g /TABLET_SIZE = [0-9]*/TABLET_SIZE = SIZE/g /ZONE_LIST = \(.*\)/ZONE_LIST = (test)/g /PRIMARY_ZONE = .*/PRIMARY_ZONE = /g /PCTFREE = [0-9]*/PCTFREE = 10/g
|
||||
--replace_regex /REPLICA_NUM = [0-9]*/REPLICA_NUM = NUM/g /ROW_FORMAT = (DYNAMIC|COMPRESSED|COMPACT|REDUNDANT|CONDENSED)[ ]*//g /(NOCOMPRESS|COMPRESS) (FOR)*[ ]*(BASIC|OLTP|QUERY|ARCHIVE)*[ ]*//g /zstd_1\.3\.8/lz4_1.0/g /OBFK_[0-9]*/OBFK_1234/g /OBIDX_[0-9]*/OBIDX_1234/g /OBCHECK_[0-9]*/OBCHECK_1234/g /OBNOTNULL_[0-9]*/OBNOTNULL_1234/g /OBPK_[0-9]*/OBPK_1234/g /OBUNIQUE_[0-9]*/OBUNIQUE_1234/g /zone1;zone2/zone1/g /BLOCK_SIZE = [0-9]*/BLOCK_SIZE = SIZE/g /TABLET_SIZE = [0-9]*/TABLET_SIZE = SIZE/g /ZONE_LIST = \(.*\)/ZONE_LIST = (test)/g /PRIMARY_ZONE = .*/PRIMARY_ZONE = /g /PCTFREE = [0-9]*/PCTFREE = 10/g
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
#--disable_query_log
|
||||
#--disable_result_log
|
||||
connect (obsys_ydm,$OBMYSQL_MS0,admin,$OBMYSQL_PWD,test,$OBMYSQL_PORT);
|
||||
connection obsys_ydm;
|
||||
let $__i__= 600;
|
||||
while($__i__ > 0)
|
||||
{
|
||||
sleep 1;
|
||||
dec $__i__;
|
||||
let $__forzen_version__ = query_get_value(select value from oceanbase.__all_zone where name = 'frozen_version', value, 1);
|
||||
let $__merged_version__ = query_get_value(select value from oceanbase.__all_zone where name = 'last_merged_version' and zone = '', value, 1);
|
||||
if($__forzen_version__ == $__merged_version__)
|
||||
{
|
||||
let $__i__ = -5;
|
||||
}
|
||||
}
|
||||
|
||||
###判断集群状态,先注释掉
|
||||
#let $__j__= 180;
|
||||
#while($__j__ > 0)
|
||||
#{
|
||||
# sleep 1;
|
||||
# dec $__j__;
|
||||
# let $__global_stat__ = query_get_value(select comment from oceanbase.__all_cluster_stat where name='global_stat',comment, 1);
|
||||
# if($__global_stat__ == NORMAL)
|
||||
# {
|
||||
# let $__j__ = -5;
|
||||
# }
|
||||
#}
|
||||
|
||||
#if($__j__ != -5)
|
||||
#{
|
||||
# --echo major freeze failed
|
||||
#}
|
||||
|
||||
if($__i__ != -5)
|
||||
{
|
||||
--echo major freeze failed
|
||||
}
|
||||
sleep 2;
|
||||
|
||||
disconnect obsys_ydm;
|
||||
connection default;
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
30
tools/deploy/mysql_test/include/wait_minor_merge.inc
Normal file
30
tools/deploy/mysql_test/include/wait_minor_merge.inc
Normal file
@ -0,0 +1,30 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user