Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
b1463249
Commit
b1463249
authored
Jul 26, 2006
by
iggy@rolltop.ignatz42.dyndns.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #18777: Mysqlhotcopy does not copy all the direcories.
parent
23c2570a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
scripts/mysqlhotcopy.sh
scripts/mysqlhotcopy.sh
+4
-3
No files found.
scripts/mysqlhotcopy.sh
View file @
b1463249
...
...
@@ -262,6 +262,7 @@ my $hc_locks = "";
my
$hc_tables
=
""
;
my
$num_tables
=
0
;
my
$num_files
=
0
;
my
$raid_dir_regex
=
'[A-Za-z0-9]{2}'
;
foreach my
$rdb
(
@db_desc
)
{
my
$db
=
$rdb
->
{
src
}
;
...
...
@@ -296,7 +297,7 @@ foreach my $rdb ( @db_desc ) {
my @raid_dir
=
()
;
while
(
defined
(
my
$name
=
readdir DBDIR
)
)
{
if
(
$name
=
~ /^
\d\d
$/
&&
-d
"
$db_dir
/
$name
"
)
{
if
(
$name
=
~ /^
$raid_dir_regex
$/
&&
-d
"
$db_dir
/
$name
"
)
{
push @raid_dir,
$name
;
}
else
{
...
...
@@ -604,7 +605,7 @@ sub copy_files {
# add recursive option for scp
$cp
.
=
" -r"
if
$^
O
=
~ /m^
(
solaris|linux|freebsd|darwin
)
$/
&&
$method
=
~ /^scp
\b
/
;
my @non_raid
=
map
{
"'
$_
'"
}
grep
{
!
m:/
\d
{
2
}
/[^/]+
$:
}
@
$files
;
my @non_raid
=
map
{
"'
$_
'"
}
grep
{
!
m:/
$raid_dir_regex
/[^/]+
$:
}
@
$files
;
# add files to copy and the destination directory
safe_system
(
$cp
, @non_raid,
"'
$target
'"
)
if
(
@non_raid
)
;
...
...
@@ -797,7 +798,7 @@ sub get_raid_dirs {
my %dirs
=
()
;
foreach my
$f
(
@
$r_files
)
{
if
(
$f
=
~ m:^
(
\d\d
)
/:
)
{
if
(
$f
=
~ m:^
(
$raid_dir_regex
)
/:
)
{
$dirs
{
$1
}
=
1
;
}
}
...
...
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