diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 17102196f42..78b69b26367 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -816,7 +816,6 @@ sub command_line_setup { 'combination=s' => \@opt_combinations, 'skip-combinations' => \&collect_option, 'experimental=s' => \$opt_experimental, - 'skip-im' => \&ignore_option, # Specify ports 'build-thread|mtr-build-thread=i' => \$opt_build_thread, diff --git a/mysql-test/suite/im/r/im_cmd_line.result b/mysql-test/suite/im/r/im_cmd_line.result deleted file mode 100644 index a862d465904..00000000000 --- a/mysql-test/suite/im/r/im_cmd_line.result +++ /dev/null @@ -1,47 +0,0 @@ -SHOW VARIABLES LIKE 'server_id'; -Variable_name Value -server_id 1 -SHOW INSTANCES; -instance_name state -mysqld1 XXXXX -mysqld2 offline ---> Listing users... -im_admin - -==> Adding user 'testuser'... - ---> IM password file: -testuser:*0D3CED9BEC10A777AEC23CCC353A8C08A633045E -im_admin:*598D51AD2DFF7792045D6DF3DDF9AA1AF737B295 ---> EOF - ---> Printing out line for 'testuser'... -testuser:*0D3CED9BEC10A777AEC23CCC353A8C08A633045E - ---> Listing users... -im_admin -testuser - -==> Changing the password of 'testuser'... - ---> IM password file: -im_admin:*598D51AD2DFF7792045D6DF3DDF9AA1AF737B295 -testuser:*39C549BDECFBA8AFC3CE6B948C9359A0ECE08DE2 ---> EOF - ---> Printing out line for 'testuser'... -testuser:*39C549BDECFBA8AFC3CE6B948C9359A0ECE08DE2 - ---> Listing users... -testuser -im_admin - -==> Dropping user 'testuser'... - ---> IM password file: -im_admin:*598D51AD2DFF7792045D6DF3DDF9AA1AF737B295 ---> EOF - ---> Listing users... -im_admin - diff --git a/mysql-test/suite/im/r/im_daemon_life_cycle.result b/mysql-test/suite/im/r/im_daemon_life_cycle.result deleted file mode 100644 index b3afb15f207..00000000000 --- a/mysql-test/suite/im/r/im_daemon_life_cycle.result +++ /dev/null @@ -1,26 +0,0 @@ -SHOW VARIABLES LIKE 'server_id'; -Variable_name Value -server_id 1 -SHOW INSTANCES; -instance_name state -mysqld1 XXXXX -mysqld2 offline -Killing the process... -Waiting... -Success: the process was restarted. -Success: server is ready to accept connection on socket. - --------------------------------------------------------------------- --- Test for BUG#12751 --------------------------------------------------------------------- -START INSTANCE mysqld2; -Success: the process has been started. -Killing the process... -Waiting... -Success: the process was restarted. -Success: server is ready to accept connection on socket. -SHOW INSTANCE STATUS mysqld1; -instance_name state version_number version mysqld_compatible -mysqld1 STATE VERSION_NUMBER VERSION no -STOP INSTANCE mysqld2; -Success: the process has been stopped. diff --git a/mysql-test/suite/im/r/im_instance_conf.result b/mysql-test/suite/im/r/im_instance_conf.result deleted file mode 100644 index d04ae0270ab..00000000000 --- a/mysql-test/suite/im/r/im_instance_conf.result +++ /dev/null @@ -1,225 +0,0 @@ -SHOW VARIABLES LIKE 'server_id'; -Variable_name Value -server_id 1 -SHOW INSTANCES; -instance_name state -mysqld1 XXXXX -mysqld2 offline --------------------------------------------------------------------- -server_id = 1 -server_id = 2 --------------------------------------------------------------------- -CREATE INSTANCE mysqld3 -server_id = 3, -socket = "$MYSQL_TMP_DIR/mysqld_3.sock"; -SHOW INSTANCES; -instance_name state -mysqld3 offline -mysqld2 offline -mysqld1 online --------------------------------------------------------------------- -server_id = 1 -server_id = 2 -server_id=3 --------------------------------------------------------------------- -CREATE INSTANCE mysqld1; -ERROR HY000: Instance already exists -CREATE INSTANCE mysqld2; -ERROR HY000: Instance already exists -CREATE INSTANCE mysqld3; -ERROR HY000: Instance already exists --------------------------------------------------------------------- -nonguarded --------------------------------------------------------------------- -CREATE INSTANCE mysqld4 -nonguarded, -server_id = 4, -socket = "$MYSQL_TMP_DIR/mysqld_4.sock"; -SHOW INSTANCES; -instance_name state -mysqld3 offline -mysqld4 offline -mysqld1 online -mysqld2 offline --------------------------------------------------------------------- -nonguarded -nonguarded --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -CREATE INSTANCE mysqld5 -test-A = 000, -test-B = test, -server_id = 5, -socket = "$MYSQL_TMP_DIR/mysqld_5.sock"; -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld4 offline -mysqld5 offline -mysqld2 offline -mysqld3 offline --------------------------------------------------------------------- -test-A=000 --------------------------------------------------------------------- -test-B=test --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -CREATE INSTANCE mysqld6 -test-C1 = 10 , -test-C2 = 02 , -server_id = 6, -socket = "$MYSQL_TMP_DIR/mysqld_6.sock"; -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld2 offline -mysqld5 offline -mysqld6 offline -mysqld3 offline -mysqld4 offline --------------------------------------------------------------------- -test-C1=10 --------------------------------------------------------------------- -test-C2=02 --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -CREATE INSTANCE mysqld7 test-D = test-D-value ; -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 -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld2 offline -mysqld5 offline -mysqld6 offline -mysqld3 offline -mysqld4 offline -CREATE INSTANCE mysqld8 test-E 0 ; -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 -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld2 offline -mysqld5 offline -mysqld6 offline -mysqld3 offline -mysqld4 offline -CREATE INSTANCE mysqld8 test-F = ; -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 -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld2 offline -mysqld5 offline -mysqld6 offline -mysqld3 offline -mysqld4 offline --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -CREATE INSTANCE mysqld9 -test-1=" hello world ", -test-2=' ', -server_id = 9, -socket = "$MYSQL_TMP_DIR/mysqld_9.sock"; -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld2 offline -mysqld5 offline -mysqld6 offline -mysqld3 offline -mysqld4 offline -mysqld9 offline -CREATE INSTANCE mysqld10 -test-3='\b\babc\sdef', -server_id = 10, -socket = "$MYSQL_TMP_DIR/mysqld_10.sock"; -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld9 offline -mysqld5 offline -mysqld6 offline -mysqld3 offline -mysqld4 offline -mysqld10 offline -mysqld2 offline -CREATE INSTANCE mysqld11 -test-4='abc\tdef', -test-5='abc\ndef', -server_id = 11, -socket = "$MYSQL_TMP_DIR/mysqld_11.sock"; -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld11 offline -mysqld5 offline -mysqld6 offline -mysqld3 offline -mysqld4 offline -mysqld10 offline -mysqld2 offline -mysqld9 offline -CREATE INSTANCE mysqld12 -test-6="abc\rdef", -test-7="abc\\def", -server_id = 12, -socket = "$MYSQL_TMP_DIR/mysqld_12.sock"; -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld9 offline -mysqld5 offline -mysqld6 offline -mysqld3 offline -mysqld4 offline -mysqld10 offline -mysqld2 offline -mysqld12 offline -mysqld11 offline -CREATE INSTANCE mysqld13 test-bad=' \ '; -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 -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld9 offline -mysqld5 offline -mysqld6 offline -mysqld3 offline -mysqld4 offline -mysqld10 offline -mysqld2 offline -mysqld12 offline -mysqld11 offline --------------------------------------------------------------------- -test-1= hello world --------------------------------------------------------------------- -test-2= --------------------------------------------------------------------- -test-3=abc def --------------------------------------------------------------------- -test-4=abc def --------------------------------------------------------------------- -test-5=abc --------------------------------------------------------------------- -test-6=abc def --------------------------------------------------------------------- -test-7=abc\def --------------------------------------------------------------------- --------------------------------------------------------------------- -CREATE INSTANCE qqq1; -ERROR HY000: Malformed instance name. diff --git a/mysql-test/suite/im/r/im_life_cycle.result b/mysql-test/suite/im/r/im_life_cycle.result deleted file mode 100644 index dcabc8cf4f3..00000000000 --- a/mysql-test/suite/im/r/im_life_cycle.result +++ /dev/null @@ -1,73 +0,0 @@ -SHOW VARIABLES LIKE 'server_id'; -Variable_name Value -server_id 1 -SHOW INSTANCES; -instance_name state -mysqld1 XXXXX -mysqld2 offline - --------------------------------------------------------------------- --- 1.1.2. --------------------------------------------------------------------- -START INSTANCE mysqld2; -Success: the process has been started. -SHOW VARIABLES LIKE 'port'; -Variable_name Value -port IM_MYSQLD2_PORT - --------------------------------------------------------------------- --- 1.1.3. --------------------------------------------------------------------- -STOP INSTANCE mysqld2; -Success: the process has been stopped. - --------------------------------------------------------------------- --- 1.1.4. --------------------------------------------------------------------- -START INSTANCE mysqld3; -ERROR HY000: Unknown instance name -START INSTANCE mysqld1; -ERROR HY000: The instance is already started - --------------------------------------------------------------------- --- 1.1.5. --------------------------------------------------------------------- -STOP INSTANCE mysqld3; -ERROR HY000: Unknown instance name - --------------------------------------------------------------------- --- 1.1.6. --------------------------------------------------------------------- -Killing the process... -Waiting... -Success: the process was restarted. -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld2 offline - --------------------------------------------------------------------- --- 1.1.7. --------------------------------------------------------------------- -START INSTANCE mysqld2; -Success: the process has been started. -Killing the process... -Waiting... -Success: the process was killed. - --------------------------------------------------------------------- --- 1.1.8. --------------------------------------------------------------------- -SHOW INSTANCE STATUS; -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 - --------------------------------------------------------------------- --- BUG#12813 --------------------------------------------------------------------- -START INSTANCE mysqld1,mysqld2,mysqld3; -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 -STOP INSTANCE mysqld1,mysqld2,mysqld3; -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 -STOP INSTANCE mysqld2; -ERROR HY000: Cannot stop instance. Perhaps the instance is not started, or was started manually, so IM cannot find the pidfile. -End of 5.0 tests diff --git a/mysql-test/suite/im/r/im_options.result b/mysql-test/suite/im/r/im_options.result deleted file mode 100644 index 22bd5d5bdf6..00000000000 --- a/mysql-test/suite/im/r/im_options.result +++ /dev/null @@ -1,151 +0,0 @@ -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 -shutdown-delay option_value -skip-stack-trace option_value -loose-skip-innodb option_value -loose-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 -shutdown-delay option_value -skip-stack-trace option_value -loose-skip-innodb option_value -loose-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; diff --git a/mysql-test/suite/im/r/im_utils.result b/mysql-test/suite/im/r/im_utils.result deleted file mode 100644 index 586a5ab6a8d..00000000000 --- a/mysql-test/suite/im/r/im_utils.result +++ /dev/null @@ -1,96 +0,0 @@ -SHOW VARIABLES LIKE 'server_id'; -Variable_name Value -server_id 1 -SHOW INSTANCES; -instance_name state -mysqld1 XXXXX -mysqld2 offline -SHOW INSTANCE OPTIONS mysqld1; -option_name value -instance_name 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 -shutdown-delay VALUE -skip-stack-trace VALUE -loose-skip-innodb VALUE -loose-skip-ndbcluster VALUE -log-output VALUE -SHOW INSTANCE OPTIONS mysqld2; -option_name value -instance_name 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 -shutdown-delay VALUE -skip-stack-trace VALUE -loose-skip-innodb VALUE -loose-skip-ndbcluster VALUE -nonguarded VALUE -log-output VALUE -START INSTANCE mysqld2; -Success: the process has been started. -STOP INSTANCE mysqld2; -Success: the process has been stopped. -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 diff --git a/mysql-test/suite/im/t/disabled.def b/mysql-test/suite/im/t/disabled.def deleted file mode 100644 index 56828810bf1..00000000000 --- a/mysql-test/suite/im/t/disabled.def +++ /dev/null @@ -1,20 +0,0 @@ -############################################################################## -# -# List the test cases that are to be disabled temporarily. -# -# Separate the test case name and the comment with ':'. -# -# : BUG# -# -# Do not use any TAB characters for whitespace. -# -############################################################################## -im_options : Bug#20294 2006-07-24 stewart Instance manager test im_options fails randomly -im_daemon_life_cycle : Bug#20294 2007-05-14 alik Instance manager tests fail randomly -im_cmd_line : Bug#20294 2007-05-14 alik Instance manager tests fail randomly -im_utils : Bug#20294 2007-05-30 alik Instance manager tests fail randomly -im_instance_conf : Bug#20294 2007-05-30 alik Instance manager tests fail randomly -im_life_cycle : BUG#27851 Instance manager dies on ASSERT in ~Thread_registry() or from not being able to close a mysqld instance. -im_instance_conf : BUG#28743 Instance manager generates warnings in test suite -im_utils : BUG#28743 Instance manager generates warnings in test suite - diff --git a/mysql-test/suite/im/t/im_check_env.inc b/mysql-test/suite/im/t/im_check_env.inc deleted file mode 100644 index 883e5d00fe4..00000000000 --- a/mysql-test/suite/im/t/im_check_env.inc +++ /dev/null @@ -1,26 +0,0 @@ -# This file is intended to be used in each IM-test. It contains stamements, -# that ensure that starting conditions (environment) for the IM-test are as -# expected. - -# Check the running instances. - ---connect (mysql1_con,localhost,root,,mysql,$IM_MYSQLD1_PORT,$IM_MYSQLD1_SOCK) - ---connection mysql1_con - -SHOW VARIABLES LIKE 'server_id'; - ---source include/not_windows.inc - ---connection default - -# Let IM detect that mysqld1 is online. This delay should be longer than -# monitoring interval. - ---sleep 2 - -# Check that IM understands that mysqld1 is online, while mysqld2 is -# offline. - ---replace_result starting XXXXX online XXXXX -SHOW INSTANCES; diff --git a/mysql-test/suite/im/t/im_cmd_line.imtest b/mysql-test/suite/im/t/im_cmd_line.imtest deleted file mode 100644 index e8264b5bb8a..00000000000 --- a/mysql-test/suite/im/t/im_cmd_line.imtest +++ /dev/null @@ -1,68 +0,0 @@ -########################################################################### -# -# Tests for user-management command-line options. -# -########################################################################### - ---source suite/im/t/im_check_env.inc - -########################################################################### - -# List users so we are sure about starting conditions. - ---echo --> Listing users... ---exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --list-users 2>&1 >/dev/null ---echo - -# Add a new user. - ---echo ==> Adding user 'testuser'... ---exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --add-user --username=testuser --password=abc 2>&1 >/dev/null ---echo - ---echo --> IM password file: ---exec cat $IM_PASSWORD_PATH ---echo --> EOF ---echo - ---echo --> Printing out line for 'testuser'... ---exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --print-password-line --username=testuser --password=abc | tail -2 | head -1 ---echo - ---echo --> Listing users... ---exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --list-users 2>&1 >/dev/null ---echo - -# Edit user's attributes. - ---echo ==> Changing the password of 'testuser'... ---exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --edit-user --username=testuser --password=xyz 2>&1 >/dev/null ---echo - ---echo --> IM password file: ---exec cat $IM_PASSWORD_PATH ---echo --> EOF ---echo - ---echo --> Printing out line for 'testuser'... ---exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --print-password-line --username=testuser --password=xyz | tail -2 | head -1 ---echo - ---echo --> Listing users... ---exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --list-users 2>&1 >/dev/null ---echo - -# Drop user. - ---echo ==> Dropping user 'testuser'... ---exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --drop-user --username=testuser 2>&1 >/dev/null ---echo - ---echo --> IM password file: ---exec cat $IM_PASSWORD_PATH ---echo --> EOF ---echo - ---echo --> Listing users... ---exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --list-users 2>&1 >/dev/null ---echo diff --git a/mysql-test/suite/im/t/im_daemon_life_cycle-im.opt b/mysql-test/suite/im/t/im_daemon_life_cycle-im.opt deleted file mode 100644 index 3a45c7a41f7..00000000000 --- a/mysql-test/suite/im/t/im_daemon_life_cycle-im.opt +++ /dev/null @@ -1,3 +0,0 @@ ---run-as-service ---log=$MYSQLTEST_VARDIR/log/im.log ---monitoring-interval=1 diff --git a/mysql-test/suite/im/t/im_daemon_life_cycle.imtest b/mysql-test/suite/im/t/im_daemon_life_cycle.imtest deleted file mode 100644 index c42ab89cc49..00000000000 --- a/mysql-test/suite/im/t/im_daemon_life_cycle.imtest +++ /dev/null @@ -1,100 +0,0 @@ -let $UTIL=$MYSQL_TEST_DIR/suite/im/t; - -########################################################################### -# -# This file contains test for (1.2) test suite. -# -# Consult WL#2789 for more information. -# -########################################################################### - ---exec $UTIL/log.sh im_daemon_life_cycle im_daemon_life_cycle.imtest started. - -########################################################################### - ---source suite/im/t/im_check_env.inc - -# Turn on reconnect, not on by default anymore. ---enable_reconnect - -########################################################################### -# -# The main daemon-life-cycle test case -- check that IM-angel will restart -# IM-main if it got killed: -# - kill IM-main and check that IM-angel will restart it; -# - wait for IM-main to start accepting connections before continue test -# case; -# -# NOTE: timeout is 55 seconds. Timeout should be more than shutdown-delay -# specified for managed MySQL instance. Now shutdown-delay is 10 seconds -# (set in mysql-test-run.pl). So, 55 seconds should be enough to make 5 -# attempts. -# -########################################################################### - ---exec $UTIL/log.sh im_daemon_life_cycle Main-test: starting... - ---exec $UTIL/log.sh im_daemon_life_cycle Killing IM-main... ---exec $UTIL/kill_n_check.sh $IM_PATH_PID restarted 55 im_daemon_life_cycle - ---exec $UTIL/log.sh im_daemon_life_cycle Waiting for IM-main to start accepting connections... ---exec $UTIL/wait_for_socket.sh $EXE_MYSQL $IM_PATH_SOCK $IM_USERNAME $IM_PASSWORD '' 55 im_daemon_life_cycle - ---exec $UTIL/log.sh im_daemon_life_cycle Main-test: done. - -########################################################################### -# -# BUG#12751: Instance Manager: client hangs -# - start nonguarded instance (mysqld2); -# - kill IM-main and get it restarted by IM-angel; -# - check that guarded instance (mysqld1) is accepting connections. -# - check that non-guarded instance (mysqld2) were not stopped. -# -########################################################################### - ---echo ---echo -------------------------------------------------------------------- ---echo -- Test for BUG#12751 ---echo -------------------------------------------------------------------- - ---exec $UTIL/log.sh im_daemon_life_cycle BUG12751: starting... - -# 1. Start mysqld; - ---exec $UTIL/log.sh im_daemon_life_cycle mysqld2: starting... -START INSTANCE mysqld2; - ---exec $UTIL/log.sh im_daemon_life_cycle mysqld2: waiting to start... ---exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 55 started im_daemon_life_cycle - ---exec $UTIL/log.sh im_daemon_life_cycle mysqld2: started. - -# 2. Restart IM-main; - ---exec $UTIL/log.sh im_daemon_life_cycle Killing IM-main... ---exec $UTIL/kill_n_check.sh $IM_PATH_PID restarted 55 im_daemon_life_cycle - ---exec $UTIL/log.sh im_daemon_life_cycle Waiting for IM-main to start accepting connections... ---exec $UTIL/wait_for_socket.sh $EXE_MYSQL $IM_PATH_SOCK $IM_USERNAME $IM_PASSWORD '' 55 im_daemon_life_cycle - -# 3. Issue some statement -- connection should be re-established. - ---exec $UTIL/log.sh im_daemon_life_cycle Checking that IM-main processing commands... - ---replace_column 2 STATE 3 VERSION_NUMBER 4 VERSION -SHOW INSTANCE STATUS mysqld1; - -# 4. Stop mysqld2, because it will not be stopped by IM, as it is nonguarded. -# So, if it we do not stop it, it will be stopped by mysql-test-run.pl with -# warning. - ---exec $UTIL/log.sh im_daemon_life_cycle mysqld2: stopping... -STOP INSTANCE mysqld2; - ---exec $UTIL/log.sh im_daemon_life_cycle mysqld2: waiting to stop... ---exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 55 stopped im_daemon_life_cycle ---exec $UTIL/log.sh im_daemon_life_cycle mysqld2: stopped. - -########################################################################### - ---exec $UTIL/log.sh im_daemon_life_cycle BUG12751: done. diff --git a/mysql-test/suite/im/t/im_instance_conf-im.opt b/mysql-test/suite/im/t/im_instance_conf-im.opt deleted file mode 100644 index 34b74ce0c95..00000000000 --- a/mysql-test/suite/im/t/im_instance_conf-im.opt +++ /dev/null @@ -1 +0,0 @@ ---monitoring-interval=1 diff --git a/mysql-test/suite/im/t/im_instance_conf.imtest b/mysql-test/suite/im/t/im_instance_conf.imtest deleted file mode 100644 index b667df41f98..00000000000 --- a/mysql-test/suite/im/t/im_instance_conf.imtest +++ /dev/null @@ -1,244 +0,0 @@ -########################################################################### -# -# This test suite checks the following statements: -# - CREATE INSTANCE [option1[=option1_value], ...]; -# - DROP INSTANCE ; -# -# For CREATE INSTANCE we check that: -# - CREATE INSTANCE succeeds for non-existing instance; -# - CREATE INSTANCE fails for existing instance; -# - CREATE INSTANCE can get additional options with and w/o values; -# - CREATE INSTANCE parses options and handles grammar errors correctly. -# Check that strings with spaces are handled correctly, unknown (for -# mysqld) options should also be handled; -# - CREATE INSTANCE updates both config file and internal configuration cache; -# - CREATE INSTANCE allows to create instances only with properly formed -# names (mysqld*); -# -# For DROP INSTANCE we check that: -# - DROP INSTANCE succeeds for existing instance; -# - DROP INSTANCE fails for non-existing instance; -# - DROP INSTANCE fails for active instance. -# - DROP INSTANCE updates both config file and internal configuration cache; -# -# NOTE: each CREATE INSTANCE statement must specify socket-file-name, otherwise -# this results of the test can be affected by another running test suite. -# -########################################################################### - ---source suite/im/t/im_check_env.inc - -########################################################################### -# -# Check starting conditions. -# -########################################################################### - -# Check that the configuration file contains only instances that we expect. - ---echo -------------------------------------------------------------------- ---exec grep '^server_id[^a-zA-Z0-9_\-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- - -########################################################################### -# -# CREATE INSTANCE tests. -# -########################################################################### - -# Check that CREATE INSTANCE succeeds for non-existing instance and also check -# that both config file and internal configuration cache have been updated. - -CREATE INSTANCE mysqld3 - server_id = 3, - socket = "$MYSQL_TMP_DIR/mysqld_3.sock"; - -SHOW INSTANCES; - ---echo -------------------------------------------------------------------- ---exec grep '^server_id[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- - -# Check that CREATE INSTANCE fails for existing instance. Let's all three -# existing instances (running one, stopped one and just created one). Just in -# case... - ---error 3012 # ER_CREATE_EXISTING_INSTANCE -CREATE INSTANCE mysqld1; - ---error 3012 # ER_CREATE_EXISTING_INSTANCE -CREATE INSTANCE mysqld2; - ---error 3012 # ER_CREATE_EXISTING_INSTANCE -CREATE INSTANCE mysqld3; - -# Check that CREATE INSTANCE can get additional options with and w/o values. -# Ensure that config file is updated properly. - -# - without values; - ---echo -------------------------------------------------------------------- ---exec grep "^nonguarded\$" $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- - -CREATE INSTANCE mysqld4 - nonguarded, - server_id = 4, - socket = "$MYSQL_TMP_DIR/mysqld_4.sock"; - -SHOW INSTANCES; - ---echo -------------------------------------------------------------------- ---exec grep "^nonguarded\$" $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- - -# - with value; - ---echo -------------------------------------------------------------------- ---exec grep '^test-A[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-B[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- - -CREATE INSTANCE mysqld5 - test-A = 000, - test-B = test, - server_id = 5, - socket = "$MYSQL_TMP_DIR/mysqld_5.sock"; - -SHOW INSTANCES; - ---echo -------------------------------------------------------------------- ---exec grep '^test-A[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- ---exec grep '^test-B[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- - -# Check that CREATE INSTANCE parses options and handles grammar errors -# correctly. Check that strings with spaces are handled correctly, -# unknown (for mysqld) options should also be handled. - -# - check handling of extra spaces; - ---echo -------------------------------------------------------------------- ---exec grep '^test-C1[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-C2[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- - -CREATE INSTANCE mysqld6 - test-C1 = 10 , - test-C2 = 02 , - server_id = 6, - socket = "$MYSQL_TMP_DIR/mysqld_6.sock"; - -SHOW INSTANCES; - ---echo -------------------------------------------------------------------- ---exec grep '^test-C1[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- ---exec grep '^test-C2[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- - -# - check handling of grammar error; - ---echo -------------------------------------------------------------------- ---exec grep '^test-D[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-E[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- - ---error ER_SYNTAX_ERROR -CREATE INSTANCE mysqld7 test-D = test-D-value ; -SHOW INSTANCES; - ---error ER_SYNTAX_ERROR -CREATE INSTANCE mysqld8 test-E 0 ; -SHOW INSTANCES; - ---error ER_SYNTAX_ERROR -CREATE INSTANCE mysqld8 test-F = ; -SHOW INSTANCES; - ---echo -------------------------------------------------------------------- ---exec grep '^test-D[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-E[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- - -# - check parsing of string option values - ---echo -------------------------------------------------------------------- ---exec grep '^test-1[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-2[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-3[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-4[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-5[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-6[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-7[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- - -CREATE INSTANCE mysqld9 - test-1=" hello world ", - test-2=' ', - server_id = 9, - socket = "$MYSQL_TMP_DIR/mysqld_9.sock"; -SHOW INSTANCES; - -CREATE INSTANCE mysqld10 - test-3='\b\babc\sdef', - server_id = 10, - socket = "$MYSQL_TMP_DIR/mysqld_10.sock"; -# test-3='abc def' -SHOW INSTANCES; - -CREATE INSTANCE mysqld11 - test-4='abc\tdef', - test-5='abc\ndef', - server_id = 11, - socket = "$MYSQL_TMP_DIR/mysqld_11.sock"; -SHOW INSTANCES; - -CREATE INSTANCE mysqld12 - test-6="abc\rdef", - test-7="abc\\def", - server_id = 12, - socket = "$MYSQL_TMP_DIR/mysqld_12.sock"; -# test-6=abc -SHOW INSTANCES; - ---error ER_SYNTAX_ERROR -CREATE INSTANCE mysqld13 test-bad=' \ '; -SHOW INSTANCES; - ---echo -------------------------------------------------------------------- ---exec grep '^test-1[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- ---exec grep '^test-2[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- ---exec grep '^test-3[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- ---exec grep '^test-4[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- ---exec grep '^test-5[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- ---exec grep '^test-6[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- ---exec grep '^test-7[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- ---exec grep '^test-bad' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- - - -# Check that CREATE INSTANCE allows to create instances only with properly -# formed names (mysqld*). - ---error 3014 # ER_MALFORMED_INSTANCE_NAME -CREATE INSTANCE qqq1; - diff --git a/mysql-test/suite/im/t/im_life_cycle-im.opt b/mysql-test/suite/im/t/im_life_cycle-im.opt deleted file mode 100644 index 34b74ce0c95..00000000000 --- a/mysql-test/suite/im/t/im_life_cycle-im.opt +++ /dev/null @@ -1 +0,0 @@ ---monitoring-interval=1 diff --git a/mysql-test/suite/im/t/im_life_cycle.imtest b/mysql-test/suite/im/t/im_life_cycle.imtest deleted file mode 100644 index 31f63d82505..00000000000 --- a/mysql-test/suite/im/t/im_life_cycle.imtest +++ /dev/null @@ -1,205 +0,0 @@ -let $UTIL=$MYSQL_TEST_DIR/suite/im/t; - -########################################################################### -# -# This file contains test for (1.1) test suite. -# -# Consult WL#2789 for more information. -# -########################################################################### - ---source suite/im/t/im_check_env.inc - -########################################################################### -# -# 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; -# -########################################################################### - ---echo ---echo -------------------------------------------------------------------- ---echo -- 1.1.2. ---echo -------------------------------------------------------------------- - -START INSTANCE mysqld2; -# FIXME: START INSTANCE should be synchronous. ---exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 30 started im_life_cycle - -# FIXME: Result of SHOW INSTANCES here is not deterministic unless START -# INSTANCE is synchronous. Even waiting for mysqld to start by looking at -# its pid file is not enough, because it is unknown when IM detects that -# mysqld has started. -# SHOW INSTANCES; - ---connect (mysql_con,localhost,root,,mysql,$IM_MYSQLD2_PORT,$IM_MYSQLD2_SOCK) ---connection mysql_con - ---replace_result $IM_MYSQLD2_PORT IM_MYSQLD2_PORT -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; -# -########################################################################### - ---echo ---echo -------------------------------------------------------------------- ---echo -- 1.1.3. ---echo -------------------------------------------------------------------- - -STOP INSTANCE mysqld2; -# FIXME: STOP INSTANCE should be synchronous. ---exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 30 stopped im_life_cycle - -# FIXME: Result of SHOW INSTANCES here is not deterministic unless START -# INSTANCE is synchronous. Even waiting for mysqld to start by looking at -# its pid file is not enough, because it is unknown when IM detects that -# mysqld has started. -# SHOW INSTANCES; - -########################################################################### -# -# 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; -# -########################################################################### - ---echo ---echo -------------------------------------------------------------------- ---echo -- 1.1.4. ---echo -------------------------------------------------------------------- - ---error 3000 # ER_BAD_INSTANCE_NAME -START INSTANCE mysqld3; - ---error 3002 # ER_INSTANCE_ALREADY_STARTED -START INSTANCE mysqld1; - -########################################################################### -# -# 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; -# -########################################################################### - ---echo ---echo -------------------------------------------------------------------- ---echo -- 1.1.5. ---echo -------------------------------------------------------------------- - ---error 3000 # ER_BAD_INSTANCE_NAME -STOP INSTANCE mysqld3; - -# TODO: IM should be fixed. -# BUG#12673: Instance Manager allows to stop the instance many times -# --error 3002 # ER_INSTANCE_ALREADY_STARTED -# STOP INSTANCE mysqld2; - -########################################################################### -# -# 1.1.6. Check that Instance Manager is able to restart guarded instances. -# -########################################################################### - ---echo ---echo -------------------------------------------------------------------- ---echo -- 1.1.6. ---echo -------------------------------------------------------------------- - ---exec $UTIL/kill_n_check.sh $IM_MYSQLD1_PATH_PID restarted 30 im_life_cycle - -# Give some time to IM to detect that mysqld was restarted. It should be -# longer than monitoring interval. - ---sleep 3 - -SHOW INSTANCES; - -########################################################################### -# -# 1.1.7. Check that Instance Manager does not restart non-guarded instance. -# -########################################################################### - ---echo ---echo -------------------------------------------------------------------- ---echo -- 1.1.7. ---echo -------------------------------------------------------------------- - -START INSTANCE mysqld2; -# FIXME: START INSTANCE should be synchronous. ---exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 30 started im_life_cycle - -# FIXME: Result of SHOW INSTANCES here is not deterministic unless START -# INSTANCE is synchronous. Even waiting for mysqld to start by looking at -# its pid file is not enough, because it is unknown when IM detects that -# mysqld has started. -# SHOW INSTANCES; - ---exec $UTIL/kill_n_check.sh $IM_MYSQLD2_PATH_PID killed 10 im_life_cycle - -# FIXME: Result of SHOW INSTANCES here is not deterministic unless START -# INSTANCE is synchronous. Even waiting for mysqld to start by looking at -# its pid file is not enough, because it is unknown when IM detects that -# mysqld has started. -# SHOW INSTANCES; - -########################################################################### -# -# 1.1.8. Check that Instance Manager returns an error on -# incomplete SHOW INSTANCE STATUS command. -# -########################################################################### - ---echo ---echo -------------------------------------------------------------------- ---echo -- 1.1.8. ---echo -------------------------------------------------------------------- - ---error ER_SYNTAX_ERROR -SHOW INSTANCE STATUS; - -# -# Tests for bug fixes -# - -# -# Bug #12813 Instance Manager: START/STOP INSTANCE commands accept -# a list as argument. -# - ---echo ---echo -------------------------------------------------------------------- ---echo -- BUG#12813 ---echo -------------------------------------------------------------------- - ---error ER_SYNTAX_ERROR -START INSTANCE mysqld1,mysqld2,mysqld3; - ---error ER_SYNTAX_ERROR -STOP INSTANCE mysqld1,mysqld2,mysqld3; - -# -# Bug #12673: Instance Manager: allows to stop the instance many times -# ---error 3001 -STOP INSTANCE mysqld2; - ---echo End of 5.0 tests diff --git a/mysql-test/suite/im/t/im_options-im.opt b/mysql-test/suite/im/t/im_options-im.opt deleted file mode 100644 index 34b74ce0c95..00000000000 --- a/mysql-test/suite/im/t/im_options-im.opt +++ /dev/null @@ -1 +0,0 @@ ---monitoring-interval=1 diff --git a/mysql-test/suite/im/t/im_options.imtest b/mysql-test/suite/im/t/im_options.imtest deleted file mode 100644 index d251b97d8e7..00000000000 --- a/mysql-test/suite/im/t/im_options.imtest +++ /dev/null @@ -1,248 +0,0 @@ -########################################################################### -# -# This test suite checks the following statements: -# - SET .