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-hive
Commits
5a3beced
Commit
5a3beced
authored
Mar 18, 2014
by
Leo Gordon
Browse files
bugfix: do not crash when given full URL to analyses|tables
parent
aa15abb8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
modules/Bio/EnsEMBL/Hive/URLFactory.pm
modules/Bio/EnsEMBL/Hive/URLFactory.pm
+9
-4
No files found.
modules/Bio/EnsEMBL/Hive/URLFactory.pm
View file @
5a3beced
...
...
@@ -94,7 +94,7 @@ sub fetch {
my
$dba
=
(
$parsed_url
->
{'
dbconn_part
'}
=~
m{^\w*:///$}
)
?
$default_dba
:
$class
->
create_cached_dba
(
@$parsed_url
{
qw(driver user pass host port dbname conn_params)
}
);
:
$class
->
create_cached_dba
(
@$parsed_url
{
qw(
dbconn_part
driver user pass host port dbname conn_params)
}
);
my
$table_name
=
$parsed_url
->
{'
table_name
'};
my
$tparam_name
=
$parsed_url
->
{'
tparam_name
'};
...
...
@@ -133,7 +133,7 @@ sub fetch {
}
sub
create_cached_dba
{
my
(
$class
,
$driver
,
$user
,
$pass
,
$host
,
$port
,
$dbname
,
$conn_params
)
=
@_
;
my
(
$class
,
$dbconn_part
,
$driver
,
$user
,
$pass
,
$host
,
$port
,
$dbname
,
$conn_params
)
=
@_
;
if
(
$driver
eq
'
mysql
')
{
$user
||=
'
ensro
';
...
...
@@ -160,7 +160,13 @@ sub create_cached_dba {
eval
"
require
$module
";
$_URLFactory_global_instance
->
{
$connectionKey
}
=
$dba
=
$module
->
new
(
$_URLFactory_global_instance
->
{
$connectionKey
}
=
$dba
=
$type
eq
'
hive
'
?
$module
->
new
(
-
url
=>
$dbconn_part
,
-
disconnect_when_inactive
=>
$discon
,
-
no_sql_schema_version_check
=>
$nosqlvc
,
)
:
$module
->
new
(
-
driver
=>
$driver
,
-
host
=>
$host
,
-
port
=>
$port
,
...
...
@@ -169,7 +175,6 @@ sub create_cached_dba {
-
dbname
=>
$dbname
,
-
species
=>
$dbname
,
-
disconnect_when_inactive
=>
$discon
,
-
no_sql_schema_version_check
=>
$nosqlvc
,
);
}
return
$dba
;
...
...
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