[ensembl-dev] problem on interacting with mysql
Zhang Di
aureliano.jz at gmail.com
Sun Nov 20 06:23:39 GMT 2011
Hi,
Strange things here.
I have run ensembl-compara pipeline for whole genome alignment
successfully a week before.
When I try to run it again on yesterday, It stoped at StoreSequence
step, compaining that:
DBI::mysql::do do failed: 'job_file' was not locked with LOCK TABLES at:
/mydir/ensembl/modules/Bio/EnsEMBL/DBSQL/DBConnection.pm line 769.
DBI::mysql::do do failed: 'job_file' was not locked with LOCK TABLES at:
/mydir/ensembl/modules/Bio/EnsEMBL/DBSQL/DBConnection.pm line 769.
After some debug work, I found that it could not execute the sql statement
'DELETE from job_file WHERE job_id=xxx AND worker_id=xx';
I tried to work around it by modify the DBConnection.pm, replaced line 769:
my $result = $self->db_handle->do($string);
TO:
my $result;
system "mysql -ppassword $self>{_dbname} -e '$string'";
$result=1;
It worked! But the pipeline still stoped complaining that:
DBD::mysql::st execute failed: Table 'job_file' was not locked with LOCK
TABLES at
/mydir/ensembl-hive/modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm
line 466.
DBD::mysql::st execute failed: Table 'job_file' was not locked with LOCK
TABLES at
/mydir/ensembl-hive/modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm
line 466.
Seems another place failed to execute some sql statement related to
'job_file'.
---------------------------------------------------------------------------------------------
When I terminate (Ctrl-C) the pipeline. The same statement ran without any
problem in a test perl script:
#!/usr/bin/perl -w
use DBI;
my $dbh = DBI->connect("DBI:mysql:mydb:localhost","user","pass");
my $string = "DELETE FROM job_file WHERE job_id=xxx AND worker_id=xx";
$dbh->do($string);
---------------------------------------------------------------------------------------------
Any suggestions?
Best Reguards.
--
Zhang Di
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20111120/4094333b/attachment.html>
More information about the Dev
mailing list