I'm having trouble with a MySQL function I pulled across from another db. I did and import of the data and the functions and procedures separately.
I now have a makehash
function that makes a call to preg_replace
. I can't see this function or procedure anywhere though.
If I run show function status
or show procedure status
nothing to do with preg_replace
shows up, only the custom procedures and functions that were there before.
Is there something I am missing that is installed on the db I copied from that I have neglected to copy over to the new one?
Here is the makehash
function:
CREATE DEFINER=`root`@`localhost` FUNCTION `makehash`(description text, raw_location text, title text) RETURNS varchar(32) CHARSET utf8
NO SQL
DETERMINISTIC
begin
declare data longtext;
declare hash varchar(32);
set data = ifnull(description, '');
set hash = null;
if length(data) > 64 then
set data = lower(concat(data, ifnull(raw_location, ''), ifnull(title, '')));
set hash = md5(preg_replace('/[^a-z]/', '', data));
end if;
return hash;