Bug #66868 Wrong value for Seconds_Behind_Master immediately after FLUSH BINARY LOGS
Submitted: 19 Sep 2012 9:54 Modified: 17 Jul 2013 12:45
Reporter: Sadao Hiratsuka (Basic Quality Contributor) Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.5.27, 5.5.30, 5.1.68 OS:Any
Assigned to: CPU Architecture:Any
Tags: replication, Seconds_Behind_Master

[19 Sep 2012 9:54] Sadao Hiratsuka
Description:
Please see BUG#56363, BUG#53167.

This bug seems to be fixed on MySQL 5.6, but still exists on MySQL 5.5.27.
Is there any plan to backport the fix?

How to repeat:
-- ON SLAVE
#!/bin/bash
while true; do
    echo 'SHOW SLAVE STATUS\G'
done | mysql -u root | grep Behind | grep -v ': 0'

-- ON MASTER
mysql> FLUSH BINARY LOGS; SELECT SLEEP(15); FLUSH BINARY LOGS;

-- OUTPUT
Seconds_Behind_Master: 15

Suggested fix:
Backport the fix from MySQL 5.6.
[18 Dec 2012 18:37] Sveta Smirnova
Thank you for the feedback.

Verified as described with test case from bug #53167
[27 May 2013 17:40] Luis Soares
See: BUG#56921.
[12 Jul 2013 9:42] Tiago Jorge
This bug was confirmed to have been fixed in 5.6. There are no plans to backport to 5.5 the series of patches that fixed this bug in 5.6. 

The patches to do it are big, risky, and introduce changes in the behavior.
[22 May 2014 7:28] qinglin zhang
HI, I don't think the Bug have been fixed in 5.6 , please refer to bugs://72770
[15 Jul 2014 11:51] Sveta Smirnova
qinglin,

thank you for the feedback, but bug #72770 is c/J bug. Please provide correct number.