Description:
The log_bin_basename file name handling is incorrect if there is more than one dot in the file name.
log-bin=correct.horse.battery.staple
mysql [localhost] {msandbox} ((none)) > SHOW GLOBAL VARIABLES LIKE 'log_bin%';
| log_bin | ON |
| log_bin_basename | /home/vagrant/sandboxes/msb_5_7_20/data/correct |
| log_bin_index | /home/vagrant/sandboxes/msb_5_7_20/data/correct.index |
mysql [localhost] {msandbox} ((none)) > SHOW MASTER LOGS;
+-----------------------+-----------+
| Log_name | File_size |
+-----------------------+-----------+
| correct.horse.battery | 154 |
| correct.horse.battery | 154 |
+-----------------------+-----------+
2 rows in set (0.00 sec)
ls -al data/correct*
-rw-r-----. 1 vagrant vagrant 1523 Nov 21 16:52 data/correct.horse.battery
-rw-r-----. 1 vagrant vagrant 72 Nov 21 16:52 data/correct.index
How to repeat:
Test with:
log-bin=correct.horse.battery.staple
mysql [localhost] {msandbox} ((none)) > SHOW GLOBAL VARIABLES LIKE 'log_bin%';
| log_bin | ON |
| log_bin_basename | /home/vagrant/sandboxes/msb_5_7_20/data/correct |
| log_bin_index | /home/vagrant/sandboxes/msb_5_7_20/data/correct.index |
mysql [localhost] {msandbox} ((none)) > SHOW MASTER LOGS;
+-----------------------+-----------+
| Log_name | File_size |
+-----------------------+-----------+
| correct.horse.battery | 154 |
| correct.horse.battery | 154 |
+-----------------------+-----------+
2 rows in set (0.00 sec)
ls -al data/correct*
-rw-r-----. 1 vagrant vagrant 1523 Nov 21 16:52 data/correct.horse.battery
-rw-r-----. 1 vagrant vagrant 72 Nov 21 16:52 data/correct.index
Test with
log-bin=.correct.horse.battery.staple
mysql [localhost] {msandbox} ((none)) > SHOW GLOBAL VARIABLES LIKE 'log_bin%';
+---------------------------------+------------------------------------------------+
| Variable_name | Value |
+---------------------------------+------------------------------------------------+
| log_bin | ON |
| log_bin_basename | /home/vagrant/sandboxes/msb_5_7_20/data/ |
| log_bin_index | /home/vagrant/sandboxes/msb_5_7_20/data/.index |
| log_bin_trust_function_creators | OFF |
| log_bin_use_v1_row_events | OFF |
+---------------------------------+------------------------------------------------+
5 rows in set (0.00 sec)
mysql [localhost] {msandbox} ((none)) > FLUSH LOGS;
Query OK, 0 rows affected (0.14 sec)
mysql [localhost] {msandbox} ((none)) > SHOW MASTER LOGS;
+------------------------+-----------+
| Log_name | File_size |
+------------------------+-----------+
| .correct.horse.battery | 154 |
| .correct.horse.battery | 154 |
+------------------------+-----------+
2 rows in set (0.00 sec)
ls -al data/.correct.horse.battery data/.index
-rw-r-----. 1 vagrant vagrant 207 Nov 21 17:00 data/.correct.horse.battery
-rw-r-----. 1 vagrant vagrant 50 Nov 21 17:00 data/.index
Description: The log_bin_basename file name handling is incorrect if there is more than one dot in the file name. log-bin=correct.horse.battery.staple mysql [localhost] {msandbox} ((none)) > SHOW GLOBAL VARIABLES LIKE 'log_bin%'; | log_bin | ON | | log_bin_basename | /home/vagrant/sandboxes/msb_5_7_20/data/correct | | log_bin_index | /home/vagrant/sandboxes/msb_5_7_20/data/correct.index | mysql [localhost] {msandbox} ((none)) > SHOW MASTER LOGS; +-----------------------+-----------+ | Log_name | File_size | +-----------------------+-----------+ | correct.horse.battery | 154 | | correct.horse.battery | 154 | +-----------------------+-----------+ 2 rows in set (0.00 sec) ls -al data/correct* -rw-r-----. 1 vagrant vagrant 1523 Nov 21 16:52 data/correct.horse.battery -rw-r-----. 1 vagrant vagrant 72 Nov 21 16:52 data/correct.index How to repeat: Test with: log-bin=correct.horse.battery.staple mysql [localhost] {msandbox} ((none)) > SHOW GLOBAL VARIABLES LIKE 'log_bin%'; | log_bin | ON | | log_bin_basename | /home/vagrant/sandboxes/msb_5_7_20/data/correct | | log_bin_index | /home/vagrant/sandboxes/msb_5_7_20/data/correct.index | mysql [localhost] {msandbox} ((none)) > SHOW MASTER LOGS; +-----------------------+-----------+ | Log_name | File_size | +-----------------------+-----------+ | correct.horse.battery | 154 | | correct.horse.battery | 154 | +-----------------------+-----------+ 2 rows in set (0.00 sec) ls -al data/correct* -rw-r-----. 1 vagrant vagrant 1523 Nov 21 16:52 data/correct.horse.battery -rw-r-----. 1 vagrant vagrant 72 Nov 21 16:52 data/correct.index Test with log-bin=.correct.horse.battery.staple mysql [localhost] {msandbox} ((none)) > SHOW GLOBAL VARIABLES LIKE 'log_bin%'; +---------------------------------+------------------------------------------------+ | Variable_name | Value | +---------------------------------+------------------------------------------------+ | log_bin | ON | | log_bin_basename | /home/vagrant/sandboxes/msb_5_7_20/data/ | | log_bin_index | /home/vagrant/sandboxes/msb_5_7_20/data/.index | | log_bin_trust_function_creators | OFF | | log_bin_use_v1_row_events | OFF | +---------------------------------+------------------------------------------------+ 5 rows in set (0.00 sec) mysql [localhost] {msandbox} ((none)) > FLUSH LOGS; Query OK, 0 rows affected (0.14 sec) mysql [localhost] {msandbox} ((none)) > SHOW MASTER LOGS; +------------------------+-----------+ | Log_name | File_size | +------------------------+-----------+ | .correct.horse.battery | 154 | | .correct.horse.battery | 154 | +------------------------+-----------+ 2 rows in set (0.00 sec) ls -al data/.correct.horse.battery data/.index -rw-r-----. 1 vagrant vagrant 207 Nov 21 17:00 data/.correct.horse.battery -rw-r-----. 1 vagrant vagrant 50 Nov 21 17:00 data/.index