mirror of
https://github.com/MariaDB/server.git
synced 2025-10-12 02:39:14 +02:00

Follow-up patch with adjustments of test files and updates of result files for tests. Part 2
45 lines
1.1 KiB
Text
45 lines
1.1 KiB
Text
--source include/not_embedded.inc
|
|
|
|
SET @global=@@global.secure_auth;
|
|
|
|
--echo #
|
|
--echo # MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
|
|
--echo #
|
|
|
|
--echo # Test that "SET secure_auth" is not allowed without CONNECTION ADMIN
|
|
|
|
CREATE USER user1@localhost;
|
|
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
|
|
REVOKE CONNECTION ADMIN ON *.* FROM user1@localhost;
|
|
--connect(user1,localhost,user1,,)
|
|
--connection user1
|
|
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
|
|
SET GLOBAL secure_auth=1;
|
|
--error ER_GLOBAL_VARIABLE
|
|
SET secure_auth=1;
|
|
--error ER_GLOBAL_VARIABLE
|
|
SET SESSION secure_auth=1;
|
|
--disconnect user1
|
|
--connection default
|
|
--disable_warnings
|
|
DROP USER user1@localhost;
|
|
--enable_warnings
|
|
|
|
--echo # Test that "SET secure_auth" is allowed with CONNECTION ADMIN
|
|
|
|
CREATE USER user1@localhost;
|
|
GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
|
|
--connect(user1,localhost,user1,,)
|
|
--connection user1
|
|
SET GLOBAL secure_auth=1;
|
|
--error ER_GLOBAL_VARIABLE
|
|
SET secure_auth=1;
|
|
--error ER_GLOBAL_VARIABLE
|
|
SET SESSION secure_auth=1;
|
|
--disconnect user1
|
|
--connection default
|
|
--disable_warnings
|
|
DROP USER user1@localhost;
|
|
--enable_warnings
|
|
|
|
SET @@global.secure_auth=@global;
|