diff options
author | unknown <knielsen@mysql.com> | 2006-06-23 14:59:40 +0200 |
---|---|---|
committer | unknown <knielsen@mysql.com> | 2006-06-23 14:59:40 +0200 |
commit | 46d19b740926d22ffa7bd3a89be81164d09b366d (patch) | |
tree | 3ae12f67ab3eb5ece06f5ed030192d8f1993b4e0 /server-tools | |
parent | 860c104d87424cb140d937fa2a19a5d406e264e9 (diff) | |
parent | 0f3cc95bf1523754d21cc3a4c59c0d107adc1c16 (diff) | |
download | mariadb-git-46d19b740926d22ffa7bd3a89be81164d09b366d.tar.gz |
Merge mysql.com:/usr/local/mysql/mysql-5.0-bug20622
into mysql.com:/usr/local/mysql/mysql-5.1-vg-apr2
mysys/mf_dirname.c:
Auto merged
server-tools/instance-manager/instance_options.cc:
Manual merge.
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 b05e40734b7..c10819b51b8 100644 --- a/server-tools/instance-manager/instance_options.cc +++ b/server-tools/instance-manager/instance_options.cc @@ -420,8 +420,13 @@ int Instance_options::complete_initialization(const char *default_path) const char *tmp; char *end; - if (!mysqld_path.str && !(mysqld_path.str= strdup_root(&alloc, default_path))) - goto err; + if (!mysqld_path.str) + { + // Need one extra byte, as convert_dirname() adds a slash at the end. + if (!(mysqld_path.str= alloc_root(&alloc, strlen(default_path) + 2))) + goto err; + strcpy(mysqld_path.str, default_path); + } // it's safe to cast this to char* since this is a buffer we are allocating end= convert_dirname((char*)mysqld_path.str, mysqld_path.str, NullS); |