List:General Discussion« Previous MessageNext Message »
From:Claudio Nanni Date:March 29 2011 11:34pm
Subject:Re: getting procedure code via mysqldump
View as plain text  
Hi John,
The lines you mention are comments , the comments in mysql sql files are
enclosed between two delimiters. The first is the sequence /* and the second
is the sequence */ ,  inside the comments you can have a marker constituted
by a ! and a number that represents a mysql version. These markers are used
to give instructions to specific mysql versions. When a mysql client reads a
sql file executes all commands enclosed plus the commented parts that
correspond to the server version. Usually you can delete those parts, since
in any case they are comments, but you should not need to delete them. I
hope I was enough clear,
My Android mobile soft keyboard is good, but not so inviting for writing
long messages!
Claudio
On Mar 30, 2011 1:10 AM, "John G. Heim" <jheim@stripped> wrote:
> 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?
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=1
>

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