Browse Source

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.
pull/374/head
Bjorn Munch 14 years ago
parent
commit
40f42cac72
  1. 3
      client/mysqltest.cc

3
client/mysqltest.cc

@ -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));
/* MY_HOLD_ORIGINAL_MODES prevents attempts to chown the file */
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);
dynstr_free(&ds_from_file);
dynstr_free(&ds_to_file);

Loading…
Cancel
Save