[Bioperl-guts-l] [BioPerl - Bug #2899] problem with t/LocalDB/SeqFeature.t when host ne localhost

redmine at redmine.open-bio.org redmine at redmine.open-bio.org
Sun Mar 27 13:29:53 EDT 2011

Issue #2899 has been updated by Jason Stajich.

Project changed from BioPerl DB to BioPerl

Bug #2899: problem with t/LocalDB/SeqFeature.t when host ne localhost

Author: Dan Bolser
Status: New
Priority: Normal
Assignee: Lincoln Stein
Target version: 

Whenever I try to do the Bio::DB::GFF or Bio::DB::SeqFeature::Store
live database tests:

 - will run tests with database driver 'mysql' and these settings:
   Database test
   Host     our.mysql.host
   DSN      dbi:mysql:database=test;host=our.mysql.host
   User     me
   Password secret

I get the following error:

DBI connect('database=test','',...) failed: Can't connect to local
MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at
Bio/DB/SeqFeature/Store/DBI/mysql.pm line 212
sh: -user: command not found

The clue is the sh error that follows. The contents of the
t/LocalDB/SeqFeature_mysql.t file looks like this:

system '/usr/bin/perl t/LocalDB/SeqFeature.t -adaptor DBI::mysql
-create 1 -temp 1 -dsn dbi:mysql:database=test;host=our.mysql.host
-user me -password secret';

I tried the following diff to 'work around' the problem created by the
';' character in the dsn:

diff -u  t/LocalDB/SeqFeature.t~  t/LocalDB/SeqFeature.t
--- t/LocalDB/SeqFeature.t~     2009-05-11 15:22:07.000000000 +0100
+++ t/LocalDB/SeqFeature.t      2009-07-31 12:56:53.554227455 +0100
@@ -25,7 +25,7 @@
 @args = (-adaptor => 'memory') unless @args;

 SKIP: {
-my $db = eval { Bio::DB::SeqFeature::Store->new(@args) };
+my $db = eval { Bio::DB::SeqFeature::Store->new(-adaptor =>
"DBI::mysql", -create => 1, -temp => 1, -dsn =>
"dbi:mysql:database=test;host=our.mysql.host", -user => "me",
-password => "secret") };
 skip "DB load failed? Skipping all! $@", (TEST_COUNT - 2) if $@;

However, running the above script creates the following error:

DBD::mysql::db do failed: BLOB/TEXT column 'tag' used in key
specification without a key length at
Bio/DB/SeqFeature/Store/DBI/mysql.pm line 450.
ok 3 # skip DB load failed? Skipping all!
# -------------------- EXCEPTION --------------------
# MSG: BLOB/TEXT column 'tag' used in key specification without a key length
# STACK Bio::DB::SeqFeature::Store::DBI::mysql::_create_table
# STACK Bio::DB::SeqFeature::Store::DBI::mysql::init_tmp_database
# STACK Bio::DB::SeqFeature::Store::DBI::mysql::init
# STACK Bio::DB::SeqFeature::Store::new Bio/DB/SeqFeature/Store.pm:360
# STACK (eval) t/LocalDB/SeqFeature.t:28
# STACK toplevel t/LocalDB/SeqFeature.t:28
# -------------------------------------------

I'm not sure how to proceed from here.

You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here and login: http://redmine.open-bio.org

More information about the Bioperl-guts-l mailing list