mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
69a8281c41
SUPER is not required to change binlog format for session A user without SUPER privileges can change the value of the session variable BINLOG_FORMAT, causing problems for a DBA. This changeset requires a user to have SUPER privileges to change the value of the session variable BINLOG_FORMAT, and not only the global variable BINLOG_FORMAT.
28 lines
1 KiB
Text
28 lines
1 KiB
Text
reset master;
|
|
set @saved_binlog_format = @@global.binlog_format;
|
|
create user mysqltest_1@localhost;
|
|
show grants for mysqltest_1@localhost;
|
|
Grants for mysqltest_1@localhost
|
|
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
|
|
**** Variable SQL_LOG_BIN ****
|
|
[root]
|
|
set global sql_log_bin = 1;
|
|
ERROR HY000: Variable 'sql_log_bin' is a SESSION variable and can't be used with SET GLOBAL
|
|
set session sql_log_bin = 1;
|
|
[plain]
|
|
set global sql_log_bin = 1;
|
|
ERROR HY000: Variable 'sql_log_bin' is a SESSION variable and can't be used with SET GLOBAL
|
|
set session sql_log_bin = 1;
|
|
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
|
**** Variable BINLOG_FORMAT ****
|
|
[root]
|
|
set global binlog_format = row;
|
|
set session binlog_format = row;
|
|
[plain]
|
|
set global binlog_format = row;
|
|
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
|
set session binlog_format = row;
|
|
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
|
**** Clean up ****
|
|
set global binlog_format = @saved_binlog_format;
|
|
drop user mysqltest_1@localhost;
|