Skip to content
Permalink
Browse files
MDEV-25884 Tests use environment $USER variable without quotes
  • Loading branch information
elenst committed Jun 9, 2021
1 parent c872125 commit 7a1eff0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
@@ -1,5 +1,5 @@
INSTALL SONAME 'auth_named_pipe';
CREATE USER 'USERNAME' IDENTIFIED WITH named_pipe;
GRANT ALL PRIVILEGES ON *.* to USERNAME;
GRANT ALL PRIVILEGES ON *.* to 'USERNAME';
DROP USER 'USERNAME';
UNINSTALL SONAME 'auth_named_pipe';
@@ -18,7 +18,7 @@ INSTALL SONAME 'auth_named_pipe';
--replace_result $USERNAME USERNAME
eval CREATE USER '$USERNAME' IDENTIFIED WITH named_pipe;
--replace_result $USERNAME USERNAME
eval GRANT ALL PRIVILEGES ON *.* to $USERNAME;
eval GRANT ALL PRIVILEGES ON *.* to '$USERNAME';

let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
@@ -2,7 +2,7 @@ install plugin unix_socket soname 'auth_socket.so';
#
# with named user
#
create user USER identified via unix_socket;
create user 'USER' identified via unix_socket;
#
# name match = ok
#
@@ -12,7 +12,7 @@ USER@localhost USER@% test
#
# name does not match = failure
#
drop user USER;
drop user 'USER';
#
# and now with anonymous user
#
@@ -12,9 +12,9 @@ eval install plugin unix_socket soname '$AUTH_SOCKET_SO';
--echo # with named user
--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;

--write_file $MYSQLTEST_VARDIR/tmp/peercred_test.txt
--let $replace1=$USER@localhost
@@ -34,9 +34,9 @@ EOF
--error 1
--exec $MYSQL_TEST -u foobar --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/peercred_test.txt

--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';

--echo #
--echo # and now with anonymous user

0 comments on commit 7a1eff0

Please sign in to comment.