mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Fix authentication plugin's tests in case username contains non-alphanumeric character, e.g dash
This commit is contained in:
parent
e6dee57f1a
commit
52d695fef4
4 changed files with 8 additions and 8 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue