Commit 481d6433 authored by Bjorn Munch's avatar Bjorn Munch

Bug #13096353 62712: RPM-BASED INSTALL OF THE TEST SUITE IS USELESS FOR NON-ROOT USERS

  Simplified fix avoiding changes to mysys:
  Use the MY_HOLD_ORIGINAL_MODES flag when calling my_copy(),
    this also stops it from attempting to chown() the file.
  Yes this behavior is a bit confusing....
  The only case this might change the behavior is if the destination file
    exists, but since we also use MY_DONT_OVERWRITE_FILE, it would fail
    in those cases anyway.
parent cf679e6b
...@@ -3344,8 +3344,9 @@ void do_copy_file(struct st_command *command) ...@@ -3344,8 +3344,9 @@ void do_copy_file(struct st_command *command)
' '); ' ');
DBUG_PRINT("info", ("Copy %s to %s", ds_from_file.str, ds_to_file.str)); DBUG_PRINT("info", ("Copy %s to %s", ds_from_file.str, ds_to_file.str));
/* MY_HOLD_ORIGINAL_MODES prevents attempts to chown the file */
error= (my_copy(ds_from_file.str, ds_to_file.str, error= (my_copy(ds_from_file.str, ds_to_file.str,
MYF(MY_DONT_OVERWRITE_FILE)) != 0); MYF(MY_DONT_OVERWRITE_FILE | MY_HOLD_ORIGINAL_MODES)) != 0);
handle_command_error(command, error); handle_command_error(command, error);
dynstr_free(&ds_from_file); dynstr_free(&ds_from_file);
dynstr_free(&ds_to_file); dynstr_free(&ds_to_file);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment