diff options
author | Bjorn Munch <bjorn.munch@oracle.com> | 2011-11-03 15:57:18 +0100 |
---|---|---|
committer | Bjorn Munch <bjorn.munch@oracle.com> | 2011-11-03 15:57:18 +0100 |
commit | 40f42cac72a93c0836373619ed1344a5c38faf13 (patch) | |
tree | 4ea28c6fe82172950f39e1cdce8aecc85221fb03 /client | |
parent | 4f2bbf781ba1bb5d8a422c17cbc2a743c4788f54 (diff) | |
download | mariadb-git-40f42cac72a93c0836373619ed1344a5c38faf13.tar.gz |
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.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc index f0184e5297b..30aa50da2ad 100644 --- a/client/mysqltest.cc +++ b/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); |