Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5.32, 5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL)
Description
See also http://bugs.mysql.com/bug.php?id=69953
Can't drop mysql.slow_log if slow_log=on even with log_output=FILE or NONE
I can understand preventing dropping of a log table that is in active use,
but with log_output!=TABLE it should be dropable the same way as it is when logging is not active at all
How to repeat:
SET GLOBAL log_output='FILE'; |
SET GLOBAL slow_query_log=1; |
SET GLOBAL slow_query_log_file='/tmp/slow.log'; |
|
DROP TABLE mysql.slow_log; |
# => ERROR 1580 (HY000): You cannot 'DROP' a log table if logging is enabled |
|
SET GLOBAL log_output='NONE'; |
|
DROP TABLE mysql.slow_log; |
# => ERROR 1580 (HY000): You cannot 'DROP' a log table if logging is enabled |
|
SET GLOBAL slow_query_log=0; |
|
DROP TABLE mysql.slow_log; |
# => success
|
Suggested fix:
only prevent drop of "magic" log tables if logging is enabled and configured to log to the table