show create procedure fails after move to different server
Posted by: marin djendjinovic
Date: August 18, 2009 12:34AM

I have recently moved some databases from 5.0.15 MySQL server on one
machine (using mysqldump, copying them over the network and uploading them)
to 5.1.36 MySQL server on a different machine. Everything seems to be working
except that procedures cannot be used as they are supposed to. For example, one
function (called when people are logging to the website) gives the
following error.


PORTAL HALT: Database query error: select _id, uid, username,
name_full,email from user_master where username = '' and password_hash =
FPasswordHash(password_type, '') (Failed to load routine
portal.FPasswordHash. The table mysql.proc is missing, corrupt, or
contains bad data (internal code -5))

Within MySQL server, call

show create procedure FPasswordHash;
or
show create function FPasswordHash;

gives

ERROR 1305 (42000): FUNCTION FPasswordHash does not exist

but when I

use mysql;
select Name from proc;

it shows up fine. Furthermore the function's body is there:

use mysql;
select body from proc where Name='FPasswordHash';

shows entire body.

Can anybody explain what is going on and suggest the fix?
Thanks very much for your help.



Edited 3 time(s). Last edit at 08/18/2009 10:23PM by marin djendjinovic.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.