mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
f2f1e4d852
im_daemon_life_cycle fails randomly. 1. Move IM-angel functionality into a separate file, create Angel class. 2. Be more verbose; 3. Fix typo in FLUSH INSTANCES implementation; 4. Polishing. mysql-test/r/im_options.result: Updated result file. mysql-test/t/im_cmd_line.imtest: Updated test. server-tools/instance-manager/IMService.cpp: Move HandleServiceOptions() into IMService::main(). server-tools/instance-manager/IMService.h: Move HandleServiceOptions() into IMService::main(). server-tools/instance-manager/Makefile.am: Added angel.cc and angel.h. server-tools/instance-manager/WindowsService.cpp: Initialize class-members in constructor. server-tools/instance-manager/WindowsService.h: Initialize class-members in constructor. server-tools/instance-manager/commands.cc: Return actual error code (ER_OUT_OF_RESOURCES or ER_THERE_IS_ACTIVE_INSTANCE) from FLUSH INSTANCES. server-tools/instance-manager/manager.cc: 1. Return actual error code from Manager::flush_instances(). 2. Be more verbose. server-tools/instance-manager/manager.h: Return actual error code from Manager::flush_instances(). server-tools/instance-manager/mysqlmanager.cc: Move IM-angel functionality into separate file (angel.cc). server-tools/instance-manager/priv.cc: Use return bool datatype instead int{ 0, 1 }. server-tools/instance-manager/priv.h: Use return bool datatype instead int{ 0, 1 }. server-tools/instance-manager/angel.cc: IM-angel functionality. server-tools/instance-manager/angel.h: IM-angel functionality.
149 lines
5.4 KiB
Text
149 lines
5.4 KiB
Text
SHOW VARIABLES LIKE 'server_id';
|
|
Variable_name Value
|
|
server_id 1
|
|
SHOW INSTANCES;
|
|
instance_name state
|
|
mysqld1 XXXXX
|
|
mysqld2 offline
|
|
UNSET mysqld1.server_id;
|
|
ERROR HY000: The instance is active. Stop the instance first
|
|
SET mysqld1.server_id = 11;
|
|
ERROR HY000: The instance is active. Stop the instance first
|
|
CREATE INSTANCE mysqld3
|
|
datadir = '/',
|
|
server_id = 3,
|
|
socket = "$MYSQL_TMP_DIR/mysqld_3.sock";
|
|
START INSTANCE mysqld3;
|
|
UNSET mysqld3.server_id;
|
|
ERROR HY000: The instance is active. Stop the instance first
|
|
SET mysqld3.server_id = 11;
|
|
ERROR HY000: The instance is active. Stop the instance first
|
|
STOP INSTANCE mysqld3;
|
|
SHOW INSTANCE STATUS mysqld3;
|
|
instance_name state version_number version mysqld_compatible
|
|
mysqld3 offline VERSION_NUMBER VERSION no
|
|
UNSET mysqld2.server_id;
|
|
UNSET mysqld2.server_id;
|
|
SHOW INSTANCE OPTIONS mysqld2;
|
|
option_name value
|
|
instance_name option_value
|
|
socket option_value
|
|
pid-file option_value
|
|
port option_value
|
|
datadir option_value
|
|
log option_value
|
|
log-error option_value
|
|
log-slow-queries option_value
|
|
language option_value
|
|
character-sets-dir option_value
|
|
basedir option_value
|
|
skip-stack-trace option_value
|
|
skip-innodb option_value
|
|
skip-ndbcluster option_value
|
|
nonguarded option_value
|
|
log-output option_value
|
|
SET mysqld2.server_id = 2;
|
|
SET mysqld2.server_id = 2;
|
|
SHOW INSTANCE OPTIONS mysqld2;
|
|
option_name value
|
|
instance_name option_value
|
|
socket option_value
|
|
pid-file option_value
|
|
port option_value
|
|
datadir option_value
|
|
log option_value
|
|
log-error option_value
|
|
log-slow-queries option_value
|
|
language option_value
|
|
character-sets-dir option_value
|
|
basedir option_value
|
|
skip-stack-trace option_value
|
|
skip-innodb option_value
|
|
skip-ndbcluster option_value
|
|
nonguarded option_value
|
|
log-output option_value
|
|
server_id option_value
|
|
UNSET mysqld2.server_id = 11;
|
|
ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use
|
|
SET mysqld2.aaa, mysqld3.bbb, mysqld2.ccc = 0010, mysqld3.ddd = 0020;
|
|
--------------------------------------------------------------------
|
|
aaa
|
|
--------------------------------------------------------------------
|
|
bbb
|
|
--------------------------------------------------------------------
|
|
ccc=0010
|
|
--------------------------------------------------------------------
|
|
ddd=0020
|
|
--------------------------------------------------------------------
|
|
UNSET mysqld2.aaa, mysqld3.bbb, mysqld2.ccc, mysqld3.ddd;
|
|
--------------------------------------------------------------------
|
|
--------------------------------------------------------------------
|
|
--------------------------------------------------------------------
|
|
--------------------------------------------------------------------
|
|
--------------------------------------------------------------------
|
|
SET mysqld2.aaa, mysqld3.bbb, mysqld.ccc = 0010;
|
|
ERROR HY000: Unknown instance name
|
|
--------------------------------------------------------------------
|
|
--------------------------------------------------------------------
|
|
--------------------------------------------------------------------
|
|
--------------------------------------------------------------------
|
|
SET mysqld2.aaa, mysqld3.bbb, mysqld1.ccc = 0010;
|
|
ERROR HY000: The instance is active. Stop the instance first
|
|
--------------------------------------------------------------------
|
|
--------------------------------------------------------------------
|
|
--------------------------------------------------------------------
|
|
--------------------------------------------------------------------
|
|
UNSET mysqld2.server_id, mysqld3.server_id, mysqld.ccc;
|
|
ERROR HY000: Unknown instance name
|
|
--------------------------------------------------------------------
|
|
server_id = 1
|
|
server_id=2
|
|
server_id=3
|
|
--------------------------------------------------------------------
|
|
UNSET mysqld2.server_id, mysqld3.server_id, mysqld1.ccc;
|
|
ERROR HY000: The instance is active. Stop the instance first
|
|
--------------------------------------------------------------------
|
|
server_id = 1
|
|
server_id=2
|
|
server_id=3
|
|
--------------------------------------------------------------------
|
|
DROP INSTANCE mysqld3;
|
|
SET mysqld2.server_id=222;
|
|
SET mysqld2.server_id = 222;
|
|
SET mysqld2.server_id = 222 ;
|
|
SET mysqld2 . server_id = 222 ;
|
|
SET mysqld2 . server_id = 222 , mysqld2 . aaa , mysqld2 . bbb ;
|
|
--------------------------------------------------------------------
|
|
server_id = 1
|
|
server_id=222
|
|
--------------------------------------------------------------------
|
|
aaa
|
|
--------------------------------------------------------------------
|
|
bbb
|
|
--------------------------------------------------------------------
|
|
UNSET mysqld2 . aaa , mysqld2 . bbb ;
|
|
--------------------------------------------------------------------
|
|
server_id = 1
|
|
server_id=222
|
|
--------------------------------------------------------------------
|
|
--------------------------------------------------------------------
|
|
--------------------------------------------------------------------
|
|
--------------------------------------------------------------------
|
|
server_id = 1
|
|
server_id=222
|
|
--------------------------------------------------------------------
|
|
SHOW VARIABLES LIKE 'server_id';
|
|
Variable_name Value
|
|
server_id 1
|
|
SHOW INSTANCES;
|
|
instance_name state
|
|
mysqld1 online
|
|
mysqld2 offline
|
|
FLUSH INSTANCES;
|
|
ERROR HY000: At least one instance is active. Stop all instances first
|
|
STOP INSTANCE mysqld1;
|
|
SHOW INSTANCES;
|
|
instance_name state
|
|
mysqld1 offline
|
|
mysqld2 offline
|
|
FLUSH INSTANCES;
|