From: Nuno Carvalho Date: April 18 2012 9:25am Subject: bzr push into mysql-trunk branch (nuno.carvalho:3893 to 3894) WL#6236 List-Archive: http://lists.mysql.com/commits/143544 Message-Id: <201204180925.q3I9Pnp1022627@acsmt356.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3894 Nuno Carvalho 2012-04-18 [merge] WL#6236: Allow SHOW MASTER LOGS and SHOW BINARY LOGS with REPLICATION CLIENT Merge from 5.5 into 5.6. modified: mysql-test/suite/binlog/r/binlog_grant.result mysql-test/suite/binlog/t/binlog_grant.test sql/sql_parse.cc 3893 magnus.blaudd@stripped 2012-04-18 [merge] Merge WL#5961 with latest trunk modified: include/mysql_com.h mysql-test/r/tablespace.result mysql-test/suite/perfschema/r/digest_table_full.result mysql-test/suite/perfschema/r/statement_digest.result mysql-test/suite/perfschema/r/statement_digest_consumers.result mysql-test/suite/perfschema/r/statement_digest_long_query.result mysql-test/t/tablespace.test sql/field.h sql/handler.h sql/lex.h sql/sql_show.cc sql/sql_table.cc sql/sql_yacc.yy sql/table.cc sql/unireg.cc === modified file 'mysql-test/suite/binlog/r/binlog_grant.result' --- a/mysql-test/suite/binlog/r/binlog_grant.result 2009-12-22 09:35:56 +0000 +++ b/mysql-test/suite/binlog/r/binlog_grant.result 2012-04-18 09:12:19 +0000 @@ -22,3 +22,7 @@ ERROR 42000: Access denied; you need (at **** Clean up **** set global binlog_format = @saved_binlog_format; drop user mysqltest_1@localhost; +GRANT REPLICATION CLIENT ON *.* TO 'mysqltest_1'@'localhost'; +SHOW MASTER LOGS; +SHOW BINARY LOGS; +DROP USER 'mysqltest_1'@'localhost'; === modified file 'mysql-test/suite/binlog/t/binlog_grant.test' --- a/mysql-test/suite/binlog/t/binlog_grant.test 2009-12-22 09:35:56 +0000 +++ b/mysql-test/suite/binlog/t/binlog_grant.test 2012-04-18 09:12:19 +0000 @@ -54,3 +54,22 @@ disconnect root; connection default; set global binlog_format = @saved_binlog_format; 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'; === modified file 'sql/sql_parse.cc' --- a/sql/sql_parse.cc 2012-04-17 14:37:50 +0000 +++ b/sql/sql_parse.cc 2012-04-18 09:18:20 +0000 @@ -3042,7 +3042,7 @@ end_with_restore_list: goto error; #else { - if (check_global_access(thd, SUPER_ACL)) + if (check_global_access(thd, SUPER_ACL | REPL_CLIENT_ACL)) goto error; res = show_binlogs(thd); break; No bundle (reason: useless for push emails).