mirror of
https://github.com/MariaDB/server.git
synced 2025-10-10 09:49:16 +02:00

Follow-up patch with adjustments of test files and updates of result files for tests. Some of tests were rewritten slighlty. Everywhere where common pattern used: ----- CREATE USER userA; --connect con1 ... userA ... <sql statements...> --disconnect con1 DROP USER userA; ----- the DROP USER statement has been eclosed into the directive --disable_warnings --enable_warnings This change is caused by the race conddition between --disconnect and DROP USER since a number of currently running sessions established on behalf the user being dropped is counted by holding the rw_lock THD_list_iterator::lock that is not acquired on execution the DROP USER statement but the lock is taken as the last step on handling disconnection (when the client is already sending the next statement). Therefore, for the cases where the command --disconnect precedes the DROP USER statement we hide the possible warnings about presence of active sessions for the user being deleted to make tests deterministic.
54 lines
1.2 KiB
Text
54 lines
1.2 KiB
Text
-- source include/not_embedded.inc
|
|
|
|
--echo #
|
|
--echo # Start of 10.5 tests
|
|
--echo #
|
|
|
|
--echo #
|
|
--echo # MDEV-21975 Add BINLOG REPLAY privilege and bind new privileges to gtid_seq_no, preudo_thread_id, server_id, gtid_domain_id
|
|
--echo #
|
|
|
|
--echo #
|
|
--echo # Test that binlog replay statements are not allowed without BINLOG REPLAY
|
|
--echo #
|
|
|
|
CREATE USER user1@localhost IDENTIFIED BY '';
|
|
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
|
|
REVOKE BINLOG REPLAY ON *.* FROM user1@localhost;
|
|
|
|
connect (con1,localhost,user1,,);
|
|
connection con1;
|
|
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
|
|
BINLOG '';
|
|
disconnect con1;
|
|
|
|
connection default;
|
|
--disable_warnings
|
|
DROP USER user1@localhost;
|
|
--enable_warnings
|
|
|
|
--echo #
|
|
--echo # Test that binlog replay statements are allowed with BINLOG REPLAY
|
|
--echo #
|
|
|
|
CREATE USER user1@localhost IDENTIFIED BY '';
|
|
GRANT BINLOG REPLAY ON *.* TO user1@localhost;
|
|
SHOW GRANTS FOR user1@localhost;
|
|
|
|
connect (con1,localhost,user1,,);
|
|
connection con1;
|
|
# The below fails with a syntax error.
|
|
# This is fine. It's only important that it does not fail on "access denied".
|
|
--error ER_SYNTAX_ERROR
|
|
BINLOG '';
|
|
--enable_result_log
|
|
disconnect con1;
|
|
|
|
connection default;
|
|
--disable_warnings
|
|
DROP USER user1@localhost;
|
|
--enable_warnings
|
|
|
|
--echo #
|
|
--echo # End of 10.5 tests
|
|
--echo #
|