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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
bb7ab405
Commit
bb7ab405
authored
Sep 13, 2017
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mariabackup : Fix enumerate_ibd_files() to include .isl
parent
a8b3c603
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
13 deletions
+10
-13
extra/mariabackup/backup_copy.cc
extra/mariabackup/backup_copy.cc
+0
-1
extra/mariabackup/xtrabackup.cc
extra/mariabackup/xtrabackup.cc
+9
-11
extra/mariabackup/xtrabackup.h
extra/mariabackup/xtrabackup.h
+1
-1
No files found.
extra/mariabackup/backup_copy.cc
View file @
bb7ab405
...
@@ -594,7 +594,6 @@ trim_dotslash(const char *path)
...
@@ -594,7 +594,6 @@ trim_dotslash(const char *path)
/************************************************************************
/************************************************************************
Check if string ends with given suffix.
Check if string ends with given suffix.
@return true if string ends with given suffix. */
@return true if string ends with given suffix. */
static
bool
bool
ends_with
(
const
char
*
str
,
const
char
*
suffix
)
ends_with
(
const
char
*
str
,
const
char
*
suffix
)
{
{
...
...
extra/mariabackup/xtrabackup.cc
View file @
bb7ab405
...
@@ -2771,14 +2771,12 @@ static dberr_t enumerate_ibd_files(process_single_tablespace_func_t callback)
...
@@ -2771,14 +2771,12 @@ static dberr_t enumerate_ibd_files(process_single_tablespace_func_t callback)
ret
=
fil_file_readdir_next_file
(
&
err
,
fil_path_to_mysql_datadir
,
dir
,
ret
=
fil_file_readdir_next_file
(
&
err
,
fil_path_to_mysql_datadir
,
dir
,
&
dbinfo
);
&
dbinfo
);
while
(
ret
==
0
)
{
while
(
ret
==
0
)
{
size_t
len
=
strlen
(
dbinfo
.
name
);
/* General tablespaces are always at the first level of the
/* General tablespaces are always at the first level of the
data home dir */
data home dir */
if
(
dbinfo
.
type
==
OS_FILE_TYPE_FILE
&&
len
>
4
)
{
if
(
dbinfo
.
type
==
OS_FILE_TYPE_FILE
)
{
bool
is_isl
=
!
strcmp
(
dbinfo
.
name
+
len
-
4
,
".isl"
);
bool
is_isl
=
ends_with
(
dbinfo
.
name
,
".isl"
);
bool
is_ibd
=
!
is_isl
bool
is_ibd
=
!
is_isl
&&
ends_with
(
dbinfo
.
name
,
".ibd"
);
&&
!
strcmp
(
dbinfo
.
name
+
len
-
4
,
".ibd"
);
if
(
is_isl
||
is_ibd
)
{
if
(
is_isl
||
is_ibd
)
{
(
*
callback
)(
NULL
,
dbinfo
.
name
,
is_isl
);
(
*
callback
)(
NULL
,
dbinfo
.
name
,
is_isl
);
...
@@ -2794,7 +2792,7 @@ static dberr_t enumerate_ibd_files(process_single_tablespace_func_t callback)
...
@@ -2794,7 +2792,7 @@ static dberr_t enumerate_ibd_files(process_single_tablespace_func_t callback)
/* We found a symlink or a directory; try opening it to see
/* We found a symlink or a directory; try opening it to see
if a symlink is a directory */
if a symlink is a directory */
len
=
strlen
(
fil_path_to_mysql_datadir
)
size_t
len
=
strlen
(
fil_path_to_mysql_datadir
)
+
strlen
(
dbinfo
.
name
)
+
2
;
+
strlen
(
dbinfo
.
name
)
+
2
;
if
(
len
>
dbpath_len
)
{
if
(
len
>
dbpath_len
)
{
dbpath_len
=
len
;
dbpath_len
=
len
;
...
@@ -2837,16 +2835,16 @@ static dberr_t enumerate_ibd_files(process_single_tablespace_func_t callback)
...
@@ -2837,16 +2835,16 @@ static dberr_t enumerate_ibd_files(process_single_tablespace_func_t callback)
size_t
len
=
strlen
(
fileinfo
.
name
);
size_t
len
=
strlen
(
fileinfo
.
name
);
/* We found a symlink or a file */
/* We found a symlink or a file */
if
(
len
>
4
if
(
len
>
4
)
{
&&
!
strcmp
(
fileinfo
.
name
+
len
-
4
,
bool
is_isl
=
false
;
".ibd"
))
{
if
(
ends_with
(
fileinfo
.
name
,
".ibd"
)
||
((
is_isl
=
ends_with
(
fileinfo
.
name
,
".ibd"
))))
(
*
callback
)(
dbinfo
.
name
,
fileinfo
.
name
,
false
);
(
*
callback
)(
dbinfo
.
name
,
fileinfo
.
name
,
is_isl
);
}
}
}
}
if
(
0
!=
os_file_closedir
(
dbdir
))
{
if
(
0
!=
os_file_closedir
(
dbdir
))
{
fprintf
(
stderr
,
"InnoDB: Warning: could not"
fprintf
(
stderr
,
"InnoDB: Warning: could not"
" close database directory %s
\n
"
,
" close database directory %s
\n
"
,
dbpath
);
dbpath
);
err
=
DB_ERROR
;
err
=
DB_ERROR
;
...
...
extra/mariabackup/xtrabackup.h
View file @
bb7ab405
...
@@ -196,5 +196,5 @@ xb_get_copy_action(const char *dflt = "Copying");
...
@@ -196,5 +196,5 @@ xb_get_copy_action(const char *dflt = "Copying");
void
mdl_lock_init
();
void
mdl_lock_init
();
void
mdl_lock_table
(
ulint
space_id
);
void
mdl_lock_table
(
ulint
space_id
);
void
mdl_unlock_all
();
void
mdl_unlock_all
();
bool
ends_with
(
const
char
*
str
,
const
char
*
suffix
);
#endif
/* XB_XTRABACKUP_H */
#endif
/* XB_XTRABACKUP_H */
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