diff options
author | unknown <reggie@fedora.(none)> | 2005-10-31 13:31:06 -0500 |
---|---|---|
committer | unknown <reggie@fedora.(none)> | 2005-10-31 13:31:06 -0500 |
commit | 0125760fc86c6f0621e696c3384a2c0b3d7dd195 (patch) | |
tree | 64bbde3c4a6d3de2054e56588e1568409ea3b5b2 /server-tools/instance-manager/instance_options.cc | |
parent | 11632315c8493725bc80b160dfd3036f15b5a2cf (diff) | |
download | mariadb-git-0125760fc86c6f0621e696c3384a2c0b3d7dd195.tar.gz |
fix some issues with IM and long pathnames (with spaces)
server-tools/instance-manager/instance_options.cc:
small cleanup
-and-
convert mysqld_path to the proper syntax after reading
server-tools/instance-manager/parse_output.cc:
stop using get_word since it stops at spaces. Now we just read the entire line and trim spaces.
Diffstat (limited to 'server-tools/instance-manager/instance_options.cc')
-rw-r--r-- | server-tools/instance-manager/instance_options.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/server-tools/instance-manager/instance_options.cc b/server-tools/instance-manager/instance_options.cc index 25609f489af..850530b35fc 100644 --- a/server-tools/instance-manager/instance_options.cc +++ b/server-tools/instance-manager/instance_options.cc @@ -47,14 +47,12 @@ static inline int create_mysqld_command(Buffer *buf, if (buf->get_size()) /* malloc succeeded */ { #ifdef __WIN__ - buf->append(position, "\"", 1); - position++; + buf->append(position++, "\"", 1); #endif buf->append(position, mysqld_path_str, mysqld_path_len); position+= mysqld_path_len; #ifdef __WIN__ - buf->append(position, "\"", 1); - position++; + buf->append(position++, "\"", 1); #endif /* here the '\0' character is copied from the option string */ buf->append(position, option, option_len); @@ -340,6 +338,10 @@ int Instance_options::complete_initialization(const char *default_path, if (!mysqld_path && !(mysqld_path= strdup_root(&alloc, default_path))) goto err; + // it's safe to cast this to char* since this is a buffer we are allocating + char* end= convert_dirname((char*)mysqld_path, mysqld_path, NullS); + end[-1] = 0; + mysqld_path_len= strlen(mysqld_path); if (mysqld_port) |