WL#10922: Remove global scope sql_log_bin system variable
Affects: Server-8.x — Status: Complete
EXECUTIVE SUMMARY ================= global.sql_log_bin was set read only in MySQL 5.5, 5.6 and 5.7. In addition, reading this variable was deprecated in MySQL 5.7. This patch removes the global scope of sql_log_bin system variable in MySQL 8.0. Notes ===== Item deprecated by BUG#67433: USING SET GLOBAL SQL_LOG_BIN SHOULD NOT BE ALLOWED: * global scope for sql_log_bin should be removed completely (5.7 made it read only with a warning) This task is to remove the global scope for the sql_log_bin system variable in 8.0.
FR1. When issuing SELECT @@global.sql_log_bin shall return error ER_INCORRECT_GLOBAL_LOCAL_VAR FR2. When issuing SET @@global.sql_log_bin SHALL return error ER_LOCAL_VARIABLE
User Visible Changes ==================== - SELECT @@global.sql_log_bin now results in an error, instead of a deprecation warning and a value. The error returned is: ER_INCORRECT_GLOBAL_LOCAL_VAR Example: mysql> SELECT @@global.sql_log_bin; ERROR 1238 (HY000): Variable 'sql_log_bin' is a SESSION variable - SET @@global.sql_log_bin=1 now results in a different error. Previously, it returned ER_WRONG_VALUE_FOR_VAR, now it returns ER_LOCAL_VARIABLE Example: mysql> SET @@global.sql_log_bin=1; ERROR 1228 (HY000): Variable 'sql_log_bin' is a SESSION variable and can't be used with SET GLOBAL Upgrades ======== After upgrading, users that had tooling or scripts written relying on the (deprecated) behavior of SELECT @@global.sql_log_bin will stop working. Security ======== There are no security considerations. In fact, the access to sql_log_bin has been restricted on a per session basis. This means that sql_log_bin global value cannot be exposed through concurrent sessions.
LOW LEVEL CHANGES ================= 1. Adjust the MTR test cases that read the global var of sql_log_bin. 2. Remove the code to emit the deprecation warning in sys_vars.cc. 3. Remove the class Session_var_sql_log_bin which can now be reverted back to a vanilla Sql_log_bool class. 4. Remove special case for global sql_log_bin on storage/perfschema/pfs_variable.cc
Copyright (c) 2000, 2019, Oracle Corporation and/or its affiliates. All rights reserved.