mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
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)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user