Commit f58142f6 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Mariabackup : don't change argv[0] to "innobackupex" in innobackupex mode.

addr2line utility optionally used to output stacktrace relies relies on
correct my_progname, which is initialized from argv[0] from main function.
Thus, changing argv[0] can confuse stacktrace output.
parent 9284e8b2
...@@ -6399,8 +6399,7 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server) ...@@ -6399,8 +6399,7 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server)
for (n = 0; (*argv_client)[n]; n++) {}; for (n = 0; (*argv_client)[n]; n++) {};
argc_client = n; argc_client = n;
if (strcmp(base_name(my_progname), INNOBACKUPEX_BIN_NAME) == 0 && if (innobackupex_mode && argc_client > 0) {
argc_client > 0) {
/* emulate innobackupex script */ /* emulate innobackupex script */
innobackupex_mode = true; innobackupex_mode = true;
if (!ibx_handle_options(&argc_client, argv_client)) { if (!ibx_handle_options(&argc_client, argv_client)) {
...@@ -6451,7 +6450,6 @@ int main(int argc, char **argv) ...@@ -6451,7 +6450,6 @@ int main(int argc, char **argv)
{ {
argv++; argv++;
argc--; argc--;
argv[0] = INNOBACKUPEX_EXE;
innobackupex_mode = true; innobackupex_mode = true;
} }
......
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