1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Port cleanups, trivial refactoring and code rearrangements from

Alik's patch for BUG#22306: STOP INSTANCE can not be applied for 
instances in Crashed, Failed and Abandoned" to ease review process.
Evaluate global variable linuxthreads before starting threads to avoid
a race.


server-tools/instance-manager/buffer.cc:
  Fix spelling.
server-tools/instance-manager/command.h:
  Fix spelling.
server-tools/instance-manager/commands.cc:
  Fix spelling.
server-tools/instance-manager/commands.h:
  Fix spelling, tidy up.
server-tools/instance-manager/guardian.cc:
  Cleanup logging, options.get_shutdown_delay() is a method, tidy up.
server-tools/instance-manager/instance.cc:
  Rearrange methods to be the same as in Alik's patch, fix spelling errors,
  clean up logging texts, port comments from Alik's patch, 
  implement some basic renames from his patch.
  No real changes.
server-tools/instance-manager/instance.h:
  Tidy up, renames.
server-tools/instance-manager/instance_map.cc:
  Fix spellings, port some refactoring from Alik's patch.
server-tools/instance-manager/instance_map.h:
  Cleanup.
server-tools/instance-manager/instance_options.cc:
  Cleanup. Implement Instance_options::get_shutdown_delay() and
  Instance_options::get_mysqld_port().
server-tools/instance-manager/instance_options.h:
  Cleanup.
server-tools/instance-manager/listener.cc:
  Cleanup.
server-tools/instance-manager/log.cc:
  Fix spelling.
server-tools/instance-manager/manager.cc:
  Cleanup.
server-tools/instance-manager/manager.h:
  Add getters for Manager members.
server-tools/instance-manager/mysqlmanager.cc:
  Evaluate linuxthreads before starting threads to avoid a race.
server-tools/instance-manager/parse_output.cc:
  Fix spelling.
server-tools/instance-manager/priv.cc:
  Cleanup.
server-tools/instance-manager/priv.h:
  Cleanup.
server-tools/instance-manager/user_management_commands.cc:
  Fix spelling.
server-tools/instance-manager/user_management_commands.h:
  Fix spelling.
server-tools/instance-manager/user_map.cc:
  Fix spelling.
This commit is contained in:
unknown
2006-11-18 01:34:44 +03:00
parent 08df05560e
commit c95482d453
22 changed files with 671 additions and 585 deletions

View File

@ -85,14 +85,7 @@ void Listener::run()
log_info("Listener: started.");
#ifndef __WIN__
/* we use this var to check whether we are running on LinuxThreads */
pid_t thread_pid;
thread_pid= getpid();
struct sockaddr_un unix_socket_address;
/* set global variable */
linuxthreads= (thread_pid != manager_pid);
#endif
thread_registry->register_thread(&thread_info);
@ -151,10 +144,12 @@ void Listener::run()
{
set_no_inherit(client_fd);
Vio *vio= vio_new(client_fd, socket_index == 0 ?
VIO_TYPE_SOCKET : VIO_TYPE_TCPIP,
socket_index == 0 ? 1 : 0);
if (vio != 0)
struct st_vio *vio=
vio_new(client_fd,
socket_index == 0 ? VIO_TYPE_SOCKET : VIO_TYPE_TCPIP,
socket_index == 0 ? 1 : 0);
if (vio != NULL)
handle_new_mysql_connection(vio);
else
{
@ -318,12 +313,12 @@ create_unix_socket(struct sockaddr_un &unix_socket_address)
/*
Create new mysql connection. Created thread is responsible for deletion of
the Mysql_connection_thread_args and Vio instances passed to it.
SYNOPSYS
the Mysql_connection and Vio instances passed to it.
SYNOPSIS
handle_new_mysql_connection()
*/
void Listener::handle_new_mysql_connection(Vio *vio)
void Listener::handle_new_mysql_connection(struct st_vio *vio)
{
Mysql_connection *mysql_connection=
new Mysql_connection(thread_registry, user_map,