Jeremy Cole recently blogged about the feature SET GLOBAL sql_log_bin. In his blog post, Jeremy suggested that there is no strong use-case for this feature, and that it is too easy to run accidentally (i.e. SET GLOBAL instead of SET [SESSION]). The result of this incorrect usage is that slaves will drift out of sync from masters.
We discussed Jeremy's request in the MySQL team, and we agree that the syntax should produce an error in MySQL 5.7. However, we have not yet determined which steps should be taken for MySQL 5.5 and MySQL 5.6. The two proposals we would like to float are:
- The statement SET GLOBAL sql_log_bin=N produces a warning.
- The statement SET GLOBAL sql_log_bin=N produces an error.
Option #1 does not specifically solve Jeremy's reported issue, because even though the command provides a warning, it will still execute. Thus, the data-drift from accidental usage will still occur; the operator will simply be aware of the problem sooner.
Option #2 does not follow our standard policy regarding functionality changes in GA releases. That is to say that we are discussing making a special exception since this behaviour is regarded as dangerous and almost certainly unintended.
We are seeking input from the community as to which is the better of these two options:
- Which is your preference - option #1 or option #2?
- Do you agree that this specific situation warrants a behaviour change in GA releases?
Please leave a comment, or get in touch!