mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
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.
This commit is contained in:
parent
4f2bbf781b
commit
40f42cac72
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue