Bug #34687 Error in bin-log after shutdown restart binlog was not closed properly
Submitted: 20 Feb 2008 13:00 Modified: 13 Jul 2009 11:49
Reporter: Norman Brookes Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:mysql-5.0.51a, 5.1 BK, 5.1.30 OS:Any (Linux, solaris10-sparc-64bit)
Assigned to: Alfranio Junior CPU Architecture:Any
Tags: shutdown, startup

[20 Feb 2008 13:00] Norman Brookes
Description:
ON stoping mysqld and restarting error reported in bin-log

Stopped using mysql.server stop and mysqladmin -u -p shutdown. both give same error on restart.

/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#080220 12:45:05 server id 13  end_log_pos 98   Start: binlog v 4, server v 5.0.51a-log created 080220 12:45:05 at startup
# Warning: this binlog was not closed properly. Most probably mysqld crashed writing it.
ROLLBACK/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;

How to repeat:
mysql.server stop

mysql.server start

Suggested fix:
dont know
[20 Feb 2008 19:37] Valeriy Kravchuk
Thank you for a problem report. Please, send your my.cnf file content and upload MySQL server's error log (compressed).
[21 Feb 2008 10:36] Norman Brookes
file uploaded as requested

Thanks
[21 Feb 2008 18:13] Sveta Smirnova
Thank you for the report.

Verified as described.
[29 May 2009 13:59] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/75250

2912 Alfranio Correia	2009-05-29
      BUG#34687 Error in bin-log after shutdown restart binlog was not closed properly
      
      While reading a binary log that is being used by a master or was not properly
      closed, most likely due to a crash, the following warning message is being
      printed out: "Warning: this binlog was not closed properly. Most probably mysqld
      crashed writing it.". This was scaring our users as the message was not taking
      into account the possibility of the file is being just used by the master.
      
      To avoid unnecessarily scaring our users, we replace the original message by the
      following one: Warning: "this binlog is either being used or was not closed
      properly.".
[1 Jun 2009 11:49] Sveta Smirnova
Bug is not repeatable with current versions. Please upgrade.
[1 Jun 2009 12:05] Alfranio Junior
Setting the status to "patch pending" as we need to change the warning
message.
[11 Jun 2009 1:10] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/76081

2770 Alfranio Correia	2009-06-11
      BUG#34687 Error in bin-log after shutdown restart binlog was not closed properly
      
      While reading a binary log that is being used by a master or was not properly
      closed, most likely due to a crash, the following warning message is being
      printed out: "Warning: this binlog was not closed properly. Most probably mysqld
      crashed writing it.". This was scaring our users as the message was not taking
      into account the possibility of the file is being just used by the master.
      
      To avoid unnecessarily scaring our users, we replace the original message by the
      following one: Warning: "this binlog is either is use or was not closed properly.".
[18 Jun 2009 18:14] Alfranio Junior
Pushed to 5.0-bugteam, 5.1-bugteam and 6.0-bugteam.
[7 Jul 2009 7:52] Bugs System
Pushed into 5.0.84 (revid:joro@sun.com-20090707074938-ksah1ibn0vs92cem) (version source revid:alfranio.correia@sun.com-20090618172847-ztcyehbbi7pgru9v) (merge vers: 5.0.84) (pib:11)
[8 Jul 2009 13:30] Bugs System
Pushed into 5.1.37 (revid:joro@sun.com-20090708131116-kyz8iotbum8w9yic) (version source revid:alfranio.correia@sun.com-20090618175856-si8n1et9mfhfgrdg) (merge vers: 5.1.36) (pib:11)
[9 Jul 2009 7:35] Bugs System
Pushed into 5.0.84 (revid:joro@sun.com-20090707074938-ksah1ibn0vs92cem) (version source revid:alfranio.correia@sun.com-20090618172847-ztcyehbbi7pgru9v) (merge vers: 5.0.84) (pib:11)
[9 Jul 2009 7:37] Bugs System
Pushed into 5.1.37 (revid:joro@sun.com-20090708131116-kyz8iotbum8w9yic) (version source revid:alfranio.correia@sun.com-20090618175856-si8n1et9mfhfgrdg) (merge vers: 5.1.36) (pib:11)
[9 Jul 2009 11:08] Jon Stephens
Documented in the 5.0.84 and 5.1.37 changelogs as follows:

        When reading a binary log that was in use by a master or that
        had not been properly closed (possibly due to a crash), the
        following message was printed: -Warning: this binlog
        was not closed properly. Most probably mysqld crashed writing
        it-. This message did not take into account the
        possibility that the file was merely in use by the master, which
        caused some users concern who were not aware that this could
        happen.

        To make this clear, the original message has been replaced with
        -Warning: this binlog is either is use or was not
        closed properly-.
[10 Jul 2009 11:21] Bugs System
Pushed into 5.4.4-alpha (revid:anozdrin@bk-internal.mysql.com-20090710111017-bnh2cau84ug1hvei) (version source revid:alfranio.correia@sun.com-20090618180930-j4jb9psfdihzngvz) (merge vers: 5.4.4-alpha) (pib:11)
[13 Jul 2009 11:49] Jon Stephens
Fix also noted in the 5.4.4 changelog. Closed.
[12 Aug 2009 22:09] Paul DuBois
Noted in 5.4.2 changelog because next 5.4 version will be 5.4.2 and not 5.4.4.
[14 Aug 2009 22:59] Paul DuBois
Ignore previous comment about 5.4.2.
[26 Aug 2009 13:46] Bugs System
Pushed into 5.1.37-ndb-7.0.8 (revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (version source revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (merge vers: 5.1.37-ndb-7.0.8) (pib:11)
[26 Aug 2009 13:46] Bugs System
Pushed into 5.1.37-ndb-6.3.27 (revid:jonas@mysql.com-20090826105955-bkj027t47gfbamnc) (version source revid:jonas@mysql.com-20090826105955-bkj027t47gfbamnc) (merge vers: 5.1.37-ndb-6.3.27) (pib:11)
[26 Aug 2009 13:48] Bugs System
Pushed into 5.1.37-ndb-6.2.19 (revid:jonas@mysql.com-20090825194404-37rtosk049t9koc4) (version source revid:jonas@mysql.com-20090825194404-37rtosk049t9koc4) (merge vers: 5.1.37-ndb-6.2.19) (pib:11)
[27 Aug 2009 16:33] Bugs System
Pushed into 5.1.35-ndb-7.1.0 (revid:magnus.blaudd@sun.com-20090827163030-6o3kk6r2oua159hr) (version source revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (merge vers: 5.1.37-ndb-7.0.8) (pib:11)
[7 Oct 2009 14:38] Paul DuBois
The 5.4 fix has been pushed to 5.4.2.