Commit bfec91ab authored by Georgi Kodinov's avatar Georgi Kodinov

auto-merge

parents ea9b7da1 62e0f61e
...@@ -108,13 +108,16 @@ select * from t1; ...@@ -108,13 +108,16 @@ select * from t1;
a a
1 1
drop table t1; drop table t1;
Bug#43748 -- Bug#43748
make a non-privileged user on slave. -- make a user on the slave that can list but not kill system threads.
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
GRANT USAGE ON *.* TO user43748@127.0.0.1 IDENTIFIED BY 'meow'; GRANT USAGE ON *.* TO user43748@127.0.0.1 IDENTIFIED BY 'meow';
try to KILL system-thread as non-privileged user. GRANT PROCESS ON *.* TO user43748@127.0.0.1;
KILL `select id from information_schema.processlist where command='Binlog Dump'`; -- try to KILL system-thread as that non-privileged user (on slave).
ERROR HY000: You are not owner of thread `select id from information_schema.processlist where command='Binlog Dump'` SELECT id INTO @id FROM information_schema.processlist WHERE user='system user' LIMIT 1;
throw out test-user on slave. KILL @id;
Got one of the listed errors
-- throw out test-user on slave.
DROP USER user43748@127.0.0.1; DROP USER user43748@127.0.0.1;
done. back to master. -- done. back to master.
End of 5.1 tests
...@@ -228,36 +228,34 @@ source include/delete_anonymous_users.inc; ...@@ -228,36 +228,34 @@ source include/delete_anonymous_users.inc;
# Bug#43748: crash when non-super user tries to kill the replication threads # Bug#43748: crash when non-super user tries to kill the replication threads
# #
--echo Bug#43748 --echo -- Bug#43748
--echo -- make a user on the slave that can list but not kill system threads.
connection slave; connection slave;
--echo make a non-privileged user on slave.
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
GRANT USAGE ON *.* TO user43748@127.0.0.1 IDENTIFIED BY 'meow'; GRANT USAGE ON *.* TO user43748@127.0.0.1 IDENTIFIED BY 'meow';
GRANT PROCESS ON *.* TO user43748@127.0.0.1;
let $id = `SELECT id FROM information_schema.processlist WHERE user='system user' LIMIT 1`;
--echo -- try to KILL system-thread as that non-privileged user (on slave).
connect (cont43748,127.0.0.1,user43748,meow,test,$SLAVE_MYPORT,); connect (cont43748,127.0.0.1,user43748,meow,test,$SLAVE_MYPORT,);
connection cont43748; connection cont43748;
--echo try to KILL system-thread as non-privileged user. SELECT id INTO @id FROM information_schema.processlist WHERE user='system user' LIMIT 1;
--replace_result $id "`select id from information_schema.processlist where command='Binlog Dump'`" --error ER_KILL_DENIED_ERROR,ER_NO_SUCH_THREAD
--error ER_KILL_DENIED_ERROR KILL @id;
eval KILL $id;
disconnect cont43748; disconnect cont43748;
--echo -- throw out test-user on slave.
connection slave; connection slave;
--echo throw out test-user on slave.
DROP USER user43748@127.0.0.1; DROP USER user43748@127.0.0.1;
--echo -- done. back to master.
connection master; connection master;
--echo done. back to master.
# End of tests --echo End of 5.1 tests
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment