Commit 43c8f453 authored by unknown's avatar unknown
Browse files

WL#2789 "Instance Manager: test using mysql-test-run testing framework"

Add Instance Manager tests.


mysql-test/include/im_check_os.inc:
  Currently Instance Manager tests are known to work only on UNIX platform.
  This header file is included in each IM-test in order to skip the test
  on Windows.
mysql-test/r/im_daemon_life_cycle.result:
  Results file for Instance Manager daemon test.
mysql-test/r/im_life_cycle.result:
  Results file for Instance Manager life cycle test.
mysql-test/r/im_options_set.result:
  Results file for Instance Manager SET statement test.
mysql-test/r/im_options_unset.result:
  Results file for Instance Manager UNSET statement test.
mysql-test/r/im_utils.result:
  Results file for Instance Manager utils test.
mysql-test/t/im_daemon_life_cycle-im.opt:
  Options file for Instance Manager daemon test.
mysql-test/t/im_daemon_life_cycle.imtest:
  Instance Manager daemon test (mysqltestrun-part).
mysql-test/t/im_life_cycle.imtest:
  Instance Manager life cycle test.
mysql-test/t/im_options_set.imtest:
  Instance Manager SET statement test.
mysql-test/t/im_options_unset.imtest:
  Instance Manager UNSET statement test.
mysql-test/t/im_utils.imtest:
  Instance Manager utils test.
mysql-test/t/kill_n_check.sh:
  The helper script. Its main idea is to kill some process and
  check that the process will (or will not) be restarted.
parent 46d8163b
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
--connect (dflt_server_con,localhost,root,,mysql,$IM_MYSQLD1_PORT,$IM_MYSQLD1_SOCK)
--connection dflt_server_con

--source include/not_windows.inc

--connection default
--disconnect dflt_server_con
+7 −0
Original line number Diff line number Diff line
SHOW INSTANCES;
instance_name	status
mysqld1	online
mysqld2	offline
Killing the process...
Sleeping...
Success: the process was restarted.
+64 −0
Original line number Diff line number Diff line
SHOW INSTANCES;
instance_name	status
mysqld1	online
mysqld2	offline
SHOW INSTANCE STATUS mysqld1;
instance_name	status	version
mysqld1	online	VERSION
SHOW INSTANCE STATUS mysqld2;
instance_name	status	version
mysqld2	offline	VERSION
START INSTANCE mysqld2;
SHOW INSTANCES;
instance_name	status
mysqld1	online
mysqld2	online
SHOW INSTANCE STATUS mysqld1;
instance_name	status	version
mysqld1	online	VERSION
SHOW INSTANCE STATUS mysqld2;
instance_name	status	version
mysqld2	online	VERSION
SHOW VARIABLES LIKE 'port';
Variable_name	Value
port	9312
STOP INSTANCE mysqld2;
SHOW INSTANCES;
instance_name	status
mysqld1	online
mysqld2	offline
SHOW INSTANCE STATUS mysqld1;
instance_name	status	version
mysqld1	online	VERSION
SHOW INSTANCE STATUS mysqld2;
instance_name	status	version
mysqld2	offline	VERSION
START INSTANCE mysqld3;
ERROR HY000: Bad instance name. Check that the instance with such a name exists
START INSTANCE mysqld1;
ERROR HY000: The instance is already started
STOP INSTANCE mysqld3;
ERROR HY000: Bad instance name. Check that the instance with such a name exists
SHOW INSTANCES;
instance_name	status
mysqld1	online
mysqld2	offline
Killing the process...
Sleeping...
Success: the process was restarted.
SHOW INSTANCES;
instance_name	status
mysqld1	online
mysqld2	offline
START INSTANCE mysqld2;
SHOW INSTANCES;
instance_name	status
mysqld1	online
mysqld2	online
Killing the process...
Sleeping...
Success: the process was killed.
SHOW INSTANCES;
instance_name	status
mysqld1	online
mysqld2	offline
+20 −0
Original line number Diff line number Diff line
server_id           =1
server_id           =2
SHOW VARIABLES LIKE 'server_id';
Variable_name	Value
server_id	1
SET mysqld1.server_id = 11;
server_id =11
server_id           =2
SHOW VARIABLES LIKE 'server_id';
Variable_name	Value
server_id	1
SET mysqld2.server_id = 12;
server_id =11
server_id =12
FLUSH INSTANCES;
server_id =11
server_id =12
SHOW VARIABLES LIKE 'server_id';
Variable_name	Value
server_id	1
+15 −0
Original line number Diff line number Diff line
server_id           =1
server_id           =2
SHOW VARIABLES LIKE 'server_id';
Variable_name	Value
server_id	1
UNSET mysqld1.server_id;
server_id           =2
SHOW VARIABLES LIKE 'server_id';
Variable_name	Value
server_id	1
UNSET mysqld2.server_id;
FLUSH INSTANCES;
SHOW VARIABLES LIKE 'server_id';
Variable_name	Value
server_id	1
Loading