[prev in list] [next in list] [prev in thread] [next in thread]
List: mysql-internals
Subject: bk commit into 5.0 tree (anozdrin:1.2004)
From: Alexander Nozdrin <alik () mysql ! com>
Date: 2005-09-30 21:14:57
Message-ID: 20050930211457.19399.qmail () alik ! ru
[Download RAW message or body]
Below is the list of changes that have just been committed into a local
5.0 repository of alik. When alik does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2004 05/10/01 01:14:50 anozdrin@mysql.com +13 -0
WL#2789 "Instance Manager: test using mysql-test-run testing framework"
Add Instance Manager tests.
mysql-test/t/kill_n_check.sh
1.1 05/10/01 01:14:40 anozdrin@mysql.com +66 -0
The helper script. Its main idea is to kill some process and
check that the process will (or will not) be restarted.
mysql-test/t/kill_n_check.sh
1.0 05/10/01 01:14:40 anozdrin@mysql.com +0 -0
BitKeeper file /home/alik/Documents/AllProgs/MySQL/devel/5.0-im-tests.backup/mysql-test/t/kill_n_check.sh
mysql-test/t/im_utils.imtest
1.1 05/10/01 01:14:39 anozdrin@mysql.com +115 -0
Instance Manager utils test.
mysql-test/t/im_options_unset.imtest
1.1 05/10/01 01:14:39 anozdrin@mysql.com +150 -0
Instance Manager UNSET statement test.
mysql-test/t/im_options_set.imtest
1.1 05/10/01 01:14:39 anozdrin@mysql.com +142 -0
Instance Manager SET statement test.
mysql-test/t/im_life_cycle.imtest
1.1 05/10/01 01:14:39 anozdrin@mysql.com +141 -0
Instance Manager life cycle test.
mysql-test/t/im_utils.imtest
1.0 05/10/01 01:14:39 anozdrin@mysql.com +0 -0
BitKeeper file /home/alik/Documents/AllProgs/MySQL/devel/5.0-im-tests.backup/mysql-test/t/im_utils.imtest
mysql-test/t/im_options_unset.imtest
1.0 05/10/01 01:14:39 anozdrin@mysql.com +0 -0
BitKeeper file /home/alik/Documents/AllProgs/MySQL/devel/5.0-im-tests.backup/mysql-test/t/im_options_unset.imtest
mysql-test/t/im_options_set.imtest
1.0 05/10/01 01:14:39 anozdrin@mysql.com +0 -0
BitKeeper file /home/alik/Documents/AllProgs/MySQL/devel/5.0-im-tests.backup/mysql-test/t/im_options_set.imtest
mysql-test/t/im_life_cycle.imtest
1.0 05/10/01 01:14:39 anozdrin@mysql.com +0 -0
BitKeeper file /home/alik/Documents/AllProgs/MySQL/devel/5.0-im-tests.backup/mysql-test/t/im_life_cycle.imtest
mysql-test/t/im_daemon_life_cycle.imtest
1.1 05/10/01 01:14:38 anozdrin@mysql.com +15 -0
Instance Manager daemon test (mysqltestrun-part).
mysql-test/t/im_daemon_life_cycle-im.opt
1.1 05/10/01 01:14:38 anozdrin@mysql.com +2 -0
Options file for Instance Manager daemon test.
mysql-test/r/im_utils.result
1.1 05/10/01 01:14:38 anozdrin@mysql.com +91 -0
Results file for Instance Manager utils test.
mysql-test/t/im_daemon_life_cycle.imtest
1.0 05/10/01 01:14:38 anozdrin@mysql.com +0 -0
BitKeeper file /home/alik/Documents/AllProgs/MySQL/devel/5.0-im-tests.backup/mysql-test/t/im_daemon_life_cycle.imtest
mysql-test/t/im_daemon_life_cycle-im.opt
1.0 05/10/01 01:14:38 anozdrin@mysql.com +0 -0
BitKeeper file /home/alik/Documents/AllProgs/MySQL/devel/5.0-im-tests.backup/mysql-test/t/im_daemon_life_cycle-im.opt
mysql-test/r/im_utils.result
1.0 05/10/01 01:14:38 anozdrin@mysql.com +0 -0
BitKeeper file /home/alik/Documents/AllProgs/MySQL/devel/5.0-im-tests.backup/mysql-test/r/im_utils.result
mysql-test/r/im_options_unset.result
1.1 05/10/01 01:14:37 anozdrin@mysql.com +15 -0
Results file for Instance Manager UNSET statement test.
mysql-test/r/im_options_set.result
1.1 05/10/01 01:14:37 anozdrin@mysql.com +20 -0
Results file for Instance Manager SET statement test.
mysql-test/r/im_options_unset.result
1.0 05/10/01 01:14:37 anozdrin@mysql.com +0 -0
BitKeeper file /home/alik/Documents/AllProgs/MySQL/devel/5.0-im-tests.backup/mysql-test/r/im_options_unset.result
mysql-test/r/im_options_set.result
1.0 05/10/01 01:14:37 anozdrin@mysql.com +0 -0
BitKeeper file /home/alik/Documents/AllProgs/MySQL/devel/5.0-im-tests.backup/mysql-test/r/im_options_set.result
mysql-test/r/im_life_cycle.result
1.1 05/10/01 01:14:36 anozdrin@mysql.com +64 -0
Results file for Instance Manager life cycle test.
mysql-test/r/im_daemon_life_cycle.result
1.1 05/10/01 01:14:36 anozdrin@mysql.com +7 -0
Results file for Instance Manager daemon test.
mysql-test/r/im_life_cycle.result
1.0 05/10/01 01:14:36 anozdrin@mysql.com +0 -0
BitKeeper file /home/alik/Documents/AllProgs/MySQL/devel/5.0-im-tests.backup/mysql-test/r/im_life_cycle.result
mysql-test/r/im_daemon_life_cycle.result
1.0 05/10/01 01:14:36 anozdrin@mysql.com +0 -0
BitKeeper file /home/alik/Documents/AllProgs/MySQL/devel/5.0-im-tests.backup/mysql-test/r/im_daemon_life_cycle.result
mysql-test/include/im_check_os.inc
1.1 05/10/01 01:14:35 anozdrin@mysql.com +7 -0
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/include/im_check_os.inc
1.0 05/10/01 01:14:35 anozdrin@mysql.com +0 -0
BitKeeper file /home/alik/Documents/AllProgs/MySQL/devel/5.0-im-tests.backup/mysql-test/include/im_check_os.inc
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: anozdrin
# Host: station.home
# Root: /home/alik/Documents/AllProgs/MySQL/devel/5.0-im-tests.backup
--- New file ---
+++ mysql-test/include/im_check_os.inc 05/10/01 01:14:35
--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
--- New file ---
+++ mysql-test/r/im_daemon_life_cycle.result 05/10/01 01:14:36
SHOW INSTANCES;
instance_name status
mysqld1 online
mysqld2 offline
Killing the process...
Sleeping...
Success: the process was restarted.
--- New file ---
+++ mysql-test/r/im_life_cycle.result 05/10/01 01:14:36
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
--- New file ---
+++ mysql-test/r/im_options_set.result 05/10/01 01:14:37
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
--- New file ---
+++ mysql-test/r/im_options_unset.result 05/10/01 01:14:37
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
--- New file ---
+++ mysql-test/r/im_utils.result 05/10/01 01:14:38
SHOW INSTANCES;
instance_name status
mysqld1 online
mysqld2 offline
SHOW INSTANCE OPTIONS mysqld1;
option_name value
instance_name VALUE
mysqld-path VALUE
socket VALUE
pid-file VALUE
port VALUE
datadir VALUE
log VALUE
log-error VALUE
log-slow-queries VALUE
language VALUE
character-sets-dir VALUE
basedir VALUE
server_id VALUE
skip-stack-trace VALUE
skip-innodb VALUE
skip-bdb VALUE
skip-ndbcluster VALUE
SHOW INSTANCE OPTIONS mysqld2;
option_name value
instance_name VALUE
mysqld-path VALUE
nonguarded VALUE
socket VALUE
pid-file VALUE
port VALUE
datadir VALUE
log VALUE
log-error VALUE
log-slow-queries VALUE
language VALUE
character-sets-dir VALUE
basedir VALUE
server_id VALUE
skip-stack-trace VALUE
skip-innodb VALUE
skip-bdb VALUE
skip-ndbcluster VALUE
START INSTANCE mysqld2;
STOP INSTANCE mysqld2;
SHOW mysqld1 LOG FILES;
Logfile Path File size
ERROR LOG PATH FILE_SIZE
GENERAL LOG PATH FILE_SIZE
SLOW LOG PATH FILE_SIZE
SHOW mysqld2 LOG FILES;
Logfile Path File size
ERROR LOG PATH FILE_SIZE
GENERAL LOG PATH FILE_SIZE
SLOW LOG PATH FILE_SIZE
SHOW mysqld1 LOG ERROR 10;
Log
LOG_DATA
SHOW mysqld1 LOG SLOW 10;
Log
LOG_DATA
SHOW mysqld1 LOG GENERAL 10;
Log
LOG_DATA
SHOW mysqld1 LOG ERROR 10, 2;
Log
LOG_DATA
SHOW mysqld1 LOG SLOW 10, 2;
Log
LOG_DATA
SHOW mysqld1 LOG GENERAL 10, 2;
Log
LOG_DATA
SHOW mysqld2 LOG ERROR 10;
Log
LOG_DATA
SHOW mysqld2 LOG SLOW 10;
Log
LOG_DATA
SHOW mysqld2 LOG GENERAL 10;
Log
LOG_DATA
SHOW mysqld2 LOG ERROR 10, 2;
Log
LOG_DATA
SHOW mysqld2 LOG SLOW 10, 2;
Log
LOG_DATA
SHOW mysqld2 LOG GENERAL 10, 2;
Log
LOG_DATA
--- New file ---
+++ mysql-test/t/im_daemon_life_cycle-im.opt 05/10/01 01:14:38
--run-as-service
--log=$MYSQL_TEST_DIR/var/log/im.log
--- New file ---
+++ mysql-test/t/im_daemon_life_cycle.imtest 05/10/01 01:14:38
###########################################################################
#
# This file contains test for (1.2) test suite.
#
# Consult WL#2789 for more information.
#
###########################################################################
--source include/im_check_os.inc
###########################################################################
SHOW INSTANCES;
--exec $MYSQL_TEST_DIR/t/kill_n_check.sh $IM_PATH_PID restarted
--- New file ---
+++ mysql-test/t/im_life_cycle.imtest 05/10/01 01:14:39
###########################################################################
#
# This file contains test for (1.1) test suite.
#
# Consult WL#2789 for more information.
#
###########################################################################
--source include/im_check_os.inc
###########################################################################
#
# 1.1.1. Check that Instance Manager is able:
# - to read definitions of two mysqld-instances;
# - to start the first instance;
# - to understand 'nonguarded' option and keep the second instance down;
#
###########################################################################
SHOW INSTANCES;
--replace_column 3 VERSION
SHOW INSTANCE STATUS mysqld1;
--replace_column 3 VERSION
SHOW INSTANCE STATUS mysqld2;
###########################################################################
#
# 1.1.2. Check 'START INSTANCE' command:
# - start the second instance;
# - check that it is reported as online;
# - execute some SQL-statement on mysqld2 to ensure that it is really up and
# running;
#
###########################################################################
START INSTANCE mysqld2;
# FIXME
--sleep 3
SHOW INSTANCES;
--replace_column 3 VERSION
SHOW INSTANCE STATUS mysqld1;
--replace_column 3 VERSION
SHOW INSTANCE STATUS mysqld2;
--connect (mysql_con,localhost,root,,mysql,$IM_MYSQLD1_PORT,$IM_MYSQLD1_SOCK)
--connection mysql_con
SHOW VARIABLES LIKE 'port';
--connection default
--disconnect mysql_con
###########################################################################
#
# 1.1.3. Check 'STOP INSTANCE' command:
# - stop the second instance;
# - check that it is reported as offline;
# - TODO: try to execute some SQL-statement to ensure that it is really down;
#
###########################################################################
STOP INSTANCE mysqld2;
# FIXME
--sleep 3
SHOW INSTANCES;
--replace_column 3 VERSION
SHOW INSTANCE STATUS mysqld1;
--replace_column 3 VERSION
SHOW INSTANCE STATUS mysqld2;
###########################################################################
#
# 1.1.4. Check that Instance Manager reports correct errors for 'START
# INSTANCE' command:
# - if the client tries to start unregistered instance;
# - if the client tries to start already started instance;
# - if the client submits invalid arguments;
#
###########################################################################
--error 3000
START INSTANCE mysqld3;
--error 3002
START INSTANCE mysqld1;
# FIXME TODO
# BUG#12813: START/STOP INSTANCE commands accept a list as argument
# START INSTANCE mysqld1, mysqld2;
###########################################################################
#
# 1.1.5. Check that Instance Manager reports correct errors for 'STOP INSTANCE'
# command:
# - if the client tries to start unregistered instance;
# - if the client tries to start already stopped instance;
# - if the client submits invalid arguments;
#
###########################################################################
--error 3000
STOP INSTANCE mysqld3;
# TODO: IM should be fixed.
# BUG#12673: Instance Manager allows to stop the instance many times
# --error 3002
# STOP INSTANCE mysqld2;
# FIXME TODO
# BUG#12813: START/STOP INSTANCE commands accept a list as argument
# STOP INSTANCE mysqld1, mysqld2;
###########################################################################
#
# 1.1.6. Check that Instance Manager is able to restart guarded instances.
#
###########################################################################
SHOW INSTANCES;
--exec $MYSQL_TEST_DIR/t/kill_n_check.sh $IM_MYSQLD1_PATH_PID restarted
###########################################################################
#
# 1.1.7. Check that Instance Manager does not restart non-guarded instance.
#
###########################################################################
SHOW INSTANCES;
START INSTANCE mysqld2;
# FIXME
--sleep 3
SHOW INSTANCES;
--exec $MYSQL_TEST_DIR/t/kill_n_check.sh $IM_MYSQLD2_PATH_PID killed
SHOW INSTANCES;
--- New file ---
+++ mysql-test/t/im_options_set.imtest 05/10/01 01:14:39
###########################################################################
#
# This file contains test for (3) test suite.
#
# Consult WL#2789 for more information.
#
###########################################################################
#
# Check the options-management commands:
# - SET;
# - FLUSH INSTANCES;
#
# Let's test the commands on the option 'server_id'. It's expected that
# originally the instances have the following server ids:
# - mysqld1: 1
# - mysqld2: 2
#
# 1. SET <instance_id>.server_id= SERVER_ID); where SERVER_ID is 11 or 12.
# 1.1. check that the configuration file has been updated (i.e. contains
# server_id=SERVER_ID for the instance);
# 1.2. (for mysqld1) check that the running instance has not been affected:
# connect to the instance and check that 'SHOW VARIABLES LIKE 'server_id''
# returns zero;
# 1.3. check that internal cache of Instance Manager has not been affected
# (i.e. SHOW INSTANCE OPTIONS <instance> does not contain updated value).
#
# 2. FLUSH INSTANCES;
# 2.1. check that the configuration file has not been updated;
# 2.2. (for mysqld1) check that the running instance has not been affected:
# connect to the instance and check that 'SHOW VARIABLES LIKE 'server_id''
# returns zero value;
# 2.3. check that internal cache of Instance Manager has been updated (i.e.
# SHOW INSTANCE OPTIONS <instance> contains 'server_id=SERVER_ID' line).
#
# 3. Restore options.
#
###########################################################################
--source include/im_check_os.inc
###########################################################################
#
# 0. Check starting conditions.
#
###########################################################################
# - check the configuration file;
--exec grep server_id $MYSQL_TEST_DIR/var/im.cnf ;
# - check the running instances.
--connect (mysql1_con,localhost,root,,mysql,$IM_MYSQLD1_PORT,$IM_MYSQLD1_SOCK)
--connection mysql1_con
SHOW VARIABLES LIKE 'server_id';
--connection default
# - check the internal cache.
# TODO: we should check only server_id option here.
# SHOW INSTANCE OPTIONS mysqld1;
# SHOW INSTANCE OPTIONS mysqld2;
###########################################################################
#
# 1. SET <instance_id>.server_id= SERVER_ID); where SERVER_ID is 11 or 12.
#
###########################################################################
# * mysqld1
SET mysqld1.server_id = 11;
# - check that the configuration file has been updated (i.e. contains
# server_id=SERVER_ID for the instance);
--exec grep server_id $MYSQL_TEST_DIR/var/im.cnf ;
# - (for mysqld1) check that the running instance has not been affected:
# connect to the instance and check that 'SHOW VARIABLES LIKE 'server_id''
# returns zero;
--connection mysql1_con
SHOW VARIABLES LIKE 'server_id';
--connection default
# - check that internal cache of Instance Manager has not been affected
# (i.e. SHOW INSTANCE OPTIONS <instance> does not contain updated value).
# TODO: we should check only server_id option here.
# SHOW INSTANCE OPTIONS mysqld1;
# * mysqld2
SET mysqld2.server_id = 12;
# - check that the configuration file has been updated (i.e. contains
# server_id=SERVER_ID for the instance);
--exec grep server_id $MYSQL_TEST_DIR/var/im.cnf ;
# - check that internal cache of Instance Manager has not been affected
# (i.e. SHOW INSTANCE OPTIONS <instance> does not contain updated value).
# TODO: we should check only server_id option here.
# SHOW INSTANCE OPTIONS mysqld2;
###########################################################################
#
# 2. FLUSH INSTANCES;
#
###########################################################################
FLUSH INSTANCES;
# - check that the configuration file has not been updated;
--exec grep server_id $MYSQL_TEST_DIR/var/im.cnf ;
# - (for mysqld1) check that the running instance has not been affected:
# connect to the instance and check that 'SHOW VARIABLES LIKE 'server_id''
# returns zero value;
--connection mysql1_con
SHOW VARIABLES LIKE 'server_id';
--connection default
# - check that internal cache of Instance Manager has been updated (i.e.
# SHOW INSTANCE OPTIONS <instance> contains 'server_id=' line).
# TODO: we should check only server_id option here.
# SHOW INSTANCE OPTIONS mysqld1;
# SHOW INSTANCE OPTIONS mysqld2;
--- New file ---
+++ mysql-test/t/im_options_unset.imtest 05/10/01 01:14:39
###########################################################################
#
# This file contains test for (3) test suite.
#
# Consult WL#2789 for more information.
#
###########################################################################
#
# Check the options-management commands:
# - UNSET;
# - FLUSH INSTANCES;
#
# Let's test the commands on the option 'server_id'. It's expected that
# originally the instances have the following server ids:
# - mysqld1: 1
# - mysqld2: 2
#
# The test case:
#
# 1. UNSET <instance_id>.server_id;
#
# Do the step for both instances.
#
# 1.1. check that the configuration file has been updated (i.e. does not
# contain 'server_id=' line for the instance);
# 1.2. (for mysqld1) check that the running instance has not been affected:
# connect to the instance and check that 'SHOW VARIABLES LIKE 'server_id''
# returns non-zero value;
# 1.3. check that internal cache of Instance Manager is not affected (i.e.
# SHOW INSTANCE OPTIONS <instance> contains non-zero value for server_id);
#
# 2. FLUSH INSTANCES;
#
# Do the step for both instances.
#
# 2.1. check that the configuration file has not been updated (i.e. does not
# contain 'server_id=' for the instance);
# 2.2. (for mysqld1) check that the running instance has not been affected:
# connect to the instance and check that 'SHOW VARIABLES LIKE 'server_id''
# returns non-zero value;
# 2.3. check that internal cache of Instance Manager has been updated (i.e.
# SHOW INSTANCE OPTIONS <instance> does not contain 'server_id=' line).
#
###########################################################################
--source include/im_check_os.inc
###########################################################################
#
# 0. Check starting conditions.
#
###########################################################################
# - check the configuration file;
--exec grep server_id $MYSQL_TEST_DIR/var/im.cnf ;
# - check the running instances.
--connect (mysql1_con,localhost,root,,mysql,$IM_MYSQLD1_PORT,$IM_MYSQLD1_SOCK)
--connection mysql1_con
SHOW VARIABLES LIKE 'server_id';
--connection default
# - check the internal cache.
# TODO: we should check only server_id option here.
# SHOW INSTANCE OPTIONS mysqld1;
# SHOW INSTANCE OPTIONS mysqld2;
###########################################################################
#
# 1. UNSET <instance_id>.server_id;
#
###########################################################################
# * mysqld1
UNSET mysqld1.server_id;
# - check that the configuration file has been updated (i.e. does not
# contain 'server_id=' line for the instance);
--exec grep server_id $MYSQL_TEST_DIR/var/im.cnf ;
# - check that the running instance has not been affected: connect to the
# instance and check that 'SHOW VARIABLES LIKE 'server_id'' returns non-zero
# value;
--connection mysql1_con
SHOW VARIABLES LIKE 'server_id';
--connection default
# - check that internal cache of Instance Manager is not affected (i.e. SHOW
# INSTANCE OPTIONS <instance> contains non-zero value for server_id);
# TODO: we should check only server_id option here.
# SHOW INSTANCE OPTIONS mysqld1;
# * mysqld2
UNSET mysqld2.server_id;
# - check that the configuration file has been updated (i.e. does not
# contain 'server_id=' line for the instance);
--exec grep server_id $MYSQL_TEST_DIR/var/im.cnf || true;
# - check that internal cache of Instance Manager is not affected (i.e. SHOW
# INSTANCE OPTIONS <instance> contains non-zero value for server_id);
# TODO: we should check only server_id option here.
# SHOW INSTANCE OPTIONS mysqld2;
###########################################################################
#
# 2. FLUSH INSTANCES;
#
###########################################################################
FLUSH INSTANCES;
# - check that the configuration file has not been updated (i.e. does not
# contain 'server_id=' for the instance);
--exec grep server_id $MYSQL_TEST_DIR/var/im.cnf || true;
# - (for mysqld1) check that the running instance has not been affected:
# connect to the instance and check that 'SHOW VARIABLES LIKE 'server_id''
# returns non-zero value;
--connection mysql1_con
SHOW VARIABLES LIKE 'server_id';
--connection default
# - check that internal cache of Instance Manager has been updated (i.e.
# SHOW INSTANCE OPTIONS <instance> does not contain 'server_id=' line).
# TODO: we should check only server_id option here.
# SHOW INSTANCE OPTIONS mysqld1;
# SHOW INSTANCE OPTIONS mysqld2;
--- New file ---
+++ mysql-test/t/im_utils.imtest 05/10/01 01:14:39
###########################################################################
#
# This file contains test for (2) test suite.
#
# Consult WL#2789 for more information.
#
###########################################################################
--source include/im_check_os.inc
###########################################################################
#
# Check starting conditions. This test case assumes that:
# - two mysqld-instances are registered;
# - the first instance is online;
# - the second instance is offline;
#
SHOW INSTANCES;
#
# Check 'SHOW INSTANCE OPTIONS' command:
# - check that options of both offline and online instances are accessible;
# - since configuration of an mysqld-instance contains directories, we should
# completely ignore the second column (values) in order to make the test
# case produce the same results on different installations;
# TODO: ignore values of only directory-specific options.
#
--replace_column 2 VALUE
SHOW INSTANCE OPTIONS mysqld1;
--replace_column 2 VALUE
SHOW INSTANCE OPTIONS mysqld2;
#
# Before checking log files, we should start the second instance (mysqld2) to
# give it a chance to create log files.
#
START INSTANCE mysqld2;
# FIXME
-- sleep 3
STOP INSTANCE mysqld2;
#
# Check 'SHOW LOG FILES' command:
# - check that log files of both offline and online instances are accessible;
# - since placement of the log files is installation-specific, we should
# ignore it in comparisson;
# - also, we should ignore log file size, since it may depend on the version
# being tested;
#
--replace_column 2 PATH 3 FILE_SIZE
SHOW mysqld1 LOG FILES;
--replace_column 2 PATH 3 FILE_SIZE
SHOW mysqld2 LOG FILES;
#
# Check 'SHOW LOG' command:
# - check that all three kinds of logs are available for both offline and
# online instances;
# - we should ignore the value, because it is very specific and depends on
# many factors; we only check that Instance Manager is able to provide log
# files.
#
# mysqld1 (online) w/o the optional argument.
--replace_column 1 LOG_DATA
SHOW mysqld1 LOG ERROR 10;
--replace_column 1 LOG_DATA
SHOW mysqld1 LOG SLOW 10;
--replace_column 1 LOG_DATA
SHOW mysqld1 LOG GENERAL 10;
# mysqld1 (online) with the optional argument.
--replace_column 1 LOG_DATA
SHOW mysqld1 LOG ERROR 10, 2;
--replace_column 1 LOG_DATA
SHOW mysqld1 LOG SLOW 10, 2;
--replace_column 1 LOG_DATA
SHOW mysqld1 LOG GENERAL 10, 2;
# mysqld2 (offline) w/o the optional argument.
--replace_column 1 LOG_DATA
SHOW mysqld2 LOG ERROR 10;
--replace_column 1 LOG_DATA
SHOW mysqld2 LOG SLOW 10;
--replace_column 1 LOG_DATA
SHOW mysqld2 LOG GENERAL 10;
# mysqld2 (offline) with the optional argument.
--replace_column 1 LOG_DATA
SHOW mysqld2 LOG ERROR 10, 2;
--replace_column 1 LOG_DATA
SHOW mysqld2 LOG SLOW 10, 2;
--replace_column 1 LOG_DATA
SHOW mysqld2 LOG GENERAL 10, 2;
--- New file ---
+++ mysql-test/t/kill_n_check.sh 05/10/01 01:14:40
#!/bin/sh
if [ $# -ne 2 ]; then
echo "Usage: kill_n_check.sh <pid file path> killed|restarted"
exit 0
fi
pid_path="$1"
expected_result="$2"
if [ -z "$pid_path" -o ! -r "$pid_path" ]; then
echo "Error: invalid PID path ($pid_path) or PID file does not exist."
exit 0
fi
if [ "$expected_result" != "killed" -a \
"$expected_result" != "restarted" ]; then
echo "Error: expected result must be either 'killed' or 'restarted'."
exit 0
fi
# echo "PID path: '$pid_path'"
original_pid=`cat "$pid_path"`
# echo "Original PID: $original_pid"
echo "Killing the process..."
kill -9 $original_pid
echo "Sleeping..."
sleep 3
new_pid=""
[ -r "$pid_path" ] && new_pid=`cat "$pid_path"`
# echo "New PID: $new_pid"
if [ "$expected_result" == "restarted" ]; then
if [ -z "$new_pid" ]; then
echo "Error: the process was killed."
exit 0
fi
if [ "$original_pid" -eq "$new_pid" ]; then
echo "Error: the process was not restarted."
exit 0
fi
echo "Success: the process was restarted."
exit 0
else # $expected_result == killed
if [ "$new_pid" -a "$new_pid" -ne "$original_pid" ]; then
echo "Error: the process was restarted."
exit 0
fi
echo "Success: the process was killed."
exit 0
fi
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=mysql-internals@progressive-comp.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic