Description:
With show_compatibility_56 = ON (the default), a warning is returned that sql_log_bin is deprecated (in a global context) when executing SHOW GLOBAL VARIABLES.
See also Bug 20575529 ( http://bugs.mysql.com/bug.php?id=75980 ) which is the same case but for show_compatibility_56 = OFF.
How to repeat:
mysql> SHOW GLOBAL VARIABLES LIKE 'show_compatibility_56';
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| show_compatibility_56 | ON |
+-----------------------+-------+
1 row in set (0.00 sec)
mysql> SHOW GLOBAL VARIABLES;
...
476 rows in set, 1 warning (0.01 sec)
mysql> SHOW WARNINGS;
+---------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message |
+---------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Warning | 1287 | '@@global.sql_log_bin' is deprecated and will be removed in a future release. Please use the constant 1 (since @@global.sql_log_bin is always equal to 1) instead |
+---------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> SELECT * FROM information_schema.GLOBAL_VARIABLES;
...
476 rows in set, 2 warnings (0.00 sec)
mysql> SHOW WARNINGS;
+---------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message |
+---------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Warning | 1287 | 'INFORMATION_SCHEMA.GLOBAL_VARIABLES' is deprecated and will be removed in a future release. Please use performance_schema.global_variables instead |
| Warning | 1287 | '@@global.sql_log_bin' is deprecated and will be removed in a future release. Please use the constant 1 (since @@global.sql_log_bin is always equal to 1) instead |
+---------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
Suggested fix:
Don't display the warning at least unless requesting the value of @@global.sql_log_bin explicitly.
[7 May 2015 16:19]
Paul DuBois
Noted in 5.7.8, 5.8.0 changelogs.
SHOW GLOBAL VARIABLES and selecting from the INFORMATION_SCHEMA
GLOBAL_VARIABLES table resulted in a spurious warning about the
sql_log_bin system variable.
Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders. It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.