mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Bug#43748: crash when non-super user tries to kill the replication threads
Fine-tuning. Broke out comparison into method by suggestion of Davi. Clarified comments. Reverting test-case which I find too brittle; proper test case in 5.1+.
This commit is contained in:
@ -4,24 +4,6 @@ reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
FLUSH PRIVILEGES;
|
||||
drop table if exists t999;
|
||||
create temporary table t999(
|
||||
id int,
|
||||
user char(255),
|
||||
host char(255),
|
||||
db char(255),
|
||||
Command char(255),
|
||||
time int,
|
||||
State char(255),
|
||||
info char(255)
|
||||
);
|
||||
LOAD DATA INFILE "./tmp/bl_dump_thread_id" into table t999;
|
||||
drop table t999;
|
||||
GRANT USAGE ON *.* TO user43748@localhost;
|
||||
KILL `select id from information_schema.processlist where command='Binlog Dump'`;
|
||||
ERROR HY000: You are not owner of thread `select id from information_schema.processlist where command='Binlog Dump'`
|
||||
DROP USER user43748@localhost;
|
||||
reset master;
|
||||
SET @save_select_limit=@@session.sql_select_limit;
|
||||
SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100;
|
||||
|
@ -3,42 +3,6 @@ source include/add_anonymous_users.inc;
|
||||
|
||||
source include/master-slave.inc;
|
||||
|
||||
#
|
||||
# Bug#43748: crash when non-super user tries to kill the replication threads
|
||||
#
|
||||
|
||||
--connection master
|
||||
save_master_pos;
|
||||
|
||||
--connection slave
|
||||
sync_with_master;
|
||||
|
||||
--connection slave
|
||||
FLUSH PRIVILEGES;
|
||||
|
||||
# in 5.0, we need to do some hocus pocus to get a system-thread ID (-> $id)
|
||||
--source include/get_binlog_dump_thread_id.inc
|
||||
|
||||
# make a non-privileged user on slave. try to KILL system-thread as her.
|
||||
GRANT USAGE ON *.* TO user43748@localhost;
|
||||
|
||||
--connect (mysqltest_2_con,localhost,user43748,,test,$SLAVE_MYPORT,)
|
||||
--connection mysqltest_2_con
|
||||
|
||||
--replace_result $id "`select id from information_schema.processlist where command='Binlog Dump'`"
|
||||
--error ER_KILL_DENIED_ERROR
|
||||
eval KILL $id;
|
||||
|
||||
--disconnect mysqltest_2_con
|
||||
|
||||
--connection slave
|
||||
|
||||
DROP USER user43748@localhost;
|
||||
|
||||
--connection master
|
||||
|
||||
|
||||
|
||||
# Clean up old slave's binlogs.
|
||||
# The slave is started with --log-slave-updates
|
||||
# and this test does SHOW BINLOG EVENTS on the slave's
|
||||
|
Reference in New Issue
Block a user