Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
8fa9a586
Commit
8fa9a586
authored
Apr 16, 2010
by
Luis Soares
Browse files
Options
Browse Files
Download
Plain Diff
automerge: merged bug clone into latest mysql-5.1-bugteam.
parents
d066fe78
fc34cd1c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
5 deletions
+48
-5
mysql-test/suite/rpl/r/rpl_do_grant.result
mysql-test/suite/rpl/r/rpl_do_grant.result
+14
-0
mysql-test/suite/rpl/t/rpl_do_grant.test
mysql-test/suite/rpl/t/rpl_do_grant.test
+29
-0
sql/sql_acl.cc
sql/sql_acl.cc
+5
-5
No files found.
mysql-test/suite/rpl/r/rpl_do_grant.result
View file @
8fa9a586
...
...
@@ -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"
mysql-test/suite/rpl/t/rpl_do_grant.test
View file @
8fa9a586
...
...
@@ -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"
sql/sql_acl.cc
View file @
8fa9a586
...
...
@@ -6117,19 +6117,19 @@ bool mysql_revoke_all(THD *thd, List <LEX_USER> &list)
VOID
(
pthread_mutex_unlock
(
&
acl_cache
->
lock
));
int
binlog_error
=
if
(
result
)
my_message
(
ER_REVOKE_GRANTS
,
ER
(
ER_REVOKE_GRANTS
),
MYF
(
0
));
result
=
result
|
write_bin_log
(
thd
,
FALSE
,
thd
->
query
(),
thd
->
query_length
());
rw_unlock
(
&
LOCK_grant
);
close_thread_tables
(
thd
);
/* error for writing binary log has already been reported */
if
(
result
&&
!
binlog_error
)
my_message
(
ER_REVOKE_GRANTS
,
ER
(
ER_REVOKE_GRANTS
),
MYF
(
0
));
/* Restore the state of binlog format */
thd
->
current_stmt_binlog_row_based
=
save_binlog_row_based
;
DBUG_RETURN
(
result
||
binlog_error
);
DBUG_RETURN
(
result
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment