[Commits] Rev 3010: MWL#234: Add test for changing @@replicate_ignore_do_not_replicate needing SUPER in http://bazaar.launchpad.net/~maria-captains/maria/5.2

knielsen at knielsen-hq.org knielsen at knielsen-hq.org
Tue Aug 9 12:49:48 EEST 2011


At http://bazaar.launchpad.net/~maria-captains/maria/5.2

------------------------------------------------------------
revno: 3010
revision-id: knielsen at knielsen-hq.org-20110809094948-k05esrp6gaxqd0yt
parent: knielsen at knielsen-hq.org-20110808114127-1clb5yawa0gswxp4
committer: knielsen at knielsen-hq.org
branch nick: work-5.2-mwl234
timestamp: Tue 2011-08-09 11:49:48 +0200
message:
  MWL#234: Add test for changing @@replicate_ignore_do_not_replicate needing SUPER
=== modified file 'mysql-test/suite/rpl/r/rpl_do_not_replicate.result'
--- a/mysql-test/suite/rpl/r/rpl_do_not_replicate.result	2011-08-08 11:41:27 +0000
+++ b/mysql-test/suite/rpl/r/rpl_do_not_replicate.result	2011-08-09 09:49:48 +0000
@@ -1,5 +1,11 @@
 include/master-slave.inc
 [connection master]
+CREATE USER 'nonsuperuser'@'127.0.0.1';
+GRANT ALTER,CREATE,DELETE,DROP,EVENT,INSERT,PROCESS,REPLICATION SLAVE,
+SELECT,UPDATE ON *.* TO 'nonsuperuser'@'127.0.0.1';
+SET GLOBAL replicate_ignore_do_not_replicate=1;
+ERROR 42000: Access denied; you need the SUPER privilege for this operation
+DROP USER'nonsuperuser'@'127.0.0.1';
 SET GLOBAL replicate_ignore_do_not_replicate=1;
 ERROR HY000: This operation cannot be performed with a running slave; run STOP SLAVE first
 STOP SLAVE;

=== modified file 'mysql-test/suite/rpl/t/rpl_do_not_replicate.test'
--- a/mysql-test/suite/rpl/t/rpl_do_not_replicate.test	2011-08-08 11:41:27 +0000
+++ b/mysql-test/suite/rpl/t/rpl_do_not_replicate.test	2011-08-09 09:49:48 +0000
@@ -2,6 +2,18 @@
 --source include/have_innodb.inc
 
 connection slave;
+# Test that SUPER is required to change @@replicate_ignore_do_not_replicate.
+CREATE USER 'nonsuperuser'@'127.0.0.1';
+GRANT ALTER,CREATE,DELETE,DROP,EVENT,INSERT,PROCESS,REPLICATION SLAVE,
+      SELECT,UPDATE ON *.* TO 'nonsuperuser'@'127.0.0.1';
+connect(nonpriv, 127.0.0.1, nonsuperuser,, test, $SLAVE_MYPORT,);
+connection nonpriv;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL replicate_ignore_do_not_replicate=1;
+disconnect nonpriv;
+connection slave;
+DROP USER'nonsuperuser'@'127.0.0.1';
+
 --error ER_SLAVE_MUST_STOP
 SET GLOBAL replicate_ignore_do_not_replicate=1;
 STOP SLAVE;



More information about the commits mailing list