Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
57d58604
Commit
57d58604
authored
Nov 09, 2017
by
Brandon Walts
Browse files
set MySQLTransfer.pm to dump with --skip-lock-tables as a param-overridable default
parent
6ceb21c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
modules/Bio/EnsEMBL/Hive/RunnableDB/MySQLTransfer.pm
modules/Bio/EnsEMBL/Hive/RunnableDB/MySQLTransfer.pm
+5
-0
No files found.
modules/Bio/EnsEMBL/Hive/RunnableDB/MySQLTransfer.pm
View file @
57d58604
...
...
@@ -54,6 +54,7 @@ sub param_defaults {
'
table
'
=>
'',
'
where
'
=>
undef
,
'
filter_cmd
'
=>
undef
,
'
lock_tables
'
=>
0
,
};
}
...
...
@@ -73,6 +74,8 @@ sub param_defaults {
param('table'): table name to be copied/merged.
param('lock_tables'): [boolean] when 1, lock tables when dumping the source database. Default if not set (or set to 0) is to not lock (runs mysqldump with --skip-lock-tables)
=cut
sub
fetch_input
{
...
...
@@ -120,9 +123,11 @@ sub run {
my
$table
=
$self
->
param
('
table
');
my
$where
=
$self
->
param
('
where
');
my
$filter_cmd
=
$self
->
param
('
filter_cmd
');
my
$lock_tables
=
$self
->
param
('
lock_tables
');
my
$cmd
=
'
mysqldump
'
.
{
'
overwrite
'
=>
'',
'
topup
'
=>
'
--no-create-info
',
'
insertignore
'
=>
'
--no-create-info --insert-ignore
'
}
->
{
$mode
}
.
(
$lock_tables
?
''
:
'
--skip-lock-tables
')
.
$self
->
mysql_conn_from_dbc
(
$src_dbc
)
.
"
$table
"
.
(
defined
(
$where
)
?
"
--where '
$where
'
"
:
'')
...
...
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