List:General Discussion« Previous MessageNext Message »
From:Johan De Meersman Date:March 30 2011 8:47am
Subject:Re: getting procedure code via mysqldump
View as plain text  
Might it not be easier to use something like "show create procedure" instead? Given that
the purpose is debugging, I would assume you want the exact text used to create the
procedure, not the one with version-specifics removed.

You can still pump that into a file by using "mysql -e 'show create procedure procname\G'
dbname > outputfile.sql". There will still be a bit of superfluous information as this
is an information request, but that should be easily removed with some sed hacking.


----- Original Message -----
> From: "Claudio Nanni" <claudio.nanni@stripped>
> To: "Shawn Green (MySQL)" <shawn.l.green@stripped>
> Cc: "John G. Heim" <jheim@stripped>, mysql@stripped
> Sent: Wednesday, 30 March, 2011 9:01:06 AM
> Subject: Re: getting procedure code via mysqldump
> 
> In case you use a linux or unix system, to strip off the comments in
> linux
> bash is very easy, you can use this simple bash command:
> 
> grep -v "^/\*" yourdumpfile.sql > yourdumpfilewithoutcomments.sql
> 
> this will create a new dump without comments.
> 
> Cheers
> 
> Claudio
> 
> 
> 2011/3/30 Shawn Green (MySQL) <shawn.l.green@stripped>
> 

-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel
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