[CP] [FEAT MERGE]424 PL dev features

Co-authored-by: seuwebber <webber_code@163.com>
Co-authored-by: hanr881 <1741282579@qq.com>
This commit is contained in:
swjtu-wenxiang
2024-08-19 06:45:07 +00:00
committed by ob-robot
parent 4dbf5fad23
commit 445002cafa
48 changed files with 1699 additions and 501 deletions

View File

@ -248,6 +248,7 @@ select * from information_schema.tables where table_schema in ('oceanbase', 'mys
| def | mysql | columns_priv | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | mysql | db | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | mysql | default_roles | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | mysql | func | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | mysql | help_category | SYSTEM TABLE | InnoDB | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | mysql | help_keyword | SYSTEM TABLE | InnoDB | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | mysql | help_relation | SYSTEM TABLE | InnoDB | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
@ -1673,6 +1674,7 @@ select * from information_schema.views where table_schema in ('oceanbase', 'mysq
+---------------+--------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+--------------+---------+---------------+----------------------+----------------------+
| def | mysql | columns_priv | SELECT cast(b.host as char(255)) as Host, cast(a.database_name as char(128)) as Db, cast(b.user_name as char(128)) as User, cast(a.table_name as char(128)) as Table_name, cast(a.column_name as char(128)) as Column_name, substr(concat(case when (a.all_priv & 1) > 0 then ',Select' else '' end, case when (a.all_priv & 2) > 0 then ',Insert' else '' end, case when (a.all_priv & 4) > 0 then ',Update' else '' end, case when (a.all_priv & 8) > 0 then ',References' else '' end), 2) as Column_priv, cast(a.gmt_modified as datetime) as Timestamp FROM oceanbase.__all_column_privilege a, oceanbase.__all_user b WHERE a.tenant_id = 0 and a.tenant_id = b.tenant_id AND a.user_id = b.user_id | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | default_roles | SELECT cast(to_user.host AS char(255)) HOST, cast(to_user.user_name AS char(128)) USER, cast(from_user.host AS char(255)) DEFAULT_ROLE_HOST, cast(from_user.user_name AS char(128)) DEFAULT_ROLE_USER FROM oceanbase.__all_tenant_role_grantee_map role_map, oceanbase.__all_user from_user, oceanbase.__all_user to_user WHERE role_map.tenant_id = from_user.tenant_id AND role_map.tenant_id = to_user.tenant_id AND role_map.grantee_id = to_user.user_id AND role_map.role_id = from_user.user_id AND role_map.disable_flag = 0; | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | func | SELECT name, ret, dl, type FROM oceanbase.__all_func | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | procs_priv | SELECT cast(b.host as char(60)) as Host, cast(a.database_name as char(64)) as Db, cast(b.user_name as char(32)) as User, cast(a.routine_name as char(64)) as Routine_name, case when a.routine_type = 1 then 'PROCEDURE' else 'FUNCTION' end as Routine_type, cast(c.priv_user as char(93)) as Grantor, substr(concat(case when (a.all_priv & 1) > 0 then ',Execute' else '' end, case when (a.all_priv & 2) > 0 then ',Alter Routine' else '' end, case when (a.all_priv & 4) > 0 then ',Grant' else '' end), 2) as Proc_priv, cast(a.gmt_modified as date) as Timestamp FROM oceanbase.__all_routine_privilege a, oceanbase.__all_user b, oceanbase.__all_routine c, oceanbase.__all_database d WHERE a.tenant_id = b.tenant_id AND a.user_id = b.user_id AND a.tenant_id = d.tenant_id and a.database_name = d.database_name AND a.tenant_id = c.tenant_id AND a.routine_name = c.routine_name AND a.routine_type = c.routine_type AND c.database_id = d.database_id AND c.package_id = -1; | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | role_edges | SELECT cast(from_user.host AS char(255)) FROM_HOST, cast(from_user.user_name AS char(128)) FROM_USER, cast(to_user.host AS char(255)) TO_HOST, cast(to_user.user_name AS char(128)) TO_USER, cast(CASE role_map.admin_option WHEN 1 THEN 'Y' ELSE 'N' END AS char(1)) WITH_ADMIN_OPTION FROM oceanbase.__all_tenant_role_grantee_map role_map, oceanbase.__all_user from_user, oceanbase.__all_user to_user WHERE role_map.tenant_id = from_user.tenant_id AND role_map.tenant_id = to_user.tenant_id AND role_map.grantee_id = to_user.user_id AND role_map.role_id = from_user.user_id; | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | time_zone | SELECT time_zone_id as Time_zone_id, use_leap_seconds as Use_leap_seconds FROM oceanbase.__all_tenant_time_zone | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
@ -1756,6 +1758,7 @@ select * from information_schema.tables where table_schema in ('oceanbase', 'mys
| def | mysql | columns_priv | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | mysql | db | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | mysql | default_roles | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | mysql | func | SYSTEM VIEW | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | mysql | help_category | SYSTEM TABLE | InnoDB | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | mysql | help_keyword | SYSTEM TABLE | InnoDB | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | mysql | help_relation | SYSTEM TABLE | InnoDB | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
@ -2471,6 +2474,7 @@ select * from information_schema.views where table_schema in ('oceanbase', 'mysq
+---------------+--------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+--------------+---------+---------------+----------------------+----------------------+
| def | mysql | columns_priv | SELECT cast(b.host as char(255)) as Host, cast(a.database_name as char(128)) as Db, cast(b.user_name as char(128)) as User, cast(a.table_name as char(128)) as Table_name, cast(a.column_name as char(128)) as Column_name, substr(concat(case when (a.all_priv & 1) > 0 then ',Select' else '' end, case when (a.all_priv & 2) > 0 then ',Insert' else '' end, case when (a.all_priv & 4) > 0 then ',Update' else '' end, case when (a.all_priv & 8) > 0 then ',References' else '' end), 2) as Column_priv, cast(a.gmt_modified as datetime) as Timestamp FROM oceanbase.__all_column_privilege a, oceanbase.__all_user b WHERE a.tenant_id = 0 and a.tenant_id = b.tenant_id AND a.user_id = b.user_id | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | default_roles | SELECT cast(to_user.host AS char(255)) HOST, cast(to_user.user_name AS char(128)) USER, cast(from_user.host AS char(255)) DEFAULT_ROLE_HOST, cast(from_user.user_name AS char(128)) DEFAULT_ROLE_USER FROM oceanbase.__all_tenant_role_grantee_map role_map, oceanbase.__all_user from_user, oceanbase.__all_user to_user WHERE role_map.tenant_id = from_user.tenant_id AND role_map.tenant_id = to_user.tenant_id AND role_map.grantee_id = to_user.user_id AND role_map.role_id = from_user.user_id AND role_map.disable_flag = 0; | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | func | SELECT name, ret, dl, type FROM oceanbase.__all_func | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | procs_priv | SELECT cast(b.host as char(60)) as Host, cast(a.database_name as char(64)) as Db, cast(b.user_name as char(32)) as User, cast(a.routine_name as char(64)) as Routine_name, case when a.routine_type = 1 then 'PROCEDURE' else 'FUNCTION' end as Routine_type, cast(c.priv_user as char(93)) as Grantor, substr(concat(case when (a.all_priv & 1) > 0 then ',Execute' else '' end, case when (a.all_priv & 2) > 0 then ',Alter Routine' else '' end, case when (a.all_priv & 4) > 0 then ',Grant' else '' end), 2) as Proc_priv, cast(a.gmt_modified as date) as Timestamp FROM oceanbase.__all_routine_privilege a, oceanbase.__all_user b, oceanbase.__all_routine c, oceanbase.__all_database d WHERE a.tenant_id = b.tenant_id AND a.user_id = b.user_id AND a.tenant_id = d.tenant_id and a.database_name = d.database_name AND a.tenant_id = c.tenant_id AND a.routine_name = c.routine_name AND a.routine_type = c.routine_type AND c.database_id = d.database_id AND c.package_id = -1; | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | role_edges | SELECT cast(from_user.host AS char(255)) FROM_HOST, cast(from_user.user_name AS char(128)) FROM_USER, cast(to_user.host AS char(255)) TO_HOST, cast(to_user.user_name AS char(128)) TO_USER, cast(CASE role_map.admin_option WHEN 1 THEN 'Y' ELSE 'N' END AS char(1)) WITH_ADMIN_OPTION FROM oceanbase.__all_tenant_role_grantee_map role_map, oceanbase.__all_user from_user, oceanbase.__all_user to_user WHERE role_map.tenant_id = from_user.tenant_id AND role_map.tenant_id = to_user.tenant_id AND role_map.grantee_id = to_user.user_id AND role_map.role_id = from_user.user_id; | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | time_zone | SELECT time_zone_id as Time_zone_id, use_leap_seconds as Use_leap_seconds FROM oceanbase.__all_tenant_time_zone | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
@ -3525,6 +3529,7 @@ select * from information_schema.views where table_schema in ('oceanbase', 'mysq
+---------------+--------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+--------------+---------+---------------+----------------------+----------------------+
| def | mysql | columns_priv | SELECT cast(b.host as char(255)) as Host, cast(a.database_name as char(128)) as Db, cast(b.user_name as char(128)) as User, cast(a.table_name as char(128)) as Table_name, cast(a.column_name as char(128)) as Column_name, substr(concat(case when (a.all_priv & 1) > 0 then ',Select' else '' end, case when (a.all_priv & 2) > 0 then ',Insert' else '' end, case when (a.all_priv & 4) > 0 then ',Update' else '' end, case when (a.all_priv & 8) > 0 then ',References' else '' end), 2) as Column_priv, cast(a.gmt_modified as datetime) as Timestamp FROM oceanbase.__all_column_privilege a, oceanbase.__all_user b WHERE a.tenant_id = 0 and a.tenant_id = b.tenant_id AND a.user_id = b.user_id | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | default_roles | SELECT cast(to_user.host AS char(255)) HOST, cast(to_user.user_name AS char(128)) USER, cast(from_user.host AS char(255)) DEFAULT_ROLE_HOST, cast(from_user.user_name AS char(128)) DEFAULT_ROLE_USER FROM oceanbase.__all_tenant_role_grantee_map role_map, oceanbase.__all_user from_user, oceanbase.__all_user to_user WHERE role_map.tenant_id = from_user.tenant_id AND role_map.tenant_id = to_user.tenant_id AND role_map.grantee_id = to_user.user_id AND role_map.role_id = from_user.user_id AND role_map.disable_flag = 0; | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | func | SELECT name, ret, dl, type FROM oceanbase.__all_func | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | procs_priv | SELECT cast(b.host as char(60)) as Host, cast(a.database_name as char(64)) as Db, cast(b.user_name as char(32)) as User, cast(a.routine_name as char(64)) as Routine_name, case when a.routine_type = 1 then 'PROCEDURE' else 'FUNCTION' end as Routine_type, cast(c.priv_user as char(93)) as Grantor, substr(concat(case when (a.all_priv & 1) > 0 then ',Execute' else '' end, case when (a.all_priv & 2) > 0 then ',Alter Routine' else '' end, case when (a.all_priv & 4) > 0 then ',Grant' else '' end), 2) as Proc_priv, cast(a.gmt_modified as date) as Timestamp FROM oceanbase.__all_routine_privilege a, oceanbase.__all_user b, oceanbase.__all_routine c, oceanbase.__all_database d WHERE a.tenant_id = b.tenant_id AND a.user_id = b.user_id AND a.tenant_id = d.tenant_id and a.database_name = d.database_name AND a.tenant_id = c.tenant_id AND a.routine_name = c.routine_name AND a.routine_type = c.routine_type AND c.database_id = d.database_id AND c.package_id = -1; | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | role_edges | SELECT cast(from_user.host AS char(255)) FROM_HOST, cast(from_user.user_name AS char(128)) FROM_USER, cast(to_user.host AS char(255)) TO_HOST, cast(to_user.user_name AS char(128)) TO_USER, cast(CASE role_map.admin_option WHEN 1 THEN 'Y' ELSE 'N' END AS char(1)) WITH_ADMIN_OPTION FROM oceanbase.__all_tenant_role_grantee_map role_map, oceanbase.__all_user from_user, oceanbase.__all_user to_user WHERE role_map.tenant_id = from_user.tenant_id AND role_map.tenant_id = to_user.tenant_id AND role_map.grantee_id = to_user.user_id AND role_map.role_id = from_user.user_id; | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | time_zone | SELECT time_zone_id as Time_zone_id, use_leap_seconds as Use_leap_seconds FROM oceanbase.__all_tenant_time_zone | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
@ -4261,6 +4266,7 @@ select * from information_schema.views where table_schema in ('oceanbase', 'mysq
+---------------+--------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+--------------+---------+---------------+----------------------+----------------------+
| def | mysql | columns_priv | SELECT cast(b.host as char(255)) as Host, cast(a.database_name as char(128)) as Db, cast(b.user_name as char(128)) as User, cast(a.table_name as char(128)) as Table_name, cast(a.column_name as char(128)) as Column_name, substr(concat(case when (a.all_priv & 1) > 0 then ',Select' else '' end, case when (a.all_priv & 2) > 0 then ',Insert' else '' end, case when (a.all_priv & 4) > 0 then ',Update' else '' end, case when (a.all_priv & 8) > 0 then ',References' else '' end), 2) as Column_priv, cast(a.gmt_modified as datetime) as Timestamp FROM oceanbase.__all_column_privilege a, oceanbase.__all_user b WHERE a.tenant_id = 0 and a.tenant_id = b.tenant_id AND a.user_id = b.user_id | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | default_roles | SELECT cast(to_user.host AS char(255)) HOST, cast(to_user.user_name AS char(128)) USER, cast(from_user.host AS char(255)) DEFAULT_ROLE_HOST, cast(from_user.user_name AS char(128)) DEFAULT_ROLE_USER FROM oceanbase.__all_tenant_role_grantee_map role_map, oceanbase.__all_user from_user, oceanbase.__all_user to_user WHERE role_map.tenant_id = from_user.tenant_id AND role_map.tenant_id = to_user.tenant_id AND role_map.grantee_id = to_user.user_id AND role_map.role_id = from_user.user_id AND role_map.disable_flag = 0; | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | func | SELECT name, ret, dl, type FROM oceanbase.__all_func | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | procs_priv | SELECT cast(b.host as char(60)) as Host, cast(a.database_name as char(64)) as Db, cast(b.user_name as char(32)) as User, cast(a.routine_name as char(64)) as Routine_name, case when a.routine_type = 1 then 'PROCEDURE' else 'FUNCTION' end as Routine_type, cast(c.priv_user as char(93)) as Grantor, substr(concat(case when (a.all_priv & 1) > 0 then ',Execute' else '' end, case when (a.all_priv & 2) > 0 then ',Alter Routine' else '' end, case when (a.all_priv & 4) > 0 then ',Grant' else '' end), 2) as Proc_priv, cast(a.gmt_modified as date) as Timestamp FROM oceanbase.__all_routine_privilege a, oceanbase.__all_user b, oceanbase.__all_routine c, oceanbase.__all_database d WHERE a.tenant_id = b.tenant_id AND a.user_id = b.user_id AND a.tenant_id = d.tenant_id and a.database_name = d.database_name AND a.tenant_id = c.tenant_id AND a.routine_name = c.routine_name AND a.routine_type = c.routine_type AND c.database_id = d.database_id AND c.package_id = -1; | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | role_edges | SELECT cast(from_user.host AS char(255)) FROM_HOST, cast(from_user.user_name AS char(128)) FROM_USER, cast(to_user.host AS char(255)) TO_HOST, cast(to_user.user_name AS char(128)) TO_USER, cast(CASE role_map.admin_option WHEN 1 THEN 'Y' ELSE 'N' END AS char(1)) WITH_ADMIN_OPTION FROM oceanbase.__all_tenant_role_grantee_map role_map, oceanbase.__all_user from_user, oceanbase.__all_user to_user WHERE role_map.tenant_id = from_user.tenant_id AND role_map.tenant_id = to_user.tenant_id AND role_map.grantee_id = to_user.user_id AND role_map.role_id = from_user.user_id; | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |
| def | mysql | time_zone | SELECT time_zone_id as Time_zone_id, use_leap_seconds as Use_leap_seconds FROM oceanbase.__all_tenant_time_zone | NONE | NO | NONE | NONE | utf8mb4 | utf8mb4_general_ci |