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-test
Commits
8a50124f
Commit
8a50124f
authored
Jul 05, 2017
by
Alessandro Vullo
Committed by
GitHub
Jul 05, 2017
Browse files
Merge pull request #15 from danstaines/master
eval SQL statement to catch and report failures to aid debugging
parents
ffdf6f03
7f5f2900
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
modules/Bio/EnsEMBL/Test/MultiTestDB.pm
modules/Bio/EnsEMBL/Test/MultiTestDB.pm
+6
-1
No files found.
modules/Bio/EnsEMBL/Test/MultiTestDB.pm
View file @
8a50124f
...
...
@@ -465,7 +465,12 @@ sub load_sql {
my
@statements
=
split
(
/;/
,
$sql_com
);
$db
->
do
("
set foreign_key_checks = 0
")
if
$self
->
db_conf
->
{
driver
}
=~
/mysql/
;
foreach
my
$sql
(
@statements
)
{
$db
->
do
(
$sql
);
eval
{
$db
->
do
(
$sql
);
};
if
(
$@
)
{
throw
"
Could not execute SQL:
$sql
\n
";
}
}
$db
->
do
("
set foreign_key_checks = 1
")
if
$self
->
db_conf
->
{
driver
}
=~
/mysql/
;
...
...
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