Commit 10a1dffb authored by unknown's avatar unknown

Fix for BUG#21247: im_instance_conf.imtest fails on trees with test-1

in their name.

The problem was that IM-tests contained grep-statements with too wide
patterns. The fix is to make these patterns more restrictive. Only IM-tests
have been fixed, no code has been touched. 


mysql-test/t/im_instance_conf.imtest:
  Use more restrictive pattern.
mysql-test/t/im_options.imtest:
  Use more restrictive pattern.
parent 35afcaab
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
# Check that the configuration file contains only instances that we expect. # Check that the configuration file contains only instances that we expect.
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep server_id $MYSQLTEST_VARDIR/im.cnf; --exec grep '^server_id\>' $MYSQLTEST_VARDIR/im.cnf;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
# Check that mysqld1 is reported as running. # Check that mysqld1 is reported as running.
...@@ -79,7 +79,7 @@ CREATE INSTANCE mysqld3 ...@@ -79,7 +79,7 @@ CREATE INSTANCE mysqld3
SHOW INSTANCES; SHOW INSTANCES;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep server_id $MYSQLTEST_VARDIR/im.cnf ; --exec grep '^server_id\>' $MYSQLTEST_VARDIR/im.cnf;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
# Check that CREATE INSTANCE fails for existing instance. Let's all three # Check that CREATE INSTANCE fails for existing instance. Let's all three
...@@ -101,7 +101,7 @@ CREATE INSTANCE mysqld3; ...@@ -101,7 +101,7 @@ CREATE INSTANCE mysqld3;
# - without values; # - without values;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep nonguarded $MYSQLTEST_VARDIR/im.cnf; --exec grep '^nonguarded\>' $MYSQLTEST_VARDIR/im.cnf;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
CREATE INSTANCE mysqld4 CREATE INSTANCE mysqld4
...@@ -112,15 +112,15 @@ CREATE INSTANCE mysqld4 ...@@ -112,15 +112,15 @@ CREATE INSTANCE mysqld4
SHOW INSTANCES; SHOW INSTANCES;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep nonguarded $MYSQLTEST_VARDIR/im.cnf; --exec grep '^nonguarded\>' $MYSQLTEST_VARDIR/im.cnf;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
# - with value; # - with value;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-A $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^test-A\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-B $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^test-B\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
CREATE INSTANCE mysqld5 CREATE INSTANCE mysqld5
...@@ -132,9 +132,9 @@ CREATE INSTANCE mysqld5 ...@@ -132,9 +132,9 @@ CREATE INSTANCE mysqld5
SHOW INSTANCES; SHOW INSTANCES;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-A $MYSQLTEST_VARDIR/im.cnf; --exec grep '^test-A\>' $MYSQLTEST_VARDIR/im.cnf;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-B $MYSQLTEST_VARDIR/im.cnf; --exec grep '^test-B\>' $MYSQLTEST_VARDIR/im.cnf;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
# Check that CREATE INSTANCE parses options and handles grammar errors # Check that CREATE INSTANCE parses options and handles grammar errors
...@@ -144,7 +144,7 @@ SHOW INSTANCES; ...@@ -144,7 +144,7 @@ SHOW INSTANCES;
# - check handling of extra spaces; # - check handling of extra spaces;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-C $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^test-C\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
CREATE INSTANCE mysqld6 CREATE INSTANCE mysqld6
...@@ -156,17 +156,17 @@ CREATE INSTANCE mysqld6 ...@@ -156,17 +156,17 @@ CREATE INSTANCE mysqld6
SHOW INSTANCES; SHOW INSTANCES;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-C1 $MYSQLTEST_VARDIR/im.cnf; --exec grep '^test-C1\>' $MYSQLTEST_VARDIR/im.cnf;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-C2 $MYSQLTEST_VARDIR/im.cnf; --exec grep '^test-C2\>' $MYSQLTEST_VARDIR/im.cnf;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
# - check handling of grammar error; # - check handling of grammar error;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-D $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^test-D\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-E $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^test-E\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--error ER_SYNTAX_ERROR --error ER_SYNTAX_ERROR
...@@ -182,21 +182,21 @@ CREATE INSTANCE mysqld8 test-F = ; ...@@ -182,21 +182,21 @@ CREATE INSTANCE mysqld8 test-F = ;
SHOW INSTANCES; SHOW INSTANCES;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-D $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^test-D\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-E $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^test-E\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
# - check parsing of string option values # - check parsing of string option values
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-1 $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^test-1\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-2 $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^test-2\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-3 $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^test-3\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-4 $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^test-4\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
CREATE INSTANCE mysqld9 CREATE INSTANCE mysqld9
...@@ -233,21 +233,21 @@ CREATE INSTANCE mysqld13 test-bad=' \ '; ...@@ -233,21 +233,21 @@ CREATE INSTANCE mysqld13 test-bad=' \ ';
SHOW INSTANCES; SHOW INSTANCES;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-1 $MYSQLTEST_VARDIR/im.cnf; --exec grep '^test-1\>' $MYSQLTEST_VARDIR/im.cnf;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-2 $MYSQLTEST_VARDIR/im.cnf; --exec grep '^test-2\>' $MYSQLTEST_VARDIR/im.cnf;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-3 $MYSQLTEST_VARDIR/im.cnf; --exec grep '^test-3\>' $MYSQLTEST_VARDIR/im.cnf;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-4 $MYSQLTEST_VARDIR/im.cnf; --exec grep '^test-4\>' $MYSQLTEST_VARDIR/im.cnf;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-5 $MYSQLTEST_VARDIR/im.cnf; --exec grep '^test-5\>' $MYSQLTEST_VARDIR/im.cnf;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-6 $MYSQLTEST_VARDIR/im.cnf; --exec grep '^test-6\>' $MYSQLTEST_VARDIR/im.cnf;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-7 $MYSQLTEST_VARDIR/im.cnf; --exec grep '^test-7\>' $MYSQLTEST_VARDIR/im.cnf;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep test-bad $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^test-bad\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
# - check the configuration file; # - check the configuration file;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep server_id $MYSQLTEST_VARDIR/im.cnf ; --exec grep '^server_id\>' $MYSQLTEST_VARDIR/im.cnf ;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
# - check the running instances. # - check the running instances.
...@@ -133,25 +133,25 @@ UNSET mysqld2.server_id = 11; ...@@ -133,25 +133,25 @@ UNSET mysqld2.server_id = 11;
SET mysqld2.aaa, mysqld3.bbb, mysqld2.ccc = 0010, mysqld3.ddd = 0020; SET mysqld2.aaa, mysqld3.bbb, mysqld2.ccc = 0010, mysqld3.ddd = 0020;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep aaa $MYSQLTEST_VARDIR/im.cnf ; --exec grep '^aaa\>' $MYSQLTEST_VARDIR/im.cnf ;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep bbb $MYSQLTEST_VARDIR/im.cnf ; --exec grep '^bbb\>' $MYSQLTEST_VARDIR/im.cnf ;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep ccc $MYSQLTEST_VARDIR/im.cnf ; --exec grep '^ccc\>' $MYSQLTEST_VARDIR/im.cnf ;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep ddd $MYSQLTEST_VARDIR/im.cnf ; --exec grep '^ddd\>' $MYSQLTEST_VARDIR/im.cnf ;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
UNSET mysqld2.aaa, mysqld3.bbb, mysqld2.ccc, mysqld3.ddd; UNSET mysqld2.aaa, mysqld3.bbb, mysqld2.ccc, mysqld3.ddd;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep aaa $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^aaa\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep bbb $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^bbb\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep ccc $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^ccc\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep ddd $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^ddd\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
# - check that if some instance name is invalid or the active is active, # - check that if some instance name is invalid or the active is active,
...@@ -161,22 +161,22 @@ UNSET mysqld2.aaa, mysqld3.bbb, mysqld2.ccc, mysqld3.ddd; ...@@ -161,22 +161,22 @@ UNSET mysqld2.aaa, mysqld3.bbb, mysqld2.ccc, mysqld3.ddd;
SET mysqld2.aaa, mysqld3.bbb, mysqld.ccc = 0010; SET mysqld2.aaa, mysqld3.bbb, mysqld.ccc = 0010;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep aaa $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^aaa\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep bbb $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^bbb\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep ccc $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^ccc\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--error 3015 # ER_INSTANCE_IS_ACTIVE --error 3015 # ER_INSTANCE_IS_ACTIVE
SET mysqld2.aaa, mysqld3.bbb, mysqld1.ccc = 0010; SET mysqld2.aaa, mysqld3.bbb, mysqld1.ccc = 0010;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep aaa $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^aaa\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep bbb $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^bbb\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep ccc $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^ccc\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
# - check that if some instance name is invalid or the active is active, # - check that if some instance name is invalid or the active is active,
...@@ -186,14 +186,14 @@ SET mysqld2.aaa, mysqld3.bbb, mysqld1.ccc = 0010; ...@@ -186,14 +186,14 @@ SET mysqld2.aaa, mysqld3.bbb, mysqld1.ccc = 0010;
UNSET mysqld2.server_id, mysqld3.server_id, mysqld.ccc; UNSET mysqld2.server_id, mysqld3.server_id, mysqld.ccc;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep server_id $MYSQLTEST_VARDIR/im.cnf; --exec grep '^server_id\>' $MYSQLTEST_VARDIR/im.cnf;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--error 3015 # ER_INSTANCE_IS_ACTIVE --error 3015 # ER_INSTANCE_IS_ACTIVE
UNSET mysqld2.server_id, mysqld3.server_id, mysqld1.ccc; UNSET mysqld2.server_id, mysqld3.server_id, mysqld1.ccc;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep server_id $MYSQLTEST_VARDIR/im.cnf; --exec grep '^server_id\>' $MYSQLTEST_VARDIR/im.cnf;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
DROP INSTANCE mysqld3; DROP INSTANCE mysqld3;
...@@ -207,21 +207,21 @@ SET mysqld2 . server_id = 222 ; ...@@ -207,21 +207,21 @@ SET mysqld2 . server_id = 222 ;
SET mysqld2 . server_id = 222 , mysqld2 . aaa , mysqld2 . bbb ; SET mysqld2 . server_id = 222 , mysqld2 . aaa , mysqld2 . bbb ;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep server_id $MYSQLTEST_VARDIR/im.cnf ; --exec grep '^server_id\>' $MYSQLTEST_VARDIR/im.cnf ;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep aaa $MYSQLTEST_VARDIR/im.cnf ; --exec grep '^aaa\>' $MYSQLTEST_VARDIR/im.cnf ;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep bbb $MYSQLTEST_VARDIR/im.cnf ; --exec grep '^bbb\>' $MYSQLTEST_VARDIR/im.cnf ;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
UNSET mysqld2 . aaa , mysqld2 . bbb ; UNSET mysqld2 . aaa , mysqld2 . bbb ;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep server_id $MYSQLTEST_VARDIR/im.cnf ; --exec grep '^server_id\>' $MYSQLTEST_VARDIR/im.cnf ;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep aaa $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^aaa\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep bbb $MYSQLTEST_VARDIR/im.cnf || true; --exec grep '^bbb\>' $MYSQLTEST_VARDIR/im.cnf || true;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
########################################################################### ###########################################################################
...@@ -235,7 +235,7 @@ UNSET mysqld2 . aaa , mysqld2 . bbb ; ...@@ -235,7 +235,7 @@ UNSET mysqld2 . aaa , mysqld2 . bbb ;
# server_id=SERVER_ID for mysqld2); # server_id=SERVER_ID for mysqld2);
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
--exec grep server_id $MYSQLTEST_VARDIR/im.cnf ; --exec grep '^server_id\>' $MYSQLTEST_VARDIR/im.cnf ;
--echo -------------------------------------------------------------------- --echo --------------------------------------------------------------------
# - (for mysqld1) check that the running instance has not been affected: # - (for mysqld1) check that the running instance has not been affected:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment