List:Commits« Previous MessageNext Message »
From:Nuno Carvalho Date:April 18 2012 9:25am
Subject:bzr push into mysql-5.5 branch (nuno.carvalho:3791 to 3792) WL#6236
View as plain text  
 3792 Nuno Carvalho	2012-04-18 [merge]
      WL#6236: Allow SHOW MASTER LOGS and SHOW BINARY LOGS with REPLICATION CLIENT
      
      Merge from 5.1 into 5.5.

    modified:
      mysql-test/suite/binlog/r/binlog_grant.result
      mysql-test/suite/binlog/t/binlog_grant.test
      sql/sql_parse.cc
 3791 Chaithra Gopalareddy	2012-04-18 [merge]
      Merge from 5.1 to 5.5
     @ mysql-test/r/select.result
        Added test result for Bug#12713907
     @ mysql-test/t/select.test
        Added test case for Bug#12713907
     @ sql/sql_select.cc
        Remove the call to set_keyread as we do it from access
        functions 'join_read_first' and 'join_read_last'

    modified:
      mysql-test/r/select.result
      mysql-test/t/select.test
      sql/sql_select.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-02-19 04:11:08 +0000
+++ b/sql/sql_parse.cc	2012-04-18 09:12:19 +0000
@@ -2677,7 +2677,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).
Thread
bzr push into mysql-5.5 branch (nuno.carvalho:3791 to 3792) WL#6236Nuno Carvalho20 Apr