[MOBY] [MOBY-dev] bug(s) in method DUMP

Martin Senger senger at ebi.ac.uk
Sat Oct 18 01:31:02 EDT 2003


> MOBY::Central::DUMP now returns an arrayref, as you suggested.  Let me
> know if this helps.  (the MOBY::Client::Central::DUMP interface has not
> changed)
>
   Thanks, it works now perfect for the Java client. Those who want to get
dump using java, type this (being in moby-live/Java directory):
   ./run-cmdline-client -call DUMP
 
> 
> > 2) [Less important] The dump is done by calling an external program
> > mysqldump. Unfortunately, the path to the script is hard-coded. 
> 
> I'll deal with that at a later date - I switched from using a config
> file to using environment variables, but that has caused some squeals
> from the users, so I need to switch back to a configuration file format
> sometime in the near future.
> 
   I like configuration file, so I am happy that you may consider it
again. In all my perl projects I use a file Cfg.pl which starts like this:

package Cfg;
$WHATEVER = 'value';
....

   and in my scripts I am using:

require Cfg.pl;
...
....$Cfg::WHATEVER...

   But the format of the configuration file is less important, I will be
happy with any format. More important is that you *do not* put this file
under CVS, but instead you put under CVS its template (such as in my
example Cfg.pl.template). The users need to create a copy of the  template
and edit it for their side, but they are not in danger that next cvs
update will remove what they edited. That's how I would suggest it...


> 
> >    This external program also needs to get password. I do not know how to
> > open (IN, "/usr/local/bin/mysqldump -u mobycentral --password='mypassword' mobycentral |") || ...
> 
> I have no idea... try removing the quotes?
> 
   I tried. The problem is that it waits for the stdin. You do not see the
problem because your database does not use passowrd but you need to solve
it anyway when you introduce the configuration file, because this part is
an obvivous candidate for being configurated (other people will use
password I guess). This is a problem for perl gurus. Perhaps Lincoln will
see immediately what causes here the problem...

> > 3) [Annoying] The dump should have included lines 'use <database-name>'
> > before dumping tables for that database. Otherwise it creates all tables
> > into one databases.
> 
> I dont understand the objection...??  All of the tables *are* in one
> database (for each database).
>
   I do not understand your answer either :-) But that may well be because
I know little about sql. I think (I thought) that you have 5 databases and
for each, when you want to work with the, you need to use statement 'use
<database>', such as use mobycentral; or use mobyobject;. At least that
how I installed moby databases on my site and it works. But for that
arrangement I needed to unclude these statements (use mobycentreal;, use
mobyobject; etc.) into the dump before sourcinf the dump within my 'mysql'
command-line program. So what am I doing wrong?
 
> I have made the subroutine name DUMP_MySQL.  This is currently aliased
> to DUMP so that the API is the same, but we can make other procedures
> later.
>
   Perfect.

   Many thanks for your fixes.
   Martin

-- 
Martin Senger

EMBL Outstation - Hinxton                Senger at EBI.ac.uk     
European Bioinformatics Institute        Phone: (+44) 1223 494636      
Wellcome Trust Genome Campus             (Switchboard:     494444)
Hinxton                                  Fax  : (+44) 1223 494468
Cambridge CB10 1SD
United Kingdom                           http://industry.ebi.ac.uk/~senger



More information about the MOBY-dev mailing list