diff options
author | Elena Stepanova <elenst@mariadb.com> | 2021-06-09 15:50:01 +0300 |
---|---|---|
committer | Elena Stepanova <elenst@mariadb.com> | 2021-06-10 00:39:04 +0300 |
commit | 0b9a59bbc45203c68df2efd0382f63e694439bb0 (patch) | |
tree | 2139847f021a5569bafbd4ef615706933d387efd | |
parent | f13b80af39c68a3d6f68c66416978795444759bb (diff) | |
download | mariadb-git-0b9a59bbc45203c68df2efd0382f63e694439bb0.tar.gz |
MDEV-25884 Tests use environment $USER variable without quotes
These are only 10.4+ tests. 10.2+ tests are pushed into 10.2
and will be merged into 10.4+ independently
-rw-r--r-- | mysql-test/main/password_expiration_unix_socket.result | 6 | ||||
-rw-r--r-- | mysql-test/main/password_expiration_unix_socket.test | 18 | ||||
-rw-r--r-- | mysql-test/suite/plugins/r/multiauth.result | 24 | ||||
-rw-r--r-- | mysql-test/suite/plugins/t/multiauth.test | 28 |
4 files changed, 38 insertions, 38 deletions
diff --git a/mysql-test/main/password_expiration_unix_socket.result b/mysql-test/main/password_expiration_unix_socket.result index 5feee17f205..b37b8868edf 100644 --- a/mysql-test/main/password_expiration_unix_socket.result +++ b/mysql-test/main/password_expiration_unix_socket.result @@ -1,8 +1,8 @@ # # A password cannot expire, if there is no password # -create user USER identified via unix_socket; -alter user USER password expire; +create user 'USER' identified via unix_socket; +alter user 'USER' password expire; 1 1 -drop user USER; +drop user 'USER'; diff --git a/mysql-test/main/password_expiration_unix_socket.test b/mysql-test/main/password_expiration_unix_socket.test index f2579aaf18f..d936d65bc21 100644 --- a/mysql-test/main/password_expiration_unix_socket.test +++ b/mysql-test/main/password_expiration_unix_socket.test @@ -9,16 +9,16 @@ --echo # A password cannot expire, if there is no password --echo # ---let $replace=create user $USER ---replace_result $replace "create user USER" ---eval create user $USER identified via unix_socket +--let $replace=create user '$USER' +--replace_result $replace "create user 'USER'" +--eval create user '$USER' identified via unix_socket ---let $replace=alter user $USER ---replace_result $replace "alter user USER" ---eval alter user $USER password expire +--let $replace=alter user '$USER' +--replace_result $replace "alter user 'USER'" +--eval alter user '$USER' password expire --exec $MYSQL -u $USER -e 'select 1' ---let $replace=drop user $USER ---replace_result $replace "drop user USER" ---eval drop user $USER +--let $replace=drop user '$USER' +--replace_result $replace "drop user 'USER'" +--eval drop user '$USER' diff --git a/mysql-test/suite/plugins/r/multiauth.result b/mysql-test/suite/plugins/r/multiauth.result index 7b6465c3040..8e19433322d 100644 --- a/mysql-test/suite/plugins/r/multiauth.result +++ b/mysql-test/suite/plugins/r/multiauth.result @@ -1,5 +1,5 @@ install soname 'auth_ed25519'; -create user USER identified via unix_socket OR mysql_native_password as password("GOOD"); +create user 'USER' identified via unix_socket OR mysql_native_password as password("GOOD"); create user mysqltest1 identified via unix_socket OR mysql_native_password as password("good"); show create user mysqltest1; CREATE USER for mysqltest1@% @@ -14,8 +14,8 @@ user() current_user() database() mysqltest1@localhost mysqltest1@% test # name does not match, password bad = failure mysqltest: Could not open connection 'default': 1045 Access denied for user 'mysqltest1'@'localhost' (using password: YES) -drop user USER, mysqltest1; -create user USER identified via mysql_native_password as password("GOOD") OR unix_socket; +drop user 'USER', mysqltest1; +create user 'USER' identified via mysql_native_password as password("GOOD") OR unix_socket; create user mysqltest1 identified via mysql_native_password as password("good") OR unix_socket; show create user mysqltest1; CREATE USER for mysqltest1@% @@ -30,8 +30,8 @@ user() current_user() database() mysqltest1@localhost mysqltest1@% test # name does not match, password bad = failure mysqltest: Could not open connection 'default': 1698 Access denied for user 'mysqltest1'@'localhost' -drop user USER, mysqltest1; -create user USER identified via unix_socket OR ed25519 as password("GOOD"); +drop user 'USER', mysqltest1; +create user 'USER' identified via unix_socket OR ed25519 as password("GOOD"); create user mysqltest1 identified via unix_socket OR ed25519 as password("good"); show create user mysqltest1; CREATE USER for mysqltest1@% @@ -46,8 +46,8 @@ user() current_user() database() mysqltest1@localhost mysqltest1@% test # name does not match, password bad = failure mysqltest: Could not open connection 'default': 1045 Access denied for user 'mysqltest1'@'localhost' (using password: YES) -drop user USER, mysqltest1; -create user USER identified via ed25519 as password("GOOD") OR unix_socket; +drop user 'USER', mysqltest1; +create user 'USER' identified via ed25519 as password("GOOD") OR unix_socket; create user mysqltest1 identified via ed25519 as password("good") OR unix_socket; show create user mysqltest1; CREATE USER for mysqltest1@% @@ -62,8 +62,8 @@ user() current_user() database() mysqltest1@localhost mysqltest1@% test # name does not match, password bad = failure mysqltest: Could not open connection 'default': 1698 Access denied for user 'mysqltest1'@'localhost' -drop user USER, mysqltest1; -create user USER identified via ed25519 as password("GOOD") OR unix_socket OR mysql_native_password as password("works"); +drop user 'USER', mysqltest1; +create user 'USER' identified via ed25519 as password("GOOD") OR unix_socket OR mysql_native_password as password("works"); create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works"); show create user mysqltest1; CREATE USER for mysqltest1@% @@ -82,7 +82,7 @@ user() current_user() database() mysqltest1@localhost mysqltest1@% test # name does not match, password bad = failure mysqltest: Could not open connection 'default': 1045 Access denied for user 'mysqltest1'@'localhost' (using password: YES) -drop user USER, mysqltest1; +drop user 'USER', mysqltest1; create user mysqltest1 identified via mysql_native_password as password("good") OR mysql_native_password as password("works"); show create user mysqltest1; CREATE USER for mysqltest1@% @@ -156,7 +156,7 @@ drop user mysqltest1; create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works"); ERROR HY000: Column count of mysql.user is wrong. Expected 3, found 47. Created with MariaDB XX.YY.ZZ, now running XX.YY.ZZ. Please use mysql_upgrade to fix this error # switching back from mysql.user to mysql.global_priv -create user USER identified via mysql_native_password as '1234567890123456789012345678901234567890a' OR unix_socket; +create user 'USER' identified via mysql_native_password as '1234567890123456789012345678901234567890a' OR unix_socket; create user mysqltest1 identified via mysql_native_password as '1234567890123456789012345678901234567890a' OR unix_socket; update mysql.global_priv set priv=replace(priv, '1234567890123456789012345678901234567890a', 'invalid password'); flush privileges; @@ -174,7 +174,7 @@ set password for mysqltest1 = password('bla'); select user(), current_user(), database(); user() current_user() database() mysqltest1@localhost mysqltest1@% test -drop user USER, mysqltest1; +drop user 'USER', mysqltest1; create user mysqltest1 identified via ed25519 as password("good"); show create user mysqltest1; CREATE USER for mysqltest1@% diff --git a/mysql-test/suite/plugins/t/multiauth.test b/mysql-test/suite/plugins/t/multiauth.test index 4cf44fc7c65..253e8823d37 100644 --- a/mysql-test/suite/plugins/t/multiauth.test +++ b/mysql-test/suite/plugins/t/multiauth.test @@ -22,13 +22,13 @@ install soname 'auth_ed25519'; select user(), current_user(), database(); EOF ---let $creplace=create user $USER ---let $dreplace=drop user $USER +--let $creplace=create user '$USER' +--let $dreplace=drop user '$USER' # # socket,password # ---replace_result $creplace "create user USER" +--replace_result $creplace "create user 'USER'" eval $creplace identified via unix_socket OR mysql_native_password as password("GOOD"); create user mysqltest1 identified via unix_socket OR mysql_native_password as password("good"); show create user mysqltest1; @@ -39,13 +39,13 @@ show create user mysqltest1; --echo # name does not match, password bad = failure --error 1 --exec $try_auth -u mysqltest1 -pbad ---replace_result $dreplace "drop user USER" +--replace_result $dreplace "drop user 'USER'" eval $dreplace, mysqltest1; # # password,socket # ---replace_result $creplace "create user USER" +--replace_result $creplace "create user 'USER'" eval $creplace identified via mysql_native_password as password("GOOD") OR unix_socket; create user mysqltest1 identified via mysql_native_password as password("good") OR unix_socket; show create user mysqltest1; @@ -56,13 +56,13 @@ show create user mysqltest1; --echo # name does not match, password bad = failure --error 1 --exec $try_auth -u mysqltest1 -pbad ---replace_result $dreplace "drop user USER" +--replace_result $dreplace "drop user 'USER'" eval $dreplace, mysqltest1; # # socket,ed25519 # ---replace_result $creplace "create user USER" +--replace_result $creplace "create user 'USER'" eval $creplace identified via unix_socket OR ed25519 as password("GOOD"); create user mysqltest1 identified via unix_socket OR ed25519 as password("good"); show create user mysqltest1; @@ -73,13 +73,13 @@ show create user mysqltest1; --echo # name does not match, password bad = failure --error 1 --exec $try_auth -u mysqltest1 -pbad ---replace_result $dreplace "drop user USER" +--replace_result $dreplace "drop user 'USER'" eval $dreplace, mysqltest1; # # ed25519,socket # ---replace_result $creplace "create user USER" +--replace_result $creplace "create user 'USER'" eval $creplace identified via ed25519 as password("GOOD") OR unix_socket; create user mysqltest1 identified via ed25519 as password("good") OR unix_socket; show create user mysqltest1; @@ -90,13 +90,13 @@ show create user mysqltest1; --echo # name does not match, password bad = failure --error 1 --exec $try_auth -u mysqltest1 -pbad ---replace_result $dreplace "drop user USER" +--replace_result $dreplace "drop user 'USER'" eval $dreplace, mysqltest1; # # ed25519,socket,password # ---replace_result $creplace "create user USER" +--replace_result $creplace "create user 'USER'" eval $creplace identified via ed25519 as password("GOOD") OR unix_socket OR mysql_native_password as password("works"); create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works"); show create user mysqltest1; @@ -109,7 +109,7 @@ show create user mysqltest1; --echo # name does not match, password bad = failure --error 1 --exec $try_auth -u mysqltest1 -pbad ---replace_result $dreplace "drop user USER" +--replace_result $dreplace "drop user 'USER'" eval $dreplace, mysqltest1; # @@ -158,7 +158,7 @@ create user mysqltest1 identified via ed25519 as password("good") OR unix_socket # # invalid password,socket # ---replace_result $creplace "create user USER" +--replace_result $creplace "create user 'USER'" eval $creplace identified via mysql_native_password as '1234567890123456789012345678901234567890a' OR unix_socket; create user mysqltest1 identified via mysql_native_password as '1234567890123456789012345678901234567890a' OR unix_socket; update mysql.global_priv set priv=replace(priv, '1234567890123456789012345678901234567890a', 'invalid password'); @@ -172,7 +172,7 @@ show create user mysqltest1; --echo # SET PASSWORD helps set password for mysqltest1 = password('bla'); --exec $try_auth -u mysqltest1 -pbla ---replace_result $dreplace "drop user USER" +--replace_result $dreplace "drop user 'USER'" eval $dreplace, mysqltest1; # |