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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
535c284a
Commit
535c284a
authored
Mar 18, 2020
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
parent
90b7ac28
Changes
51
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
51 changed files
with
1392 additions
and
27 deletions
+1392
-27
mysql-test/suite/binlog_encryption/rpl_skip_replication.result
...-test/suite/binlog_encryption/rpl_skip_replication.result
+1
-1
mysql-test/suite/rpl/r/rpl_skip_replication.result
mysql-test/suite/rpl/r/rpl_skip_replication.result
+1
-1
mysql-test/suite/sys_vars/r/init_slave_grant.result
mysql-test/suite/sys_vars/r/init_slave_grant.result
+46
-0
mysql-test/suite/sys_vars/r/read_binlog_speed_limit_grant.result
...est/suite/sys_vars/r/read_binlog_speed_limit_grant.result
+46
-0
mysql-test/suite/sys_vars/r/replicate_do_db_grant.result
mysql-test/suite/sys_vars/r/replicate_do_db_grant.result
+46
-0
mysql-test/suite/sys_vars/r/replicate_do_table_grant.result
mysql-test/suite/sys_vars/r/replicate_do_table_grant.result
+46
-0
mysql-test/suite/sys_vars/r/replicate_events_marked_for_skip_grant.result
.../sys_vars/r/replicate_events_marked_for_skip_grant.result
+46
-0
mysql-test/suite/sys_vars/r/replicate_ignore_db_grant.result
mysql-test/suite/sys_vars/r/replicate_ignore_db_grant.result
+46
-0
mysql-test/suite/sys_vars/r/replicate_ignore_table_grant.result
...test/suite/sys_vars/r/replicate_ignore_table_grant.result
+46
-0
mysql-test/suite/sys_vars/r/replicate_wild_do_table_grant.result
...est/suite/sys_vars/r/replicate_wild_do_table_grant.result
+46
-0
mysql-test/suite/sys_vars/r/replicate_wild_ignore_table_grant.result
...suite/sys_vars/r/replicate_wild_ignore_table_grant.result
+46
-0
mysql-test/suite/sys_vars/r/slave_compressed_protocol_grant.result
...t/suite/sys_vars/r/slave_compressed_protocol_grant.result
+46
-0
mysql-test/suite/sys_vars/r/slave_ddl_exec_mode_grant.result
mysql-test/suite/sys_vars/r/slave_ddl_exec_mode_grant.result
+46
-0
mysql-test/suite/sys_vars/r/slave_domain_parallel_threads_grant.result
...ite/sys_vars/r/slave_domain_parallel_threads_grant.result
+46
-0
mysql-test/suite/sys_vars/r/slave_exec_mode_grant.result
mysql-test/suite/sys_vars/r/slave_exec_mode_grant.result
+46
-0
mysql-test/suite/sys_vars/r/slave_max_allowed_packet_grant.result
...st/suite/sys_vars/r/slave_max_allowed_packet_grant.result
+46
-0
mysql-test/suite/sys_vars/r/slave_net_timeout_grant.result
mysql-test/suite/sys_vars/r/slave_net_timeout_grant.result
+46
-0
mysql-test/suite/sys_vars/r/slave_parallel_max_queued_grant.result
...t/suite/sys_vars/r/slave_parallel_max_queued_grant.result
+46
-0
mysql-test/suite/sys_vars/r/slave_parallel_mode_grant.result
mysql-test/suite/sys_vars/r/slave_parallel_mode_grant.result
+46
-0
mysql-test/suite/sys_vars/r/slave_parallel_threads_grant.result
...test/suite/sys_vars/r/slave_parallel_threads_grant.result
+46
-0
mysql-test/suite/sys_vars/r/slave_parallel_workers_grant.result
...test/suite/sys_vars/r/slave_parallel_workers_grant.result
+46
-0
mysql-test/suite/sys_vars/r/slave_run_triggers_for_rbr_grant.result
.../suite/sys_vars/r/slave_run_triggers_for_rbr_grant.result
+46
-0
mysql-test/suite/sys_vars/r/slave_sql_verify_checksum_grant.result
...t/suite/sys_vars/r/slave_sql_verify_checksum_grant.result
+46
-0
mysql-test/suite/sys_vars/r/slave_transaction_retry_interval_grant.result
.../sys_vars/r/slave_transaction_retry_interval_grant.result
+46
-0
mysql-test/suite/sys_vars/r/slave_type_conversions_grant.result
...test/suite/sys_vars/r/slave_type_conversions_grant.result
+46
-0
mysql-test/suite/sys_vars/t/init_slave_grant.test
mysql-test/suite/sys_vars/t/init_slave_grant.test
+9
-0
mysql-test/suite/sys_vars/t/read_binlog_speed_limit_grant.test
...-test/suite/sys_vars/t/read_binlog_speed_limit_grant.test
+9
-0
mysql-test/suite/sys_vars/t/replicate_do_db_grant.test
mysql-test/suite/sys_vars/t/replicate_do_db_grant.test
+9
-0
mysql-test/suite/sys_vars/t/replicate_do_table_grant.test
mysql-test/suite/sys_vars/t/replicate_do_table_grant.test
+9
-0
mysql-test/suite/sys_vars/t/replicate_events_marked_for_skip_grant.test
...te/sys_vars/t/replicate_events_marked_for_skip_grant.test
+9
-0
mysql-test/suite/sys_vars/t/replicate_ignore_db_grant.test
mysql-test/suite/sys_vars/t/replicate_ignore_db_grant.test
+9
-0
mysql-test/suite/sys_vars/t/replicate_ignore_table_grant.test
...l-test/suite/sys_vars/t/replicate_ignore_table_grant.test
+9
-0
mysql-test/suite/sys_vars/t/replicate_wild_do_table_grant.test
...-test/suite/sys_vars/t/replicate_wild_do_table_grant.test
+9
-0
mysql-test/suite/sys_vars/t/replicate_wild_ignore_table_grant.test
...t/suite/sys_vars/t/replicate_wild_ignore_table_grant.test
+9
-0
mysql-test/suite/sys_vars/t/slave_compressed_protocol_grant.test
...est/suite/sys_vars/t/slave_compressed_protocol_grant.test
+9
-0
mysql-test/suite/sys_vars/t/slave_ddl_exec_mode_grant.test
mysql-test/suite/sys_vars/t/slave_ddl_exec_mode_grant.test
+9
-0
mysql-test/suite/sys_vars/t/slave_domain_parallel_threads_grant.test
...suite/sys_vars/t/slave_domain_parallel_threads_grant.test
+9
-0
mysql-test/suite/sys_vars/t/slave_exec_mode_grant.test
mysql-test/suite/sys_vars/t/slave_exec_mode_grant.test
+9
-0
mysql-test/suite/sys_vars/t/slave_max_allowed_packet_grant.test
...test/suite/sys_vars/t/slave_max_allowed_packet_grant.test
+9
-0
mysql-test/suite/sys_vars/t/slave_net_timeout_grant.test
mysql-test/suite/sys_vars/t/slave_net_timeout_grant.test
+9
-0
mysql-test/suite/sys_vars/t/slave_parallel_max_queued_grant.test
...est/suite/sys_vars/t/slave_parallel_max_queued_grant.test
+9
-0
mysql-test/suite/sys_vars/t/slave_parallel_mode_grant.test
mysql-test/suite/sys_vars/t/slave_parallel_mode_grant.test
+9
-0
mysql-test/suite/sys_vars/t/slave_parallel_threads_grant.test
...l-test/suite/sys_vars/t/slave_parallel_threads_grant.test
+9
-0
mysql-test/suite/sys_vars/t/slave_parallel_workers_grant.test
...l-test/suite/sys_vars/t/slave_parallel_workers_grant.test
+9
-0
mysql-test/suite/sys_vars/t/slave_run_triggers_for_rbr_grant.test
...st/suite/sys_vars/t/slave_run_triggers_for_rbr_grant.test
+9
-0
mysql-test/suite/sys_vars/t/slave_sql_verify_checksum_grant.test
...est/suite/sys_vars/t/slave_sql_verify_checksum_grant.test
+9
-0
mysql-test/suite/sys_vars/t/slave_transaction_retry_interval_grant.test
...te/sys_vars/t/slave_transaction_retry_interval_grant.test
+9
-0
mysql-test/suite/sys_vars/t/slave_type_conversions_grant.test
...l-test/suite/sys_vars/t/slave_type_conversions_grant.test
+9
-0
sql/privilege.h
sql/privilege.h
+52
-0
sql/sys_vars.cc
sql/sys_vars.cc
+63
-23
sql/sys_vars.ic
sql/sys_vars.ic
+10
-2
No files found.
mysql-test/suite/binlog_encryption/rpl_skip_replication.result
View file @
535c284a
...
...
@@ -7,7 +7,7 @@ SELECT,UPDATE ON *.* TO 'nonsuperuser'@'127.0.0.1';
connect nonpriv, 127.0.0.1, nonsuperuser,, test, $SLAVE_MYPORT,;
connection nonpriv;
SET GLOBAL replicate_events_marked_for_skip=FILTER_ON_MASTER;
ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
ERROR 42000: Access denied; you need (at least one of) the SUPER
, REPLICATION SLAVE ADMIN
privilege(s) for this operation
disconnect nonpriv;
connection slave;
DROP USER'nonsuperuser'@'127.0.0.1';
...
...
mysql-test/suite/rpl/r/rpl_skip_replication.result
View file @
535c284a
...
...
@@ -7,7 +7,7 @@ SELECT,UPDATE ON *.* TO 'nonsuperuser'@'127.0.0.1';
connect nonpriv, 127.0.0.1, nonsuperuser,, test, $SLAVE_MYPORT,;
connection nonpriv;
SET GLOBAL replicate_events_marked_for_skip=FILTER_ON_MASTER;
ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
ERROR 42000: Access denied; you need (at least one of) the SUPER
, REPLICATION SLAVE ADMIN
privilege(s) for this operation
disconnect nonpriv;
connection slave;
DROP USER'nonsuperuser'@'127.0.0.1';
...
...
mysql-test/suite/sys_vars/r/init_slave_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.init_slave;
# Test that "SET init_slave" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL init_slave='SET @x=1';
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET init_slave='SET @x=1';
ERROR HY000: Variable 'init_slave' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION init_slave='SET @x=1';
ERROR HY000: Variable 'init_slave' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET init_slave" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL init_slave='SET @x=1';
SET init_slave='SET @x=1';
ERROR HY000: Variable 'init_slave' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION init_slave='SET @x=1';
ERROR HY000: Variable 'init_slave' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET init_slave" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL init_slave='SET @x=1';
SET init_slave='SET @x=1';
ERROR HY000: Variable 'init_slave' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION init_slave='SET @x=1';
ERROR HY000: Variable 'init_slave' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.init_slave=@global;
mysql-test/suite/sys_vars/r/read_binlog_speed_limit_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.read_binlog_speed_limit;
# Test that "SET read_binlog_speed_limit" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL read_binlog_speed_limit=65536;
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET read_binlog_speed_limit=65536;
ERROR HY000: Variable 'read_binlog_speed_limit' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION read_binlog_speed_limit=65536;
ERROR HY000: Variable 'read_binlog_speed_limit' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET read_binlog_speed_limit" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL read_binlog_speed_limit=65536;
SET read_binlog_speed_limit=65536;
ERROR HY000: Variable 'read_binlog_speed_limit' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION read_binlog_speed_limit=65536;
ERROR HY000: Variable 'read_binlog_speed_limit' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET read_binlog_speed_limit" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL read_binlog_speed_limit=65536;
SET read_binlog_speed_limit=65536;
ERROR HY000: Variable 'read_binlog_speed_limit' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION read_binlog_speed_limit=65536;
ERROR HY000: Variable 'read_binlog_speed_limit' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.read_binlog_speed_limit=@global;
mysql-test/suite/sys_vars/r/replicate_do_db_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.replicate_do_db;
# Test that "SET replicate_do_db" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_do_db='';
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET replicate_do_db='';
ERROR HY000: Variable 'replicate_do_db' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_do_db='';
ERROR HY000: Variable 'replicate_do_db' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET replicate_do_db" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_do_db='';
SET replicate_do_db='';
ERROR HY000: Variable 'replicate_do_db' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_do_db='';
ERROR HY000: Variable 'replicate_do_db' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET replicate_do_db" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_do_db='';
SET replicate_do_db='';
ERROR HY000: Variable 'replicate_do_db' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_do_db='';
ERROR HY000: Variable 'replicate_do_db' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.replicate_do_db=@global;
mysql-test/suite/sys_vars/r/replicate_do_table_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.replicate_do_table;
# Test that "SET replicate_do_table" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_do_table='';
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET replicate_do_table='';
ERROR HY000: Variable 'replicate_do_table' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_do_table='';
ERROR HY000: Variable 'replicate_do_table' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET replicate_do_table" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_do_table='';
SET replicate_do_table='';
ERROR HY000: Variable 'replicate_do_table' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_do_table='';
ERROR HY000: Variable 'replicate_do_table' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET replicate_do_table" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_do_table='';
SET replicate_do_table='';
ERROR HY000: Variable 'replicate_do_table' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_do_table='';
ERROR HY000: Variable 'replicate_do_table' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.replicate_do_table=@global;
mysql-test/suite/sys_vars/r/replicate_events_marked_for_skip_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.replicate_events_marked_for_skip;
# Test that "SET replicate_events_marked_for_skip" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_events_marked_for_skip=REPLICATE;
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET replicate_events_marked_for_skip=REPLICATE;
ERROR HY000: Variable 'replicate_events_marked_for_skip' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_events_marked_for_skip=REPLICATE;
ERROR HY000: Variable 'replicate_events_marked_for_skip' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET replicate_events_marked_for_skip" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_events_marked_for_skip=REPLICATE;
SET replicate_events_marked_for_skip=REPLICATE;
ERROR HY000: Variable 'replicate_events_marked_for_skip' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_events_marked_for_skip=REPLICATE;
ERROR HY000: Variable 'replicate_events_marked_for_skip' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET replicate_events_marked_for_skip" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_events_marked_for_skip=REPLICATE;
SET replicate_events_marked_for_skip=REPLICATE;
ERROR HY000: Variable 'replicate_events_marked_for_skip' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_events_marked_for_skip=REPLICATE;
ERROR HY000: Variable 'replicate_events_marked_for_skip' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.replicate_events_marked_for_skip=@global;
mysql-test/suite/sys_vars/r/replicate_ignore_db_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.replicate_ignore_db;
# Test that "SET replicate_ignore_db" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_ignore_db='';
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET replicate_ignore_db='';
ERROR HY000: Variable 'replicate_ignore_db' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_ignore_db='';
ERROR HY000: Variable 'replicate_ignore_db' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET replicate_ignore_db" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_ignore_db='';
SET replicate_ignore_db='';
ERROR HY000: Variable 'replicate_ignore_db' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_ignore_db='';
ERROR HY000: Variable 'replicate_ignore_db' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET replicate_ignore_db" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_ignore_db='';
SET replicate_ignore_db='';
ERROR HY000: Variable 'replicate_ignore_db' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_ignore_db='';
ERROR HY000: Variable 'replicate_ignore_db' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.replicate_ignore_db=@global;
mysql-test/suite/sys_vars/r/replicate_ignore_table_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.replicate_ignore_table;
# Test that "SET replicate_ignore_table" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_ignore_table='';
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET replicate_ignore_table='';
ERROR HY000: Variable 'replicate_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_ignore_table='';
ERROR HY000: Variable 'replicate_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET replicate_ignore_table" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_ignore_table='';
SET replicate_ignore_table='';
ERROR HY000: Variable 'replicate_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_ignore_table='';
ERROR HY000: Variable 'replicate_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET replicate_ignore_table" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_ignore_table='';
SET replicate_ignore_table='';
ERROR HY000: Variable 'replicate_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_ignore_table='';
ERROR HY000: Variable 'replicate_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.replicate_ignore_table=@global;
mysql-test/suite/sys_vars/r/replicate_wild_do_table_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.replicate_wild_do_table;
# Test that "SET replicate_wild_do_table" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_wild_do_table='';
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET replicate_wild_do_table='';
ERROR HY000: Variable 'replicate_wild_do_table' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_wild_do_table='';
ERROR HY000: Variable 'replicate_wild_do_table' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET replicate_wild_do_table" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_wild_do_table='';
SET replicate_wild_do_table='';
ERROR HY000: Variable 'replicate_wild_do_table' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_wild_do_table='';
ERROR HY000: Variable 'replicate_wild_do_table' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET replicate_wild_do_table" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_wild_do_table='';
SET replicate_wild_do_table='';
ERROR HY000: Variable 'replicate_wild_do_table' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_wild_do_table='';
ERROR HY000: Variable 'replicate_wild_do_table' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.replicate_wild_do_table=@global;
mysql-test/suite/sys_vars/r/replicate_wild_ignore_table_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.replicate_wild_ignore_table;
# Test that "SET replicate_wild_ignore_table" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_wild_ignore_table='';
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET replicate_wild_ignore_table='';
ERROR HY000: Variable 'replicate_wild_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_wild_ignore_table='';
ERROR HY000: Variable 'replicate_wild_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET replicate_wild_ignore_table" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_wild_ignore_table='';
SET replicate_wild_ignore_table='';
ERROR HY000: Variable 'replicate_wild_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_wild_ignore_table='';
ERROR HY000: Variable 'replicate_wild_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET replicate_wild_ignore_table" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL replicate_wild_ignore_table='';
SET replicate_wild_ignore_table='';
ERROR HY000: Variable 'replicate_wild_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION replicate_wild_ignore_table='';
ERROR HY000: Variable 'replicate_wild_ignore_table' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.replicate_wild_ignore_table=@global;
mysql-test/suite/sys_vars/r/slave_compressed_protocol_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.slave_compressed_protocol;
# Test that "SET slave_compressed_protocol" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_compressed_protocol=1;
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET slave_compressed_protocol=1;
ERROR HY000: Variable 'slave_compressed_protocol' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_compressed_protocol=1;
ERROR HY000: Variable 'slave_compressed_protocol' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_compressed_protocol" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_compressed_protocol=1;
SET slave_compressed_protocol=1;
ERROR HY000: Variable 'slave_compressed_protocol' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_compressed_protocol=1;
ERROR HY000: Variable 'slave_compressed_protocol' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_compressed_protocol" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_compressed_protocol=1;
SET slave_compressed_protocol=1;
ERROR HY000: Variable 'slave_compressed_protocol' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_compressed_protocol=1;
ERROR HY000: Variable 'slave_compressed_protocol' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.slave_compressed_protocol=@global;
mysql-test/suite/sys_vars/r/slave_ddl_exec_mode_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.slave_ddl_exec_mode;
# Test that "SET slave_ddl_exec_mode" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_ddl_exec_mode=STRICT;
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET slave_ddl_exec_mode=STRICT;
ERROR HY000: Variable 'slave_ddl_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_ddl_exec_mode=STRICT;
ERROR HY000: Variable 'slave_ddl_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_ddl_exec_mode" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_ddl_exec_mode=STRICT;
SET slave_ddl_exec_mode=STRICT;
ERROR HY000: Variable 'slave_ddl_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_ddl_exec_mode=STRICT;
ERROR HY000: Variable 'slave_ddl_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_ddl_exec_mode" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_ddl_exec_mode=STRICT;
SET slave_ddl_exec_mode=STRICT;
ERROR HY000: Variable 'slave_ddl_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_ddl_exec_mode=STRICT;
ERROR HY000: Variable 'slave_ddl_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.slave_ddl_exec_mode=@global;
mysql-test/suite/sys_vars/r/slave_domain_parallel_threads_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.slave_domain_parallel_threads;
# Test that "SET slave_domain_parallel_threads" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_domain_parallel_threads=0;
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET slave_domain_parallel_threads=0;
ERROR HY000: Variable 'slave_domain_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_domain_parallel_threads=0;
ERROR HY000: Variable 'slave_domain_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_domain_parallel_threads" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_domain_parallel_threads=0;
SET slave_domain_parallel_threads=0;
ERROR HY000: Variable 'slave_domain_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_domain_parallel_threads=0;
ERROR HY000: Variable 'slave_domain_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_domain_parallel_threads" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_domain_parallel_threads=0;
SET slave_domain_parallel_threads=0;
ERROR HY000: Variable 'slave_domain_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_domain_parallel_threads=0;
ERROR HY000: Variable 'slave_domain_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.slave_domain_parallel_threads=@global;
mysql-test/suite/sys_vars/r/slave_exec_mode_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.slave_exec_mode;
# Test that "SET slave_exec_mode" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_exec_mode=STRICT;
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET slave_exec_mode=STRICT;
ERROR HY000: Variable 'slave_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_exec_mode=STRICT;
ERROR HY000: Variable 'slave_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_exec_mode" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_exec_mode=STRICT;
SET slave_exec_mode=STRICT;
ERROR HY000: Variable 'slave_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_exec_mode=STRICT;
ERROR HY000: Variable 'slave_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_exec_mode" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_exec_mode=STRICT;
SET slave_exec_mode=STRICT;
ERROR HY000: Variable 'slave_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_exec_mode=STRICT;
ERROR HY000: Variable 'slave_exec_mode' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.slave_exec_mode=@global;
mysql-test/suite/sys_vars/r/slave_max_allowed_packet_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.slave_max_allowed_packet;
# Test that "SET slave_max_allowed_packet" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_max_allowed_packet=65536;
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET slave_max_allowed_packet=65536;
ERROR HY000: Variable 'slave_max_allowed_packet' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_max_allowed_packet=65536;
ERROR HY000: Variable 'slave_max_allowed_packet' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_max_allowed_packet" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_max_allowed_packet=65536;
SET slave_max_allowed_packet=65536;
ERROR HY000: Variable 'slave_max_allowed_packet' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_max_allowed_packet=65536;
ERROR HY000: Variable 'slave_max_allowed_packet' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_max_allowed_packet" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_max_allowed_packet=65536;
SET slave_max_allowed_packet=65536;
ERROR HY000: Variable 'slave_max_allowed_packet' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_max_allowed_packet=65536;
ERROR HY000: Variable 'slave_max_allowed_packet' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.slave_max_allowed_packet=@global;
mysql-test/suite/sys_vars/r/slave_net_timeout_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.slave_net_timeout;
# Test that "SET slave_net_timeout" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_net_timeout=60;
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET slave_net_timeout=60;
ERROR HY000: Variable 'slave_net_timeout' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_net_timeout=60;
ERROR HY000: Variable 'slave_net_timeout' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_net_timeout" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_net_timeout=60;
SET slave_net_timeout=60;
ERROR HY000: Variable 'slave_net_timeout' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_net_timeout=60;
ERROR HY000: Variable 'slave_net_timeout' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_net_timeout" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_net_timeout=60;
SET slave_net_timeout=60;
ERROR HY000: Variable 'slave_net_timeout' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_net_timeout=60;
ERROR HY000: Variable 'slave_net_timeout' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.slave_net_timeout=@global;
mysql-test/suite/sys_vars/r/slave_parallel_max_queued_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.slave_parallel_max_queued;
# Test that "SET slave_parallel_max_queued" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_parallel_max_queued=65536;
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET slave_parallel_max_queued=65536;
ERROR HY000: Variable 'slave_parallel_max_queued' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_parallel_max_queued=65536;
ERROR HY000: Variable 'slave_parallel_max_queued' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_parallel_max_queued" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_parallel_max_queued=65536;
SET slave_parallel_max_queued=65536;
ERROR HY000: Variable 'slave_parallel_max_queued' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_parallel_max_queued=65536;
ERROR HY000: Variable 'slave_parallel_max_queued' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_parallel_max_queued" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_parallel_max_queued=65536;
SET slave_parallel_max_queued=65536;
ERROR HY000: Variable 'slave_parallel_max_queued' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_parallel_max_queued=65536;
ERROR HY000: Variable 'slave_parallel_max_queued' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.slave_parallel_max_queued=@global;
mysql-test/suite/sys_vars/r/slave_parallel_mode_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.slave_parallel_mode;
# Test that "SET slave_parallel_mode" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_parallel_mode=1;
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET slave_parallel_mode=1;
ERROR HY000: Variable 'slave_parallel_mode' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_parallel_mode=1;
ERROR HY000: Variable 'slave_parallel_mode' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_parallel_mode" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_parallel_mode=1;
SET slave_parallel_mode=1;
ERROR HY000: Variable 'slave_parallel_mode' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_parallel_mode=1;
ERROR HY000: Variable 'slave_parallel_mode' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_parallel_mode" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_parallel_mode=1;
SET slave_parallel_mode=1;
ERROR HY000: Variable 'slave_parallel_mode' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_parallel_mode=1;
ERROR HY000: Variable 'slave_parallel_mode' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.slave_parallel_mode=@global;
mysql-test/suite/sys_vars/r/slave_parallel_threads_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.slave_parallel_threads;
# Test that "SET slave_parallel_threads" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_parallel_threads=256;
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET slave_parallel_threads=256;
ERROR HY000: Variable 'slave_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_parallel_threads=256;
ERROR HY000: Variable 'slave_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_parallel_threads" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_parallel_threads=256;
SET slave_parallel_threads=256;
ERROR HY000: Variable 'slave_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_parallel_threads=256;
ERROR HY000: Variable 'slave_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_parallel_threads" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_parallel_threads=256;
SET slave_parallel_threads=256;
ERROR HY000: Variable 'slave_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_parallel_threads=256;
ERROR HY000: Variable 'slave_parallel_threads' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.slave_parallel_threads=@global;
mysql-test/suite/sys_vars/r/slave_parallel_workers_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.slave_parallel_workers;
# Test that "SET slave_parallel_workers" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_parallel_workers=256;
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET slave_parallel_workers=256;
ERROR HY000: Variable 'slave_parallel_workers' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_parallel_workers=256;
ERROR HY000: Variable 'slave_parallel_workers' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_parallel_workers" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_parallel_workers=256;
SET slave_parallel_workers=256;
ERROR HY000: Variable 'slave_parallel_workers' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_parallel_workers=256;
ERROR HY000: Variable 'slave_parallel_workers' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_parallel_workers" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_parallel_workers=256;
SET slave_parallel_workers=256;
ERROR HY000: Variable 'slave_parallel_workers' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_parallel_workers=256;
ERROR HY000: Variable 'slave_parallel_workers' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.slave_parallel_workers=@global;
mysql-test/suite/sys_vars/r/slave_run_triggers_for_rbr_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.slave_run_triggers_for_rbr;
# Test that "SET slave_run_triggers_for_rbr" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_run_triggers_for_rbr=YES;
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET slave_run_triggers_for_rbr=YES;
ERROR HY000: Variable 'slave_run_triggers_for_rbr' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_run_triggers_for_rbr=YES;
ERROR HY000: Variable 'slave_run_triggers_for_rbr' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_run_triggers_for_rbr" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_run_triggers_for_rbr=YES;
SET slave_run_triggers_for_rbr=YES;
ERROR HY000: Variable 'slave_run_triggers_for_rbr' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_run_triggers_for_rbr=YES;
ERROR HY000: Variable 'slave_run_triggers_for_rbr' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_run_triggers_for_rbr" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_run_triggers_for_rbr=YES;
SET slave_run_triggers_for_rbr=YES;
ERROR HY000: Variable 'slave_run_triggers_for_rbr' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_run_triggers_for_rbr=YES;
ERROR HY000: Variable 'slave_run_triggers_for_rbr' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.slave_run_triggers_for_rbr=@global;
mysql-test/suite/sys_vars/r/slave_sql_verify_checksum_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.slave_sql_verify_checksum;
# Test that "SET slave_sql_verify_checksum" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_sql_verify_checksum=1;
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET slave_sql_verify_checksum=1;
ERROR HY000: Variable 'slave_sql_verify_checksum' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_sql_verify_checksum=1;
ERROR HY000: Variable 'slave_sql_verify_checksum' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_sql_verify_checksum" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_sql_verify_checksum=1;
SET slave_sql_verify_checksum=1;
ERROR HY000: Variable 'slave_sql_verify_checksum' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_sql_verify_checksum=1;
ERROR HY000: Variable 'slave_sql_verify_checksum' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_sql_verify_checksum" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_sql_verify_checksum=1;
SET slave_sql_verify_checksum=1;
ERROR HY000: Variable 'slave_sql_verify_checksum' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_sql_verify_checksum=1;
ERROR HY000: Variable 'slave_sql_verify_checksum' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.slave_sql_verify_checksum=@global;
mysql-test/suite/sys_vars/r/slave_transaction_retry_interval_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.slave_transaction_retry_interval;
# Test that "SET slave_transaction_retry_interval" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_transaction_retry_interval=256;
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET slave_transaction_retry_interval=256;
ERROR HY000: Variable 'slave_transaction_retry_interval' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_transaction_retry_interval=256;
ERROR HY000: Variable 'slave_transaction_retry_interval' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_transaction_retry_interval" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_transaction_retry_interval=256;
SET slave_transaction_retry_interval=256;
ERROR HY000: Variable 'slave_transaction_retry_interval' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_transaction_retry_interval=256;
ERROR HY000: Variable 'slave_transaction_retry_interval' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_transaction_retry_interval" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_transaction_retry_interval=256;
SET slave_transaction_retry_interval=256;
ERROR HY000: Variable 'slave_transaction_retry_interval' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_transaction_retry_interval=256;
ERROR HY000: Variable 'slave_transaction_retry_interval' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.slave_transaction_retry_interval=@global;
mysql-test/suite/sys_vars/r/slave_type_conversions_grant.result
0 → 100644
View file @
535c284a
#
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
#
SET @global=@@global.slave_type_conversions;
# Test that "SET slave_type_conversions" is not allowed without REPLICATION SLAVE ADMIN or SUPER
CREATE USER user1@localhost;
GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
REVOKE REPLICATION SLAVE ADMIN, SUPER ON *.* FROM user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_type_conversions=ALL_NON_LOSSY;
ERROR 42000: Access denied; you need (at least one of) the SUPER, REPLICATION SLAVE ADMIN privilege(s) for this operation
SET slave_type_conversions=ALL_NON_LOSSY;
ERROR HY000: Variable 'slave_type_conversions' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_type_conversions=ALL_NON_LOSSY;
ERROR HY000: Variable 'slave_type_conversions' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_type_conversions" is allowed with REPLICATION SLAVE ADMIN
CREATE USER user1@localhost;
GRANT REPLICATION SLAVE ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_type_conversions=ALL_NON_LOSSY;
SET slave_type_conversions=ALL_NON_LOSSY;
ERROR HY000: Variable 'slave_type_conversions' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_type_conversions=ALL_NON_LOSSY;
ERROR HY000: Variable 'slave_type_conversions' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
# Test that "SET slave_type_conversions" is allowed with SUPER
CREATE USER user1@localhost;
GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL slave_type_conversions=ALL_NON_LOSSY;
SET slave_type_conversions=ALL_NON_LOSSY;
ERROR HY000: Variable 'slave_type_conversions' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION slave_type_conversions=ALL_NON_LOSSY;
ERROR HY000: Variable 'slave_type_conversions' is a GLOBAL variable and should be set with SET GLOBAL
disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.slave_type_conversions=@global;
mysql-test/suite/sys_vars/t/init_slave_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
init_slave
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
'SET @x=1'
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/read_binlog_speed_limit_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
read_binlog_speed_limit
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
65536
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/replicate_do_db_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
replicate_do_db
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
''
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/replicate_do_table_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
replicate_do_table
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
''
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/replicate_events_marked_for_skip_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
replicate_events_marked_for_skip
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
REPLICATE
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/replicate_ignore_db_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
replicate_ignore_db
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
''
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/replicate_ignore_table_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
replicate_ignore_table
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
''
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/replicate_wild_do_table_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
replicate_wild_do_table
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
''
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/replicate_wild_ignore_table_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
replicate_wild_ignore_table
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
''
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/slave_compressed_protocol_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
slave_compressed_protocol
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
1
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/slave_ddl_exec_mode_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
slave_ddl_exec_mode
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
STRICT
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/slave_domain_parallel_threads_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
slave_domain_parallel_threads
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
0
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/slave_exec_mode_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
slave_exec_mode
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
STRICT
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/slave_max_allowed_packet_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
slave_max_allowed_packet
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
65536
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/slave_net_timeout_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
slave_net_timeout
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
60
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/slave_parallel_max_queued_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
slave_parallel_max_queued
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
65536
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/slave_parallel_mode_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
slave_parallel_mode
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
1
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/slave_parallel_threads_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
slave_parallel_threads
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
256
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/slave_parallel_workers_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
slave_parallel_workers
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
256
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/slave_run_triggers_for_rbr_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
slave_run_triggers_for_rbr
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
YES
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/slave_sql_verify_checksum_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
slave_sql_verify_checksum
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
1
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/slave_transaction_retry_interval_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
slave_transaction_retry_interval
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
256
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
mysql-test/suite/sys_vars/t/slave_type_conversions_grant.test
0 → 100644
View file @
535c284a
--
echo
#
--
echo
# MDEV-21966 Bind REPLICATION SLAVE ADMIN to a number of global system variables
--
echo
#
--
let
var
=
slave_type_conversions
--
let
grant
=
REPLICATION
SLAVE
ADMIN
--
let
value
=
ALL_NON_LOSSY
--
source
suite
/
sys_vars
/
inc
/
sysvar_global_grant
.
inc
sql/privilege.h
View file @
535c284a
...
...
@@ -477,6 +477,58 @@ constexpr privilege_t PRIV_STMT_BINLOG= REPL_SLAVE_ADMIN_ACL | SUPER_ACL;
constexpr
privilege_t
PRIV_STMT_SHOW_RELAYLOG_EVENTS
=
REPL_SLAVE_ADMIN_ACL
;
/*
Privileges for slave related global variables.
Were SUPER prior to 10.5.2.
*/
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_REPLICATE_EVENTS_MARKED_FOR_SKIP
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_REPLICATE_DO_DB
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_REPLICATE_DO_TABLE
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_REPLICATE_IGNORE_DB
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_REPLICATE_IGNORE_TABLE
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_REPLICATE_WILD_DO_TABLE
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_REPLICATE_WILD_IGNORE_TABLE
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_READ_BINLOG_SPEED_LIMIT
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_COMPRESSED_PROTOCOL
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_DDL_EXEC_MODE
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_DOMAIN_PARALLEL_THREADS
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_EXEC_MODE
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_MAX_ALLOWED_PACKET
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_NET_TIMEOUT
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_PARALLEL_MAX_QUEUED
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_PARALLEL_MODE
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_PARALLEL_THREADS
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_PARALLEL_WORKERS
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_RUN_TRIGGERS_FOR_RBR
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_SQL_VERIFY_CHECKSUM
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_TRANSACTION_RETRY_INTERVAL
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_TYPE_CONVERSIONS
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
constexpr
privilege_t
PRIV_SET_SYSTEM_GLOBAL_VAR_INIT_SLAVE
=
REPL_SLAVE_ADMIN_ACL
|
SUPER_ACL
;
/* Privileges for federated database related statements */
// Was SUPER_ACL prior to 10.5.2
constexpr
privilege_t
PRIV_STMT_CREATE_SERVER
=
FEDERATED_ADMIN_ACL
|
SUPER_ACL
;
...
...
sql/sys_vars.cc
View file @
535c284a
This diff is collapsed.
Click to expand it.
sql/sys_vars.ic
View file @
535c284a
...
...
@@ -735,12 +735,15 @@ class Sys_var_rpl_filter: public sys_var
{
private:
int opt_id;
privilege_t m_access_global;
public:
Sys_var_rpl_filter(const char *name, int getopt_id, const char *comment)
Sys_var_rpl_filter(const char *name, int getopt_id, const char *comment,
privilege_t access_global)
: sys_var(&all_sys_vars, name, comment, sys_var::GLOBAL, 0, NO_GETOPT,
NO_ARG, SHOW_CHAR, 0, NULL, VARIABLE_NOT_IN_BINLOG,
NULL, NULL, NULL), opt_id(getopt_id)
NULL, NULL, NULL), opt_id(getopt_id),
m_access_global(access_global)
{
option.var_type|= GET_STR | GET_ASK_ADDR;
}
...
...
@@ -763,6 +766,11 @@ public:
bool global_update(THD *thd, set_var *var);
bool on_check_access_global(THD *thd) const override
{
return check_global_access(thd, m_access_global);
}
protected:
uchar *global_value_ptr(THD *thd, const LEX_CSTRING *base);
bool set_filter_value(const char *value, Master_info *mi);
...
...
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