Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl
Commits
447682a7
Commit
447682a7
authored
Nov 01, 2010
by
Andreas Kusalananda Kähäri
Browse files
Be more careful with dbname in get_species_and_object_type()
parent
01821275
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
modules/Bio/EnsEMBL/Registry.pm
modules/Bio/EnsEMBL/Registry.pm
+17
-7
No files found.
modules/Bio/EnsEMBL/Registry.pm
View file @
447682a7
...
...
@@ -2463,17 +2463,24 @@ sub get_species_and_object_type {
if
(
lc
(
$species
)
eq
'
multi
'
)
{
next
}
if
(
!
defined
(
$dbc
)
||
$dbc
->
host
()
ne
$dba
->
dbc
()
->
host
()
)
{
if
(
!
defined
(
$dbc
)
||
$dbc
->
host
()
ne
$dba
->
dbc
()
->
host
()
||
$dbc
->
dbname
()
ne
$dba
->
dbc
()
->
dbname
()
)
{
$dbc
=
$dba
->
dbc
();
}
my
$dbh
=
$dbc
->
db_handle
();
my
$dbname
=
$dbc
->
dbname
();
my
$statement
=
sprintf
(
"
SELECT meta_value
"
.
"
FROM %s
"
.
"
WHERE meta_key = 'species.stable_id_prefix'
"
.
"
AND species_id = ?
",
$dbh
->
quote_identifier
(
undef
,
$dbname
,
'
meta
'
)
);
my
$statement
=
"
SELECT meta_value
"
.
"
FROM meta
"
.
"
WHERE meta_key = 'species.stable_id_prefix'
"
.
"
AND species_id = ?
";
my
$sth
=
$dbh
->
prepare
(
$statement
);
...
...
@@ -2593,7 +2600,10 @@ SECONDLOOP:
'
-species
'
=>
$species
)
}
)
{
if
(
!
defined
(
$dbc
)
||
$dbc
->
host
()
ne
$dba
->
dbc
()
->
host
()
)
{
if
(
!
defined
(
$dbc
)
||
$dbc
->
host
()
ne
$dba
->
dbc
()
->
host
()
||
$dbc
->
dbname
()
ne
$dba
->
dbc
()
->
dbname
()
)
{
$dbc
=
$dba
->
dbc
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment