mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Bug #59489 Enable setting of env. variables for mysqld from mtr
Added --mysqld-env option, propagate via safe_process Simplified: should be safe to set in parent safe_process after it's started Addendum: catch cases of --mysqld-env w/o value, assume env.var name never begins with "--"
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -175,7 +175,7 @@ int main(int argc, char* const argv[] )
|
||||
} else {
|
||||
if ( strcmp(arg, "--verbose") == 0 )
|
||||
verbose++;
|
||||
else if ( strncmp(arg, "--parent-pid", 10) == 0 )
|
||||
else if ( strncmp(arg, "--parent-pid", 12) == 0 )
|
||||
{
|
||||
/* Override parent_pid with a value provided by user */
|
||||
const char* start;
|
||||
@ -184,10 +184,15 @@ int main(int argc, char* const argv[] )
|
||||
start++; /* Step past = */
|
||||
if ((parent_pid= atoi(start)) == 0)
|
||||
die("Invalid value '%s' passed to --parent-id", start);
|
||||
} else if ( strcmp(arg, "--nocore") == 0 )
|
||||
}
|
||||
else if ( strcmp(arg, "--nocore") == 0 )
|
||||
{
|
||||
nocore = true; // Don't allow the process to dump core
|
||||
}
|
||||
else if ( strncmp (arg, "--env ", 6) == 0 )
|
||||
{
|
||||
putenv(strdup(arg+6));
|
||||
}
|
||||
else
|
||||
die("Unknown option: %s", arg);
|
||||
}
|
||||
|
Reference in New Issue
Block a user