summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2020-03-18 13:27:38 +0400
committerAlexander Barkov <bar@mariadb.com>2020-03-18 13:27:38 +0400
commit36b0b302f26f59770ae12ad528e6f56c78083f4c (patch)
treeade54c25e46ec8d48398888daf6c26fae7414b4e /sql
parent1ddc1fc305e53549fa972bf3a5e76799c00e7852 (diff)
downloadmariadb-git-36b0b302f26f59770ae12ad528e6f56c78083f4c.tar.gz
MDEV-21972 Bind REPLICATION MASTER ADMIN to master_verify_checksum
Diffstat (limited to 'sql')
-rw-r--r--sql/privilege.h3
-rw-r--r--sql/sys_vars.cc4
2 files changed, 6 insertions, 1 deletions
diff --git a/sql/privilege.h b/sql/privilege.h
index 1a11c1bb4ad..14750e001e0 100644
--- a/sql/privilege.h
+++ b/sql/privilege.h
@@ -482,6 +482,9 @@ constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_RPL_SEMI_SYNC_MASTER_TRACE_LEVE
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_RPL_SEMI_SYNC_MASTER_WAIT_POINT=
REPL_MASTER_ADMIN_ACL | SUPER_ACL;
+constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_MASTER_VERIFY_CHECKSUM=
+ REPL_MASTER_ADMIN_ACL | SUPER_ACL;
+
/* Privileges for statements that are executed on the slave */
// Was SUPER_ACL prior to 10.5.2
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index 924cf914520..ff9dbcc8c49 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -3294,7 +3294,9 @@ Sys_slave_sql_verify_checksum(
GLOBAL_VAR(opt_slave_sql_verify_checksum), CMD_LINE(OPT_ARG),
DEFAULT(TRUE));
-static Sys_var_mybool Sys_master_verify_checksum(
+static Sys_var_on_access_global<Sys_var_mybool,
+ PRIV_SET_SYSTEM_GLOBAL_VAR_MASTER_VERIFY_CHECKSUM>
+Sys_master_verify_checksum(
"master_verify_checksum",
"Force checksum verification of logged events in the binary log before "
"sending them to slaves or printing them in the output of "