[CP] [to #57374270]fix bug, information_schema routines veiw should not display deleted info or same info twice.

This commit is contained in:
swjtu-wenxiang
2024-06-18 00:23:03 +00:00
committed by ob-robot
parent 768e502783
commit 1a2d20bd19
2 changed files with 11 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -15776,8 +15776,18 @@ def_table_schema(
mysql.proc as mp
join oceanbase.__all_database a
on mp.DB = a.DATABASE_NAME
and a.in_recyclebin = 0
join oceanbase.__all_routine as r on mp.specific_name = r.routine_name
and r.DATABASE_ID = a.DATABASE_ID
and
CAST(
CASE r.routine_type
WHEN 1 THEN 'PROCEDURE'
WHEN 2 THEN 'FUNCTION'
ELSE NULL
END
AS CHAR(9)
) = mp.type
left join oceanbase.__all_routine_param as rp on rp.subprogram_id = r.subprogram_id
and rp.tenant_id = r.tenant_id
and rp.routine_id = r.routine_id