List:Internals« Previous MessageNext Message »
From:Struan Bartlett Date:July 10 2005 1:21pm
Subject:Bug? re mysqlhotcopy v1.14 or 1.22 record_log_pos option
View as plain text  
Hi -

I have used this script successfully to hotcopy a database from a 3.23 
slave to a 4.0 slave (so that they would both be replicating off the 
same master). However, I ran into problems doing the hotcopy from the 
4.0 slave to another 3.23 slave. I think this is why.

This script stores in the log_pos table log_pos field, the value of the 
6th column returned by 'show slave status' on the source machine (which 
in this case was my 4.0 slave). However, at the time my 4.0 slave showed 
this:

mysql> show slave status;
+-------------+-------------+-------------+---------------+-----------------+---------------------+------------------------+---------------+-----------------------+------------------+-------------------+-----------------+---------------------+------------+------------+--------------+---------------------+-----------------+
| Master_Host | Master_User | Master_Port | Connect_retry | 
Master_Log_File | Read_Master_Log_Pos | Relay_Log_File         | 
Relay_Log_Pos | Relay_Master_Log_File | Slave_IO_Running | 
Slave_SQL_Running | Replicate_do_db | Replicate_ignore_db | Last_errno | 
Last_error | Skip_counter | Exec_master_log_pos | Relay_log_space |
+-------------+-------------+-------------+---------------+-----------------+---------------------+------------------------+---------------+-----------------------+------------------+-------------------+-----------------+---------------------+------------+------------+--------------+---------------------+-----------------+
| craven      | repl        | 3306        | 60            | 
mysql-bin.13533 | 100226495           | gilligan-relay-bin.028 | 
3021815       | mysql-bin.13533       | No               | 
No                |                 |                     | 0          
|            | 0            | 93684275            | 6059291         |
+-------------+-------------+-------------+---------------+-----------------+---------------------+------------------------+---------------+-----------------------+------------------+-------------------+-----------------+---------------------+------------+------------+--------------+---------------------+-----------------+
1 row in set (0.01 sec)

As you can see, the Read_Master_Log_Pos was much higher than the 
Exec_master_log_pos, yet mysqlhotcopy stored the  Read_Master_Log_Pos 
value in the log_pos table. Surely, as the tables had been flushed 
before copying the files, only the transactions up to the 
Exec_master_log_pos position would have been committed to disk? If so, 
wouldn't it be correct for the mysqlhotcopy script to store the value of 
Exec_master_log_pos in the log_pos table instead of Read_Master_Log_Pos?

I hope you can let me know.

Kind regards,

Struan Bartlett

-- 
____________________________________
Struan Bartlett
Chairman
NewsNow Publishing Limited
Tel: +44 (0)20 7471 0400
____________________________________
http://www.NewsNow.co.uk/
Internet Press Cuttings

Receive fast updating news about
your company, competitors, industry,
products, clients & prospects
____________________________________


Thread
Bug? re mysqlhotcopy v1.14 or 1.22 record_log_pos optionStruan Bartlett11 Jul