diff options
author | Alexey Kopytov <Alexey.Kopytov@sun.com> | 2009-02-27 11:26:06 +0200 |
---|---|---|
committer | Alexey Kopytov <Alexey.Kopytov@sun.com> | 2009-02-27 11:26:06 +0200 |
commit | 752cbab9a4c553871cab9e5fdb8968019617cc28 (patch) | |
tree | ede7660d1ce7a18f7267f3cd27a0fff7cbcc8675 /server-tools/instance-manager/instance_map.cc | |
parent | d16c7dd1829e7dcfa2ef119fa04d090981936d09 (diff) | |
download | mariadb-git-752cbab9a4c553871cab9e5fdb8968019617cc28.tar.gz |
Fix for bug #40552: Race condition around default_directories
in load_defaults()
load_defaults(), my_search_option_files() and
my_print_default_files() utilized a global variable
containing a pointer to thread local memory. This could lead
to race conditions when those functions were called with high
concurrency.
Fixed by changing the interface of the said functions to avoid
the necessity for using a global variable.
Since we cannot change load_defaults() prototype for API
compatibility reasons, it was renamed my_load_defaults().
Now load_defaults() is a thread-unsafe wrapper around
a thread-safe version, my_load_defaults().
Diffstat (limited to 'server-tools/instance-manager/instance_map.cc')
-rw-r--r-- | server-tools/instance-manager/instance_map.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server-tools/instance-manager/instance_map.cc b/server-tools/instance-manager/instance_map.cc index d7328d51cfe..b137370b50a 100644 --- a/server-tools/instance-manager/instance_map.cc +++ b/server-tools/instance-manager/instance_map.cc @@ -536,7 +536,8 @@ int Instance_map::load() */ if (my_search_option_files(Options::Main::config_file, &argc, (char ***) &argv, &args_used, - process_option, (void*) this)) + process_option, (void*) this, + Options::default_directories)) log_info("Falling back to compiled-in defaults."); return complete_initialization(); |