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

This commit is contained in:
Vladislav Vaintroub 2016-02-01 17:51:57 +01:00
parent e6dee57f1a
commit 52d695fef4
4 changed files with 8 additions and 8 deletions

View file

@ -1,9 +1,9 @@
INSTALL SONAME 'auth_named_pipe';
CREATE USER USERNAME IDENTIFIED WITH named_pipe;
CREATE USER 'USERNAME' IDENTIFIED WITH named_pipe;
SELECT USER(),CURRENT_USER();
USER() CURRENT_USER()
USERNAME@localhost USERNAME@%
DROP USER USERNAME;
DROP USER 'USERNAME';
CREATE USER nosuchuser IDENTIFIED WITH named_pipe;
ERROR 28000: Access denied for user 'nosuchuser'@'localhost'
DROP USER nosuchuser;

View file

@ -3,7 +3,7 @@
INSTALL SONAME 'auth_named_pipe';
--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(pipe_con,localhost,$USERNAME,,,,,PIPE);
--replace_result $USERNAME USERNAME
@ -11,7 +11,7 @@ SELECT USER(),CURRENT_USER();
disconnect pipe_con;
connection default;
--replace_result $USERNAME USERNAME
eval DROP USER $USERNAME;
eval DROP USER '$USERNAME';
# test invalid user name
CREATE USER nosuchuser IDENTIFIED WITH named_pipe;

View file

@ -1,9 +1,9 @@
INSTALL SONAME 'auth_gssapi';
CREATE USER GSSAPI_SHORTNAME IDENTIFIED WITH gssapi;
CREATE USER 'GSSAPI_SHORTNAME' IDENTIFIED WITH gssapi;
SELECT USER(),CURRENT_USER();
USER() CURRENT_USER()
GSSAPI_SHORTNAME@localhost GSSAPI_SHORTNAME@%
DROP USER GSSAPI_SHORTNAME;
DROP USER 'GSSAPI_SHORTNAME';
CREATE USER nosuchuser IDENTIFIED WITH gssapi;
ERROR 28000: GSSAPI name mismatch, requested 'nosuchuser', actual name 'GSSAPI_SHORTNAME'
DROP USER nosuchuser;

View file

@ -4,7 +4,7 @@ INSTALL SONAME 'auth_gssapi';
# CREATE USER without 'AS' clause
#
--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,,);
--replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME
SELECT USER(),CURRENT_USER();
@ -12,7 +12,7 @@ disconnect con1;
connection default;
--replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME
eval DROP USER $GSSAPI_SHORTNAME;
eval DROP USER '$GSSAPI_SHORTNAME';
CREATE USER nosuchuser IDENTIFIED WITH gssapi;
--disable_query_log