WL#6236: Allow SHOW MASTER LOGS and SHOW BINARY LOGS with REPLICATION CLIENT
Merge from 5.1 into 5.5.
This commit is contained in:
commit
0eea06c5d0
@ -22,3 +22,7 @@ ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) fo
|
|||||||
**** Clean up ****
|
**** Clean up ****
|
||||||
set global binlog_format = @saved_binlog_format;
|
set global binlog_format = @saved_binlog_format;
|
||||||
drop user mysqltest_1@localhost;
|
drop user mysqltest_1@localhost;
|
||||||
|
GRANT REPLICATION CLIENT ON *.* TO 'mysqltest_1'@'localhost';
|
||||||
|
SHOW MASTER LOGS;
|
||||||
|
SHOW BINARY LOGS;
|
||||||
|
DROP USER 'mysqltest_1'@'localhost';
|
||||||
|
@ -54,3 +54,22 @@ disconnect root;
|
|||||||
connection default;
|
connection default;
|
||||||
set global binlog_format = @saved_binlog_format;
|
set global binlog_format = @saved_binlog_format;
|
||||||
drop user mysqltest_1@localhost;
|
drop user mysqltest_1@localhost;
|
||||||
|
|
||||||
|
|
||||||
|
# Testing if REPLICATION CLIENT privilege is enough to execute
|
||||||
|
# SHOW MASTER LOGS and SHOW BINARY.
|
||||||
|
GRANT REPLICATION CLIENT ON *.* TO 'mysqltest_1'@'localhost';
|
||||||
|
--connect(rpl,localhost,mysqltest_1,,)
|
||||||
|
|
||||||
|
--connection rpl
|
||||||
|
# We are only interested if the following commands succeed and not on
|
||||||
|
# their output.
|
||||||
|
--disable_result_log
|
||||||
|
SHOW MASTER LOGS;
|
||||||
|
SHOW BINARY LOGS;
|
||||||
|
--enable_result_log
|
||||||
|
|
||||||
|
# clean up
|
||||||
|
--disconnect rpl
|
||||||
|
connection default;
|
||||||
|
DROP USER 'mysqltest_1'@'localhost';
|
||||||
|
@ -2677,7 +2677,7 @@ end_with_restore_list:
|
|||||||
goto error;
|
goto error;
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
if (check_global_access(thd, SUPER_ACL))
|
if (check_global_access(thd, SUPER_ACL | REPL_CLIENT_ACL))
|
||||||
goto error;
|
goto error;
|
||||||
res = show_binlogs(thd);
|
res = show_binlogs(thd);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user