Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't change ownership of the file during trim binlog #1107

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion sql/binlog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8227,7 +8227,9 @@ int MYSQL_BIN_LOG::open_binlog(const char *opt_name) {
// NO_LINT_DEBUG
sql_print_error("Taking backup from %s to %s\n", log_name,
backup_file);
if (my_copy(log_name, backup_file, MYF(MY_WME))) {
/* MY_HOLD_ORIGINAL_MODES prevents attempts to chown the file */
if (my_copy(log_name, backup_file,
MYF(MY_WME | MY_HOLD_ORIGINAL_MODES))) {
// NO_LINT_DEBUG
sql_print_error(
"Could not take backup of the truncated binlog file %s",
Expand Down