summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorElena Stepanova <elenst@mariadb.com>2021-06-09 15:50:01 +0300
committerElena Stepanova <elenst@mariadb.com>2021-06-10 00:39:04 +0300
commit0b9a59bbc45203c68df2efd0382f63e694439bb0 (patch)
tree2139847f021a5569bafbd4ef615706933d387efd /mysql-test/suite
parentf13b80af39c68a3d6f68c66416978795444759bb (diff)
downloadmariadb-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
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/plugins/r/multiauth.result24
-rw-r--r--mysql-test/suite/plugins/t/multiauth.test28
2 files changed, 26 insertions, 26 deletions
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;
#