diff options
author | unknown <knielsen@rt.int.sifira.dk> | 2006-06-23 15:05:15 +0200 |
---|---|---|
committer | unknown <knielsen@rt.int.sifira.dk> | 2006-06-23 15:05:15 +0200 |
commit | 83f16e31da4fac73343911c59ff8fef1b3dc556b (patch) | |
tree | 70f9d8c45d74bad9cd3290e4ab9cec191f872d23 /server-tools | |
parent | 2deb5a611ab594d0601b2d3adbf67d5e9a2922ba (diff) | |
parent | 46d19b740926d22ffa7bd3a89be81164d09b366d (diff) | |
download | mariadb-git-83f16e31da4fac73343911c59ff8fef1b3dc556b.tar.gz |
Merge mysql.com:/usr/local/mysql/mysql-5.1-vg-apr2
into mysql.com:/usr/local/mysql/tmp-5.1
server-tools/instance-manager/instance_options.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/rpl_injector.cc:
Auto merged
sql/rpl_injector.h:
Auto merged
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 7b3f435eae5..576096adfd2 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); |