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
adddb734
Commit
adddb734
authored
Apr 18, 2016
by
Matthieu Muffato
Browse files
bugfix: a file should be created even if there is nothing to dump
parent
82bf15a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
modules/Bio/EnsEMBL/Hive/RunnableDB/DatabaseDumper.pm
modules/Bio/EnsEMBL/Hive/RunnableDB/DatabaseDumper.pm
+9
-3
No files found.
modules/Bio/EnsEMBL/Hive/RunnableDB/DatabaseDumper.pm
View file @
adddb734
...
...
@@ -186,8 +186,14 @@ sub run {
print
"
tables:
",
scalar
(
@$tables
),
"
",
join
('
/
',
@$tables
),
"
\n
"
if
$self
->
debug
;
print
"
ignores:
",
scalar
(
@$ignores
),
"
",
join
('
/
',
@$ignores
),
"
\n
"
if
$self
->
debug
;
# We have to exclude everything
return
if
(
$self
->
param
('
exclude_ehive
')
and
$self
->
param
('
exclude_list
')
and
scalar
(
@$ignores
)
==
$self
->
param
('
nb_ehive_tables
'));
my
@options
=
qw(--skip-lock-tables)
;
# Without any table names, mysqldump thinks that it should dump
# everything. We need to add special arguments to handle this
if
(
$self
->
param
('
exclude_ehive
')
and
$self
->
param
('
exclude_list
')
and
scalar
(
@$ignores
)
==
$self
->
param
('
nb_ehive_tables
'))
{
print
"
everything is excluded, nothing to dump !
\n
"
if
$self
->
debug
;
push
@options
,
qw(--no-create-info --no-data)
;
$ignores
=
[]
;
# to clean-up the command-line
}
# mysqldump command
my
$output
=
"";
...
...
@@ -204,7 +210,7 @@ sub run {
my
$cmd
=
join
('
',
'
mysqldump
',
$self
->
mysql_conn_from_dbc
(
$src_dbc
),
'
--skip-lock-tables
'
,
@options
,
@$tables
,
(
map
{
sprintf
('
--ignore-table=%s.%s
',
$src_dbc
->
dbname
,
$_
)}
@$ignores
),
$output
...
...
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