List:General Discussion« Previous MessageNext Message »
From:John G. Heim Date:March 29 2011 11:09pm
Subject:getting procedure code via mysqldump
View as plain text  
I would like to use mysqldump to get a copy of the code for a stored 
procedure in a format that is similar to the code I used to create it. The 
problem is that I'm blind and I have to listen to the code to debug it. I 
think I have a file containing the code that I used to create the stored 
procedure but I want to make absolutely sure.

This is what I've tried:

mysqldump --p --routines --no-create-info --no-data --no-create-db --skip-opt 
 --skip-comments --compatible=ansi --result=routines.sql  <database>

My problem is that generates a file with a lot of lines I don't understand. 
for example:

/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE 
`TIMETABLE_SYNC`()

That appears to be the line to create the stored procedure 'timetable_sync'. 
But what's with all the other stuff on that line? Can i get rid of it?


Thread
getting procedure code via mysqldumpJohn G. Heim30 Mar
  • Re: getting procedure code via mysqldumpClaudio Nanni30 Mar
  • Re: getting procedure code via mysqldumpMySQL)30 Mar
    • Re: getting procedure code via mysqldumpClaudio Nanni30 Mar
      • Re: getting procedure code via mysqldumpJohan De Meersman30 Mar
  • Re: getting procedure code via mysqldumpJohn G. Heim30 Mar
    • Re: getting procedure code via mysqldumpJoerg Bruehe30 Mar