mysqldump --single-transaction in maria-5.1-mwl136 uses an absolute path to master_log_file in CHANGE MASTER

Bug #697174 reported by Philip Stoev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
High
Kristian Nielsen

Bug Description

When using mysqldump --single-transaction --master data, the following CHANGE MASTER is produced:

CHANGE MASTER TO MASTER_LOG_FILE='/home/philips/bzr/maria-5.1-mwl136/mysql-test/var/log/master-bin.000001', MASTER_LOG_POS=1255946;

Using absolute paths for MASTER_LOG_FILE will cause the slave to stop with a "cannot open first file" error. By contrast, normal mysqldump would return:

CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=1255946;

To reproduce:

# default mysqldump from RPM
mysqldump --single-transaction --master-data -uroot --protocol=tcp --port=19300 test | grep -i change
CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=1255946;

# mysqldump from wl139
../client/mysqldump --single-transaction --master-data -uroot --protocol=tcp --port=19300 test | grep -i change
CHANGE MASTER TO MASTER_LOG_FILE='/home/philips/bzr/maria-5.1-mwl136/mysql-test/var/log/master-bin.000001', MASTER_LOG_POS=1255946;

../client/mysqldump --master-data -uroot --protocol=tcp --port=19300 test | grep -i change
CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=1255946;

Changed in maria:
assignee: nobody → Kristian Nielsen (knielsen)
milestone: none → 5.3
milestone: 5.3 → none
Changed in maria:
status: New → Confirmed
Revision history for this message
Kristian Nielsen (knielsen) wrote :

Thanks for spotting this!

The underlying issue is different output between these two statements:

MariaDB [test]> show master status;
+------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000051 | 240 | | |
+------------------+----------+--------------+------------------+
1 row in set (0.00 sec)

MariaDB [test]> SHOW STATUS LIKE 'binlog_snapshot_%'
    -> ;
+--------------------------+--------------------+
| Variable_name | Value |
+--------------------------+--------------------+
| binlog_snapshot_file | ./mysql-bin.000051 |
| binlog_snapshot_position | 240 |
+--------------------------+--------------------+
2 rows in set (0.00 sec)

Note the leading `./' in the second version; this should be removed.

Changed in maria:
importance: Undecided → High
milestone: none → 5.3
status: Confirmed → In Progress
Revision history for this message
Kristian Nielsen (knielsen) wrote :

Fix pushed into mariadb-5.1-mwl136 and mariadb-5.2-rpl

Changed in maria:
status: In Progress → Fix Committed
Changed in maria:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.