When I do :
select routine_definition
from information_schema.routines
where routine_name = 'sp_name';
it returns a row, but the routine_definition column is NULL
. Does this mean that this Stored Procedure is not defined?
Also, when I do show create procedure sp_name
, it says that procedure does not exit.
Best Answer
You should run these other queries
If the procedure does not show up from any of these queries, my condolences.
There is one hope left: If you have a physical backup of the
mysql.proc
, do this in a Staging DB:service mysql stop
/var/lib/mysql
into the Staging DBchown -R mysql:mysql /var/lib/mysql
service mysql start
Once you do that, you can mysqldump all the stored procedures out of it with
Now, go
vi
ornano
the file and get the Stored Procedure out of it.Give it a Try !!!
UPDATE 2013-02-05 11:58 EDT
If you are really having problems with visually seeing the Stored Procedure's code, you may have a corrupt
proc.MYD
file. Try retrieving from backup as I already mentioned.