-- 查询所有存储过程
SELECT db AS routine_schema,
       name AS routine_name,
       type AS routine_type,
       definer
FROM mysql.proc
WHERE db = 'ltkjpeis10' AND type = 'PROCEDURE';


-- 获取查询存储过程语句的sql
SELECT CONCAT('SHOW CREATE PROCEDURE ', db, '.', name, ';') AS create_procedure_statement
FROM mysql.proc
WHERE db = 'ltkjpeis10' AND type = 'PROCEDURE';

-- 删除存储过程
DROP PROCEDURE IF EXISTS ltkjpeis10.xxx;
-- 再创建存储过程

-- 修复mysql.proc表
mysqlcheck -u root -p --repair mysql proc
