[MDEV-10121] MariaDB 10.1.12 and 10.1.14 do not respect log_bin settings Created: 2016-05-25 Updated: 2016-05-25 Resolved: 2016-05-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Platform Debian |
| Affects Version/s: | 10.1.12, 10.1.14 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Trivial |
| Reporter: | Stefan Midjich | Assignee: | Sergei Golubchik |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | need_feedback | ||
| Environment: |
Ubuntu 14.04, vSphere VM. Three VMs, two are mysqld master nodes and one is garbd. Cluster is in one DC but being prepared to be used in three DCs and at that point will add two more master nodes and move garb to third DC. |
||
| Description |
|
I just patched from 10.1.12 to 10.1.14 and this issue remained. Discovered recently due to xtrabackup-v2 having problems with binlogs because they had defaulted to the datadir. So binlogs were using the pattern datadir/log-basename-bin.?. But in configuration I had set /var/db/binlogs/log-basename-bin.?. show variable like 'log_bin%'; would show the default datadir path described above. I tried searching all of /etc/mysql for the cause and this was the result.
The only workaround was to explicitly set --log-bin arguments when starting the sysvinit start-script. Which of course is not a good solution for future patching. When using this method the log_bin% variables are set correctly too. Edit: I'm aware that log_bin is supposed to be a boolean value but passing it as a string on cli resolves the issue. Also if I try to use log_bin_basename in the config file I get an error on startup saying ''unknown variable 'log_bin_basename=/var/db/binlogs/mydb-bin''. |
| Comments |
| Comment by Sergei Golubchik [ 2016-05-25 ] | |||
|
See, if you have log-basename somewhere in the config files. It sets the name for many logs, including binlogs. If you happen to have log-basename after your log-bin, then your log-bin will have no effect. You can run
to see what options the server will process, and in what order. | |||
| Comment by Stefan Midjich [ 2016-05-25 ] | |||
|
This is my_print_defaults output.
I replaced the actual value of log-basename with "my" to hide an internal system name. I removed log-basename from the logs since the basename is not necessary with the absolute path in log_bin and log_bin_index, and true enough it now starts to respect the settings. The docs are clear on this but at the same time they recommend using log-basename to avoid problems with hostname changes in replication. Description: Basename for all log files and the .pid file. This sets all log file names at once (in 'datadir') and is normally the only option you need for specifying log files. This is especially recommended to be set if you are using replication as it ensures that your log file names are not depending on your host name. But at the same time it's not recommended due to xtrabackup-v2. And since xtrabackup is a non-locking SST it's quite attractive to users. Thanks @Sergei Golubchik | |||
| Comment by Sergei Golubchik [ 2016-05-25 ] | |||
|
You can keep log-basename too, if you want. Just make sure that log-bin comes after that. |