mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
MDEV-8638: REVOKE ALL PRIVILEGES, GRANT OPTION FROM CURRENT_ROLE breaks replication
Fix the replication failure caused by incorect initialization of THD::invoker_host && THD::invoker_user. Breakdown of the failure is this: Query_log_event::host and Query_log_event::user can have their LEX_STRING's set to length 0, but the actual str member points to garbage. Code afterwards copies Query_log_event::host and user to THD::invoker_host and THD::invoker_user. Calling code for these members expects both members to be initialized. Eg. the str member be a NULL terminated string and length have appropriate size.
This commit is contained in:
parent
5fd8087590
commit
b449612907
3 changed files with 50 additions and 2 deletions
|
|
@ -0,0 +1,21 @@
|
|||
include/master-slave.inc
|
||||
[connection master]
|
||||
create role r1;
|
||||
set role r1;
|
||||
grant select on db.* to current_role;
|
||||
revoke all privileges, grant option from current_role;
|
||||
drop role r1;
|
||||
include/rpl_end.inc
|
||||
connection server_2;
|
||||
connection server_2;
|
||||
connection server_2;
|
||||
connection server_2;
|
||||
connection server_1;
|
||||
connection server_1;
|
||||
connection server_1;
|
||||
connection server_2;
|
||||
connection server_1;
|
||||
connection server_2;
|
||||
connection server_2;
|
||||
connection server_1;
|
||||
connection server_1;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
--source include/master-slave.inc
|
||||
--source include/have_binlog_format_mixed.inc
|
||||
|
||||
--enable_connect_log
|
||||
|
||||
create role r1;
|
||||
set role r1;
|
||||
grant select on db.* to current_role;
|
||||
revoke all privileges, grant option from current_role;
|
||||
drop role r1;
|
||||
|
||||
--source include/rpl_end.inc
|
||||
Loading…
Add table
Add a link
Reference in a new issue