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
Commits
465e3375
Commit
465e3375
authored
Mar 17, 2008
by
Nathan Johnson
Browse files
explicitly set tables to stop server wide flushing
parent
0cb8004f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
misc-scripts/CopyDBoverServer.pl
misc-scripts/CopyDBoverServer.pl
+19
-3
No files found.
misc-scripts/CopyDBoverServer.pl
View file @
465e3375
...
...
@@ -246,9 +246,25 @@ foreach my $db_to_copy (@dbs_to_copy) {
# flush tables; in the source server
unless
(
defined
$already_flushed
{
$db_to_copy
->
{
$flush_scope
}}
||
$noflush
)
{
print
STDERR
"
// flushing tables in
$db_to_copy
->{
$flush_scope
} (
"
.
&get_time
.
"
)...
\t
";
my
$flush_cmd
=
"
echo 'flush tables;' | mysql -h
$db_to_copy
->{src_srv} -u ensadmin -p
$pass
-P
$source_port
";
$flush_cmd
.=
'
'
.
$db_to_copy
->
{
src_db
}
if
$dbflush
;
#Is this sitll flushing the whole instance?
#Do we need to flush each individual table
#and reset the query cache?
print
STDERR
"
// flushing tables in
$db_to_copy
->{
$flush_scope
} (
"
.
&get_time
.
"
)...
\t
";
my
$flush_cmd
;
if
(
$dbflush
){
my
$tables_cmd
=
"
echo 'show tables;' | mysql -h
$db_to_copy
->{src_srv} -u ensadmin -p
$pass
-P
$source_port
$db_to_copy
->{src_db}
";
my
@tables
=
split
/\n/
,
`
$tables_cmd
`;
shift
@tables
;
#remove field header
$flush_cmd
=
"
echo 'flush tables
"
.
join
('
,
',
@tables
)
.
"
;' | mysql -h
$db_to_copy
->{src_srv} -u ensadmin -p
$pass
-P
$source_port
$db_to_copy
->{src_db}
";
}
else
{
$flush_cmd
=
"
echo 'flush tables;' | mysql -h
$db_to_copy
->{src_srv} -u ensadmin -p
$pass
-P
$source_port
";
#$flush_cmd .= ' '.$db_to_copy->{src_db} if $dbflush;
}
#Now flushes on db specific tables
#This was introduced to enable copying a an unused DB when others are being heavily used
...
...
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