Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
465e3375
Commit
465e3375
authored
17 years ago
by
Nathan Johnson
Browse files
Options
Downloads
Patches
Plain Diff
explicitly set tables to stop server wide flushing
parent
0cb8004f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc-scripts/CopyDBoverServer.pl
+19
-3
19 additions, 3 deletions
misc-scripts/CopyDBoverServer.pl
with
19 additions
and
3 deletions
misc-scripts/CopyDBoverServer.pl
+
19
−
3
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment