Ask questions :
surface user_experience_wealth_log Renamed as user_experience_wealth_log_new, This table involves several stored procedures . To avoid omission , It needs to be confirmed that all relevant processes have been modified , Validation method is nonexistent with user_experience_wealth_log Stored procedure .
Problem analysis :
Can’t use simple not like ‘%user_experience_wealth_log%’, Because it also filters out the user_experience_wealth_log_new The record of . Use rlike Can be easily solved .
Query statement :
-- Contains only user_experience_wealth_log_new
select routine_schema,routine_name from routines
where routine_type='procedure'
and routine_definition rlike 'user_experience_wealth_log_new'
and routine_definition not rlike 'user_experience_wealth_log[^_]';
-- Contains only user_experience_wealth_log
select routine_schema,routine_name from routines
where routine_type='procedure'
and routine_definition rlike 'user_experience_wealth_log[^_]'
and routine_definition not rlike 'user_experience_wealth_log_new';
-- Both contain
select routine_schema,routine_name from routines
where routine_type='procedure'
and routine_definition rlike 'user_experience_wealth_log_new'
and routine_definition rlike 'user_experience_wealth_log[^_]';