diff options
author | unknown <knielsen@mysql.com> | 2006-06-23 14:52:04 +0200 |
---|---|---|
committer | unknown <knielsen@mysql.com> | 2006-06-23 14:52:04 +0200 |
commit | 3728f43cf830970a592bfa0559f2f29a1effbeef (patch) | |
tree | f6c1936ce1377361741393b01fd81d8f5af19ad7 /server-tools | |
parent | 0f0e518e74d91804504af52cf280c566823f6699 (diff) | |
parent | 0f3cc95bf1523754d21cc3a4c59c0d107adc1c16 (diff) | |
download | mariadb-git-3728f43cf830970a592bfa0559f2f29a1effbeef.tar.gz |
Merge mysql.com:/usr/local/mysql/mysql-5.0-bug20622
into mysql.com:/usr/local/mysql/tmp-5.0
Diffstat (limited to 'server-tools')
-rw-r--r-- | server-tools/instance-manager/instance_options.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/server-tools/instance-manager/instance_options.cc b/server-tools/instance-manager/instance_options.cc index 9389694822a..72621ed1662 100644 --- a/server-tools/instance-manager/instance_options.cc +++ b/server-tools/instance-manager/instance_options.cc @@ -391,8 +391,13 @@ int Instance_options::complete_initialization(const char *default_path, const char *tmp; char *end; - if (!mysqld_path && !(mysqld_path= strdup_root(&alloc, default_path))) - goto err; + if (!mysqld_path) + { + // Need one extra byte, as convert_dirname() adds a slash at the end. + if (!(mysqld_path= alloc_root(&alloc, strlen(default_path) + 2))) + goto err; + strcpy((char *)mysqld_path, default_path); + } // it's safe to cast this to char* since this is a buffer we are allocating end= convert_dirname((char*)mysqld_path, mysqld_path, NullS); |