fix handling invalid character in identifier

This commit is contained in:
wjhh2008
2023-09-22 03:10:14 +00:00
committed by ob-robot
parent e4e09ecfb6
commit c13243ff23
54 changed files with 229 additions and 146 deletions

View File

@ -276,20 +276,26 @@ begin
end /
-- create_tenant_by_memory_limit: 根据memory_limit创建租户
drop procedure if exists create_tenant_by_memory_resource;/
create procedure create_tenant_by_memory_resource(tenant_name varchar(64), compat_mode varchar(10))
drop procedure if exists create_tenant_by_memory_resource_with_arg;/
create procedure create_tenant_by_memory_resource_with_arg(tenant_name varchar(64), compat_mode varchar(10), arg_list varchar(64))
begin
declare mem bigint;
select memory_limit from GV$OB_SERVERS limit 1 into mem;
if (mem < 8589934592) then
call oceanbase.create_tenant_with_arg(tenant_name, compat_mode, '1c1g', '');
call oceanbase.create_tenant_with_arg(tenant_name, compat_mode, '1c1g', arg_list);
elseif (mem < 17179869184) then
call oceanbase.create_tenant_with_arg(tenant_name, compat_mode, '2c2g', '');
call oceanbase.create_tenant_with_arg(tenant_name, compat_mode, '2c2g', arg_list);
else
call oceanbase.create_tenant_with_arg(tenant_name, compat_mode, '2c4g', '');
call oceanbase.create_tenant_with_arg(tenant_name, compat_mode, '2c4g', arg_list);
end if;
end /
drop procedure if exists create_tenant_by_memory_resource;/
create procedure create_tenant_by_memory_resource(tenant_name varchar(64), compat_mode varchar(10))
begin
call create_tenant_by_memory_resource_with_arg(tenant_name, compat_mode, '');
end /
-- adjust_sys_resource: 根据memory_limit调整sys租户规格
drop procedure if exists adjust_sys_resource;/
create procedure adjust_sys_resource()