diff options
author | unknown <petr@mysql.com> | 2004-11-02 10:11:03 +0300 |
---|---|---|
committer | unknown <petr@mysql.com> | 2004-11-02 10:11:03 +0300 |
commit | 7a3a757fd5169cda75c2130cdd30457f7c8d2ee8 (patch) | |
tree | 73116f6a494156a8064c81fb3da137ffd2210295 /server-tools/instance-manager/commands.cc | |
parent | 3691a8a426787e8f7a9b902d6cb6ab28ec20697a (diff) | |
download | mariadb-git-7a3a757fd5169cda75c2130cdd30457f7c8d2ee8.tar.gz |
post-review fixes
server-tools/instance-manager/Makefile.am:
Removed entry for deleted file
server-tools/instance-manager/buffer.cc:
cleanup
server-tools/instance-manager/commands.cc:
cleanup, added missing error handling
server-tools/instance-manager/instance.cc:
added waitpid in instance_start, added few checks
server-tools/instance-manager/instance_map.cc:
error handling for hash_init added
server-tools/instance-manager/instance_map.h:
Extended constructor
server-tools/instance-manager/instance_options.cc:
made add_option less bulky
server-tools/instance-manager/instance_options.h:
-
server-tools/instance-manager/listener.cc:
added missing close, fixed typo
server-tools/instance-manager/manager.cc:
moved some Instance_map initialization to costructor
server-tools/instance-manager/protocol.cc:
error handling added
server-tools/instance-manager/protocol.h:
store_to_string fixed to return a value
server-tools/instance-manager/user_map.cc:
error handling for hash_init added
server-tools/instance-manager/user_map.h:
added init() for User map (becouse of the hash_init check)
Diffstat (limited to 'server-tools/instance-manager/commands.cc')
-rw-r--r-- | server-tools/instance-manager/commands.cc | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/server-tools/instance-manager/commands.cc b/server-tools/instance-manager/commands.cc index 102a3df00e5..50f7bea7daf 100644 --- a/server-tools/instance-manager/commands.cc +++ b/server-tools/instance-manager/commands.cc @@ -184,14 +184,17 @@ int Show_instance_status::do_command(struct st_net *net, } - my_net_write(net, send_buff.buffer, (uint) position); + if (my_net_write(net, send_buff.buffer, (uint) position)) + goto err; } send_eof(net); net_flush(net); -err: return 0; + +err: + return 1; } @@ -258,7 +261,8 @@ int Show_instance_options::do_command(struct st_net *net, goto err; store_to_string(&send_buff, (char *) "instance_name", &position); store_to_string(&send_buff, (char *) instance_name, &position); - my_net_write(net, send_buff.buffer, (uint) position); + if (my_net_write(net, send_buff.buffer, (uint) position)) + goto err; if (instance->options.mysqld_path != NULL) { position= 0; @@ -266,7 +270,17 @@ int Show_instance_options::do_command(struct st_net *net, store_to_string(&send_buff, (char *) instance->options.mysqld_path, &position); - my_net_write(net, send_buff.buffer, (uint) position); + if (my_net_write(net, send_buff.buffer, (uint) position)) + goto err; + } + + if (instance->options.is_guarded != NULL) + { + position= 0; + store_to_string(&send_buff, (char *) "guarded", &position); + store_to_string(&send_buff, "", &position); + if (my_net_write(net, send_buff.buffer, (uint) position)) + goto err; } if (instance->options.mysqld_user != NULL) @@ -276,7 +290,8 @@ int Show_instance_options::do_command(struct st_net *net, store_to_string(&send_buff, (char *) instance->options.mysqld_user, &position); - my_net_write(net, send_buff.buffer, (uint) position); + if (my_net_write(net, send_buff.buffer, (uint) position)) + goto err; } if (instance->options.mysqld_password != NULL) @@ -286,7 +301,8 @@ int Show_instance_options::do_command(struct st_net *net, store_to_string(&send_buff, (char *) instance->options.mysqld_password, &position); - my_net_write(net, send_buff.buffer, (uint) position); + if (my_net_write(net, send_buff.buffer, (uint) position)) + goto err; } /* loop through the options stored in DYNAMIC_ARRAY */ @@ -302,7 +318,8 @@ int Show_instance_options::do_command(struct st_net *net, store_to_string(&send_buff, option_value + 1, &position); /* join name and the value into the same option again */ *option_value= '='; - my_net_write(net, send_buff.buffer, (uint) position); + if (my_net_write(net, send_buff.buffer, (uint) position)) + goto err; } } |