1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge 11.4 into 11.7

This commit is contained in:
Marko Mäkelä
2025-01-09 09:41:38 +02:00
552 changed files with 12641 additions and 3550 deletions

View File

@ -2,6 +2,9 @@
--source include/have_innodb.inc
--source include/have_debug.inc
--disable_query_log
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
--enable_query_log
--echo *** Test all-to-all replication with --gtid-ignore-duplicates ***

View File

@ -538,6 +538,34 @@ Master_last_event_time NULL
Slave_last_event_time NULL
Master_Slave_time_diff NULL
stop all slaves;
#
# MDEV-21858: START/STOP ALL SLAVES does not return access errors
#
connection slave;
SET SESSION sql_log_bin=0;
CREATE USER 'unpriv'@'127.0.0.1';
GRANT USAGE ON *.* TO 'unpriv'@'127.0.0.1';
connect con1,127.0.0.1,unpriv,,,$SERVER_MYPORT_3;
STOP SLAVE 'slave2';
ERROR 42000: Access denied; you need (at least one of) the REPLICATION SLAVE ADMIN privilege(s) for this operation
START SLAVE 'slave2';
ERROR 42000: Access denied; you need (at least one of) the REPLICATION SLAVE ADMIN privilege(s) for this operation
STOP ALL SLAVES;
ERROR 42000: Access denied; you need (at least one of) the REPLICATION SLAVE ADMIN privilege(s) for this operation
connection slave;
START SLAVE 'slave2';
set default_master_connection = 'slave2';
include/wait_for_slave_to_start.inc
connection con1;
START ALL SLAVES;
ERROR 42000: Access denied; you need (at least one of) the REPLICATION SLAVE ADMIN privilege(s) for this operation
disconnect con1;
connection slave;
STOP SLAVE 'slave2';
set default_master_connection = 'slave2';
include/wait_for_slave_to_stop.inc
DROP USER 'unpriv'@'127.0.0.1';
SET SESSION sql_log_bin=1;
include/reset_master_slave.inc
disconnect slave;
connection master1;

View File

@ -84,6 +84,44 @@ query_vertical show all slaves status;
# Ensure that start all slaves doesn't do anything as all slaves are stopped
stop all slaves;
--echo #
--echo # MDEV-21858: START/STOP ALL SLAVES does not return access errors
--echo #
--connection slave
SET SESSION sql_log_bin=0;
CREATE USER 'unpriv'@'127.0.0.1';
GRANT USAGE ON *.* TO 'unpriv'@'127.0.0.1';
connect (con1,127.0.0.1,unpriv,,,$SERVER_MYPORT_3);
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
STOP SLAVE 'slave2';
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
START SLAVE 'slave2';
# Test that STOP/START ALL SLAVES checks privileges, even if there are no
# slaves that need stopping or starting.
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
STOP ALL SLAVES;
--connection slave
START SLAVE 'slave2';
set default_master_connection = 'slave2';
--source include/wait_for_slave_to_start.inc
--connection con1
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
START ALL SLAVES;
--disconnect con1
--connection slave
STOP SLAVE 'slave2';
set default_master_connection = 'slave2';
--source include/wait_for_slave_to_stop.inc
DROP USER 'unpriv'@'127.0.0.1';
SET SESSION sql_log_bin=1;
#
# clean up
#