CREATE DEFINER=`test`@`%` PROCEDURE `prop_make_bak_sql`(psShecmal varchar(30),psFunctions varchar(3000)) BEGIN select CONCAT(‘-- 备份 ‘,name,‘ \r\nDELIMITER $$\r\n \r\nCREATE OR REPLACE ‘,type,‘ ‘,name,‘(‘,CAST(param_list AS CHAR(50000) CHARACTER SET utf8),‘) ‘ ,if(type=‘FUNCTION‘,‘ RETURNS ‘,‘‘),if(type=‘FUNCTION‘,CAST(`RETURNS` AS CHAR(50000) CHARACTER SET utf8),‘‘),‘ \r\n‘,CAST(body AS CHAR(500000) CHARACTER SET utf8),‘$$\r\n \r\nDELIMITER ;\r\n \r\n‘) tt from mysql.proc where db = psShecmal and FIND_IN_SET(LOWER(name),LOWER(psFunctions))>0; END