diff options
author | Luis Soares <luis.soares@sun.com> | 2010-04-16 01:59:21 +0100 |
---|---|---|
committer | Luis Soares <luis.soares@sun.com> | 2010-04-16 01:59:21 +0100 |
commit | 8fa9a5861bb0bf2a077e5b596456081da0f15dbe (patch) | |
tree | e8099f5f245fb0bdfa8328f778543e5a53e93c25 /mysql-test/suite | |
parent | d066fe78e759dae2c28f149a4c229695293050f6 (diff) | |
parent | fc34cd1c2180976426b2c6fbcd9bdadd7b1ce337 (diff) | |
download | mariadb-git-8fa9a5861bb0bf2a077e5b596456081da0f15dbe.tar.gz |
automerge: merged bug clone into latest mysql-5.1-bugteam.
Diffstat (limited to 'mysql-test/suite')
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_do_grant.result | 14 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_do_grant.test | 29 |
2 files changed, 43 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result index 65c60acc651..4d8cfe3d8b8 100644 --- a/mysql-test/suite/rpl/r/rpl_do_grant.result +++ b/mysql-test/suite/rpl/r/rpl_do_grant.result @@ -242,4 +242,18 @@ GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION DROP TABLE t1; DROP PROCEDURE p1; DROP USER 'user49119'@'localhost'; +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +grant all on *.* to foo@"1.2.3.4"; +revoke all privileges, grant option from "foo"; +ERROR HY000: Can't revoke all privileges for one or more of the requested users +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; grant all on *.* to foo@"1.2.3.4" +master-bin.000001 # Query # # use `test`; revoke all privileges, grant option from "foo" +DROP USER foo@"1.2.3.4"; "End of test" diff --git a/mysql-test/suite/rpl/t/rpl_do_grant.test b/mysql-test/suite/rpl/t/rpl_do_grant.test index d6a06f43d18..88120aa3512 100644 --- a/mysql-test/suite/rpl/t/rpl_do_grant.test +++ b/mysql-test/suite/rpl/t/rpl_do_grant.test @@ -316,4 +316,33 @@ DROP USER 'user49119'@'localhost'; -- sync_slave_with_master +# +# Bug #51987 revoke privileges logs wrong error code +# + +-- connection master +-- source include/master-slave-reset.inc +-- connection master + +grant all on *.* to foo@"1.2.3.4"; +-- error ER_REVOKE_GRANTS +revoke all privileges, grant option from "foo"; + +## assertion: revoke is logged +-- source include/show_binlog_events.inc + +-- sync_slave_with_master + +## assertion: slave replicates revoke and does not fail because master +## logged revoke with correct expected error code +-- let $err= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1) + if ($err) +{ + -- die UNEXPECTED ERROR AT SLAVE: $err +} + +-- connection master +DROP USER foo@"1.2.3.4"; +-- sync_slave_with_master + --echo "End of test" |