Feature request: allow dynamic revert of "Turning logging off for the whole duration of the MySQL server process."
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
There is an upstream bug describing a dangerous server behavior: when binary logging is turned off due to disk full or file permission etc, the server allows writes without binlogging: https:/
The error log has:
[ERROR] Could not open ./mysql-bin.000006 for logging (error 13). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.
The question and feature request here is, can we allow binlogging to be turned back on dynamically once the cause is fixed?
We had a customer case where it was likely that mysql-bin.index file's permission was not right. Then a subsequent 'flush logs' gave us the above error and binlogging was stopped. We had to restart the server to get things back which was disruptive. Why a restart is needed? It felt like that a 'flush logs' command should be able to verify binlogging possbility and resume binlogging whenever possible.
tags: | added: i50691 |
Changed in percona-server: | |
importance: | Undecided → Wishlist |
status: | Confirmed → Triaged |
Verified with PS 5.6.22,
mysql> show global variables like 'binlog_error%'; ------- ------- -+----- ------- --+ ------- ------- -+----- ------- --+ ------- ------- -+----- ------- --+
+------
| Variable_name | Value |
+------
| binlog_error_action | IGNORE_ERROR |
+------
With above settings, if anything wrong with permissions of mysql-bin.index i.e
-rw-rw---- 1 nilnandan nilnandan 38 Feb 11 10:33 mysql-bin.index
and we'll run flush logs, it will give error,
mysql> flush logs;
ERROR 29 (HY000): File './mysql-bin.index' not found (Errcode: 13 - Permission denied)
mysql>
After setting proper permissions, when we'll run again "flush logs", it doesn't give error but its not enable binlogging.
mysql> flush logs;
Query OK, 0 rows affected (0.00 sec)
For starting binlogging again , we have to restart mysql server. so, I agree with this feature request that if binlogging will be on dynamically without restarting mysql server, it will be helpful.