[MDEV-7969] dynamically enable/disable binlog Created: 2015-04-09 Updated: 2015-04-22 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Admin statements |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | VAROQUI Stephane | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 3 |
| Labels: | None | ||
| Description |
|
This task would be to re enabling dynamic global binlog setting in MariaDB ? set global log_bin=OFF; Most common scenario are
SQL_LOG_BIN can be use for SESSIONS and LOG_BIN=0N for GLOBAL Other solution would be to introduce new GRANTS Thanks |
| Comments |
| Comment by Elena Stepanova [ 2015-04-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I don't see why it is a regression, why it is a critical and why it is a bug. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by VAROQUI Stephane [ 2015-04-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
It's a regression because before the patch one can start a server without taking binary logs and activate them later on without restarting. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-04-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
No, one couldn't. By changing the value of SQL_LOG_BIN one could disable binary logging if it was activated at startup (and then enable again), but If binary log wasn't enabled at startup, sql_log_bin had no effect, either global or session.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by VAROQUI Stephane [ 2015-04-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yes correct, i'm taking about the possibility to Such default allow me to activate the binlog on demand like for example if a slave should become a master in any slave promotion tool. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-04-10 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I see. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2015-04-11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I quite like Jeremy's thoughts on global sql_log_bin that it should be only a session thing and Oracle have made it so in 5.7 Having log_bin as global wr sounds like a fair idea. conceptually this is possible.
There of course a lot of calls to mysql_bin_log.is_open (volatile log_state!=CLOSED) doing extra work for binary logging without any locking. Even MYSQL_BIN_LOG::write checks is_open before acquiring LOCK_LOG. At least one is_open call is in DBUG_ASSERT. It would be a fairly big undertaking to ensure that these paths return safely after disabling/enabling or changing the variable log_bin. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Guillaume Lefranc [ 2015-04-16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Such a feature would be a great differentiator for mariadb in the sense of having multi tier replication setups and being able to promote slaves on the fly without restarting them. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2015-04-22 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
 Having log_bin change having an effect once flush logs are issued seems like a fair way to not too intrusively introduce this. I'm assuming there's sufficient locking around that implementation. |