Commit 52d695fe authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix authentication plugin's tests in case username contains non-alphanumeric character, e.g dash

parent e6dee57f
INSTALL SONAME 'auth_named_pipe'; INSTALL SONAME 'auth_named_pipe';
CREATE USER USERNAME IDENTIFIED WITH named_pipe; CREATE USER 'USERNAME' IDENTIFIED WITH named_pipe;
SELECT USER(),CURRENT_USER(); SELECT USER(),CURRENT_USER();
USER() CURRENT_USER() USER() CURRENT_USER()
USERNAME@localhost USERNAME@% USERNAME@localhost USERNAME@%
DROP USER USERNAME; DROP USER 'USERNAME';
CREATE USER nosuchuser IDENTIFIED WITH named_pipe; CREATE USER nosuchuser IDENTIFIED WITH named_pipe;
ERROR 28000: Access denied for user 'nosuchuser'@'localhost' ERROR 28000: Access denied for user 'nosuchuser'@'localhost'
DROP USER nosuchuser; DROP USER nosuchuser;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
INSTALL SONAME 'auth_named_pipe'; INSTALL SONAME 'auth_named_pipe';
--replace_result $USERNAME USERNAME --replace_result $USERNAME USERNAME
eval CREATE USER $USERNAME IDENTIFIED WITH named_pipe; eval CREATE USER '$USERNAME' IDENTIFIED WITH named_pipe;
# Connect using named pipe, correct username # Connect using named pipe, correct username
connect(pipe_con,localhost,$USERNAME,,,,,PIPE); connect(pipe_con,localhost,$USERNAME,,,,,PIPE);
--replace_result $USERNAME USERNAME --replace_result $USERNAME USERNAME
...@@ -11,7 +11,7 @@ SELECT USER(),CURRENT_USER(); ...@@ -11,7 +11,7 @@ SELECT USER(),CURRENT_USER();
disconnect pipe_con; disconnect pipe_con;
connection default; connection default;
--replace_result $USERNAME USERNAME --replace_result $USERNAME USERNAME
eval DROP USER $USERNAME; eval DROP USER '$USERNAME';
# test invalid user name # test invalid user name
CREATE USER nosuchuser IDENTIFIED WITH named_pipe; CREATE USER nosuchuser IDENTIFIED WITH named_pipe;
......
INSTALL SONAME 'auth_gssapi'; INSTALL SONAME 'auth_gssapi';
CREATE USER GSSAPI_SHORTNAME IDENTIFIED WITH gssapi; CREATE USER 'GSSAPI_SHORTNAME' IDENTIFIED WITH gssapi;
SELECT USER(),CURRENT_USER(); SELECT USER(),CURRENT_USER();
USER() CURRENT_USER() USER() CURRENT_USER()
GSSAPI_SHORTNAME@localhost GSSAPI_SHORTNAME@% GSSAPI_SHORTNAME@localhost GSSAPI_SHORTNAME@%
DROP USER GSSAPI_SHORTNAME; DROP USER 'GSSAPI_SHORTNAME';
CREATE USER nosuchuser IDENTIFIED WITH gssapi; CREATE USER nosuchuser IDENTIFIED WITH gssapi;
ERROR 28000: GSSAPI name mismatch, requested 'nosuchuser', actual name 'GSSAPI_SHORTNAME' ERROR 28000: GSSAPI name mismatch, requested 'nosuchuser', actual name 'GSSAPI_SHORTNAME'
DROP USER nosuchuser; DROP USER nosuchuser;
......
...@@ -4,7 +4,7 @@ INSTALL SONAME 'auth_gssapi'; ...@@ -4,7 +4,7 @@ INSTALL SONAME 'auth_gssapi';
# CREATE USER without 'AS' clause # CREATE USER without 'AS' clause
# #
--replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME --replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME
eval CREATE USER $GSSAPI_SHORTNAME IDENTIFIED WITH gssapi; eval CREATE USER '$GSSAPI_SHORTNAME' IDENTIFIED WITH gssapi;
connect (con1,localhost,$GSSAPI_SHORTNAME,,); connect (con1,localhost,$GSSAPI_SHORTNAME,,);
--replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME --replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME
SELECT USER(),CURRENT_USER(); SELECT USER(),CURRENT_USER();
...@@ -12,7 +12,7 @@ disconnect con1; ...@@ -12,7 +12,7 @@ disconnect con1;
connection default; connection default;
--replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME --replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME
eval DROP USER $GSSAPI_SHORTNAME; eval DROP USER '$GSSAPI_SHORTNAME';
CREATE USER nosuchuser IDENTIFIED WITH gssapi; CREATE USER nosuchuser IDENTIFIED WITH gssapi;
--disable_query_log --disable_query_log
......
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