Skip to content

Commit

Permalink
set the os_innodb_umask to default value when reset
Browse files Browse the repository at this point in the history
  • Loading branch information
Aibek Bukabayev committed Jul 29, 2024
1 parent 5880fef commit 6ed6532
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion storage/innobase/include/os0file.h
Original file line number Diff line number Diff line change
Expand Up @@ -1772,7 +1772,7 @@ constexpr mode_t os_innodb_umask_default = std::numeric_limits<mode_t>::max();
#ifdef XTRABACKUP
/** We need to allow resetting the umask in case of xtrabackup.
*/
void os_file_allow_reset_umask();
void os_file_reset_umask();
#endif /* XTRABACKUP */

#endif
Expand Down
5 changes: 4 additions & 1 deletion storage/innobase/os/os0file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7891,7 +7891,10 @@ void os_file_set_umask(mode_t umask) {
}

#ifdef XTRABACKUP
void os_file_allow_reset_umask() { umask_was_already_set = false; }
void os_file_reset_umask() {
umask_was_already_set = false;
os_innodb_umask = my_umask;
}
#endif /* XTRABACKUP */

#endif
Expand Down
2 changes: 1 addition & 1 deletion storage/innobase/xtrabackup/src/xtrabackup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2036,7 +2036,7 @@ static bool innodb_init_param(void) {
}
}

os_file_allow_reset_umask();
os_file_reset_umask();

os_file_set_umask((ulint)0664);

Expand Down

0 comments on commit 6ed6532

Please sign in to comment.