SHOW CREATE PROCEDURE inconsistent results with perl DBI

The "SHOW CREATE PROCEDURE foo" pipeline in the mysql results includes the complete procedure definition in the column labeled "Create Procedure". However

$ dbh-> selectrow_hashref ("SHOW PROCEDURE foo");

causes $ ref -> {'Create Procedure'} to be undef and the rest of the columns are filled in correctly. Both run on the same machine with the same credentials. Does anyone know why?

+3


source to share


1 answer


This is what you will see if the user you are connecting does not have permission to view the procedure. Try using the same user on the command line and I am assuming you see NULL for the Create Procedure column.



It seems you need to select a privilege on mysql.proc to view the bodies of the procedures.

+2


source







All Articles