Bug #56445 | The last_master_timestamp can not keep monotone order | ||
---|---|---|---|
Submitted: | 1 Sep 2010 9:57 | Modified: | 11 Jan 2011 5:38 |
Reporter: | Daogang Qu | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S3 (Non-critical) |
Version: | 5.5+ | OS: | Any |
Assigned to: | Assigned Account | CPU Architecture: | Any |
[1 Sep 2010 9:57]
Daogang Qu
[11 Jan 2011 5:38]
Daogang Qu
In mysql-trunk tree, the problem will be reproduced by updating code as following: --- sql/rpl_slave.cc 2010-12-10 16:55:50 +0000 +++ sql/rpl_slave.cc 2011-01-11 03:28:46 +0000 @@ -2899,7 +2899,10 @@ if (!(ev->is_artificial_event() || ev->is_relay_log_event() || (ev->when == 0) || ev->get_type_code() == FORMAT_DESCRIPTION_EVENT)) { + time_t rli_last_master_timestamp= rli->last_master_timestamp; rli->last_master_timestamp= ev->when + (time_t) ev->exec_time; + DBUG_ASSERT(rli_last_master_timestamp <= rli->last_master_timestamp); + DBUG_ASSERT(rli->last_master_timestamp >= 0); } And rpl_semi_sync_event, rpl_udf and so on will cause the failure of the DBUG_ASSERT(rli_last_master_timestamp <= rli->last_master_timestamp) as following: 110111 7:31:31 [Note] next log './slave-relay-bin.000003' is currently active mysqld: /home/daogang/bzrwork/bug58712/mysql-trunk/sql/rpl_slave.cc:2904: int exec_relay_log_event(THD*, Relay_log_info*): Assertion `rli_last_master_timestamp <= rli->last_master_timestamp' failed. 110111 7:31:39 - mysqld got signal 6 ;