mariadb/server-tools/instance-manager/options.cc

192 lines
6.3 KiB
C++
Raw Normal View History

Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifdef __GNUC__
Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
#pragma implementation
#endif
#include "options.h"
#include <my_global.h>
#include <my_sys.h>
#include <my_getopt.h>
Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
#include "priv.h"
#define QUOTE2(x) #x
#define QUOTE(x) QUOTE2(x)
Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
char Options::run_as_service;
const char *Options::log_file_name= QUOTE(DEFAULT_LOG_FILE_NAME);
const char *Options::pid_file_name= QUOTE(DEFAULT_PID_FILE_NAME);
const char *Options::socket_file_name= QUOTE(DEFAULT_SOCKET_FILE_NAME);
Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
const char *Options::password_file_name= QUOTE(DEFAULT_PASSWORD_FILE_NAME);
const char *Options::default_mysqld_path= QUOTE(DEFAULT_MYSQLD_PATH);
const char *Options::default_admin_user= QUOTE(DEFAULT_USER);
const char *Options::default_admin_password= QUOTE(DEFAULT_PASSWORD);
const char *Options::bind_address= 0; /* No default value */
uint Options::monitoring_interval= DEFAULT_MONITORING_INTERVAL;
uint Options::port_number= DEFAULT_PORT;
/*
List of options, accepted by the instance manager.
List must be closed with empty option.
*/
enum options {
OPT_LOG= 256,
OPT_PID_FILE,
OPT_SOCKET,
Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
OPT_PASSWORD_FILE,
OPT_MYSQLD_PATH,
OPT_RUN_AS_SERVICE,
OPT_USER,
OPT_PASSWORD,
OPT_DEFAULT_ADMIN_USER,
OPT_DEFAULT_ADMIN_PASSWORD,
OPT_MONITORING_INTERVAL,
OPT_PORT,
OPT_BIND_ADDRESS
};
Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
static struct my_option my_long_options[] =
{
{ "help", '?', "Display this help and exit.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "log", OPT_LOG, "Path to log file. Used only with --run-as-service.",
(gptr *) &Options::log_file_name, (gptr *) &Options::log_file_name,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "pid-file", OPT_PID_FILE, "Pid file to use.",
(gptr *) &Options::pid_file_name, (gptr *) &Options::pid_file_name,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
{ "socket", OPT_SOCKET, "Socket file to use for connection.",
(gptr *) &Options::socket_file_name, (gptr *) &Options::socket_file_name,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "bind-address", OPT_BIND_ADDRESS, "Bind address to use for connection.",
Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
(gptr *) &Options::bind_address, (gptr *) &Options::bind_address,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "port", OPT_PORT, "Port number to use for connections",
(gptr *) &Options::port_number, (gptr *) &Options::port_number,
0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "password-file", OPT_PASSWORD_FILE, "Look for Instane Manager users"
" and passwords here.",
(gptr *) &Options::password_file_name,
(gptr *) &Options::password_file_name,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "default-mysqld-path", OPT_MYSQLD_PATH, "Where to look for MySQL"
Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
" Server binary.",
(gptr *) &Options::default_mysqld_path, (gptr *) &Options::default_mysqld_path,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "default-admin-user", OPT_DEFAULT_ADMIN_USER, "Username to shutdown MySQL"
Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
" instances.",
(gptr *) &Options::default_admin_user,
(gptr *) &Options::default_admin_user,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "default-admin-password", OPT_DEFAULT_ADMIN_PASSWORD, "Password to"
Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
"shutdown MySQL instances.",
(gptr *) &Options::default_admin_password,
(gptr *) &Options::default_admin_password,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "monitoring-interval", OPT_MONITORING_INTERVAL, "Interval to monitor instances"
Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
" in seconds.",
(gptr *) &Options::monitoring_interval,
(gptr *) &Options::monitoring_interval,
0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "run-as-service", OPT_RUN_AS_SERVICE,
"Daemonize and start angel process.", (gptr *) &Options::run_as_service,
0, 0, GET_BOOL, NO_ARG, 0, 0, 1, 0, 0, 0 },
{ "version", 'V', "Output version information and exit.", 0, 0, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }
};
static void version()
{
Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
printf("%s Ver %s for %s on %s\n", my_progname, mysqlmanager_version,
SYSTEM_TYPE, MACHINE_TYPE);
}
Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
static const char *default_groups[]= { "mysql", "manager", 0 };
static void usage()
{
version();
Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
printf("Copyright (C) 2003, 2004 MySQL AB\n"
"This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n"
"and you are welcome to modify and redistribute it under the GPL license\n");
printf("Usage: %s [OPTIONS] \n", my_progname);
my_print_help(my_long_options);
Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
print_defaults("my", default_groups);
my_print_variables(my_long_options);
}
C_MODE_START
static my_bool
get_one_option(int optid,
const struct my_option *opt __attribute__((unused)),
char *argument __attribute__((unused)))
{
switch(optid) {
case 'V':
version();
exit(0);
case 'I':
case '?':
usage();
exit(0);
}
return 0;
}
C_MODE_END
Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
/*
- call load_defaults to load configuration file section
Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
- call handle_options to assign defaults and command-line arguments
to the class members
if either of these function fail, exit the program
May not return.
*/
void Options::load(int argc, char **argv)
{
Intermediate commit - just to make new files visible to bk in the new tree server-tools/instance-manager/Makefile.am: Fixed IM linking to avoid using both mysys and libmysql as the define the same symbols and therefore conflict server-tools/instance-manager/listener.cc: Added ability to listen network ports server-tools/instance-manager/listener.h: Various additions to the Listener_thread_args server-tools/instance-manager/log.cc: merge server-tools/instance-manager/log.h: merge server-tools/instance-manager/manager.cc: Fixes and additions to enable guardian functionality server-tools/instance-manager/manager.h: Changed manager() signature server-tools/instance-manager/mysqlmanager.cc: Various fixes server-tools/instance-manager/options.cc: Added handling of default values for new options in the Options struct. (such as default_user, default_password, monitoring_interval e.t.c) server-tools/instance-manager/options.h: Added new options to the Options struct sql/net_serv.cc: Added MYSQL_INSTANCE_MANAGER defines to enable alarm handling in the IM server-tools/instance-manager/buffer.cc: Simple implementation of variable-length buffer server-tools/instance-manager/command.cc: Abstract command. All commands are derived from Command class server-tools/instance-manager/commands.h: Interfaces for all commands we have server-tools/instance-manager/factory.cc: Commands factory. This class hides command instantiation. The idea is to handle various protocols this way. (different commands for different protocols server-tools/instance-manager/guardian.cc: Guardian thread implementation (monitor and restart instances in case of a failure server-tools/instance-manager/guardian.h: Guardian_thread and Guardian_thread_args class interface. The Guardian_thread is responsible for monitoring and restarting instances server-tools/instance-manager/instance.cc: Instance class contains methods and data to manage a single instance server-tools/instance-manager/instance.h: This file contains class an instance class interface. The class is responsible for starting/stopping an instance server-tools/instance-manager/instance_map.cc: The instance repository. This class is also responsible for initialization of Instance class objects. server-tools/instance-manager/instance_options.cc: The Instance_options class contains all methods to get and handle options of an instance server-tools/instance-manager/mysql_connection.cc: The class responsible for handling MySQL client/server protocol connections server-tools/instance-manager/mysql_manager_error.h: The list of Instance Manger-specific errors server-tools/instance-manager/parse.cc: Simple query parser server-tools/instance-manager/parse.h: Parser interface server-tools/instance-manager/protocol.cc: Here implemented functions used to handle mysql client/server protocol server-tools/instance-manager/protocol.h: Interface for MySQL client/server protocol server-tools/instance-manager/thread_registry.cc: Thread registry stores information about every thread. It's main function is to provide graceful shutdown for all threads. server-tools/instance-manager/user_map.h: User map contains hash with user names and passwords
2004-10-23 09:32:52 +02:00
/* config-file options are prepended to command-line ones */
load_defaults("my", default_groups, &argc, &argv);
if (int rc= handle_options(&argc, &argv, my_long_options, get_one_option))
exit(rc);
}