Bug #53189 Table map version unused and can be removed
Submitted: 27 Apr 2010 8:14 Modified: 14 Oct 2010 12:29
Reporter: Mats Kindahl Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Row Based Replication ( RBR ) Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to: Zhenxing He CPU Architecture:Any
Tags: refactoring

[27 Apr 2010 8:14] Mats Kindahl
Description:
In MYSQL_BIN_LOG, there is a variable m_table_map_version with associated functions to update the table map version. This variable was used in early implementations to decide when a new table map had to be written.

In the current logic for when writing table maps, the table map version does not play any role at all and can be removed.

How to repeat:
Read the code and note that although the table map version is updated at various points, it is not really used anywhere.

Suggested fix:
Remove the variable and associated functions.
[27 Apr 2010 9:39] 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/106598

3356 He Zhenxing	2010-04-27
      Bug#53189 Table map version unused and can be removed
      
      MYSQL_BIN_LOG m_table_map_version member and it's associated 
      functions were not used in the logic, this patch removed all
      related code.
     @ sql/log.cc
        removed unused m_table_map_version variable and functions
     @ sql/log.h
        removed unused m_table_map_version variable and functions
     @ sql/table.cc
        removed unused table_map_version variable
     @ sql/table.h
        removed unused table_map_version variable
[29 Apr 2010 3:53] 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/106891

3356 He Zhenxing	2010-04-29
      Bug#53189 Table map version unused and can be removed
      
      MYSQL_BIN_LOG m_table_map_version member and it's associated 
      functions were not used in the logic of binlogging and replication,
      this patch removed all related code.
     @ sql/log.cc
        removed unused m_table_map_version variable and functions
     @ sql/log.h
        removed unused m_table_map_version variable and functions
     @ sql/log_event.h
        Removed unused LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F flag
     @ sql/sql_class.cc
        Removed unused LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F flag
     @ sql/sql_load.cc
        Removed unused LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F flag
     @ sql/table.cc
        removed unused table_map_version variable
     @ sql/table.h
        removed unused table_map_version variable
[8 May 2010 3:26] 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/107790

3373 He Zhenxing	2010-05-08
      Bug#53189 Table map version unused and can be removed
      
      MYSQL_BIN_LOG m_table_map_version member and it's associated 
      functions were not used in the logic of binlogging and replication,
      this patch removed all related code.
     @ sql/log.cc
        removed unused m_table_map_version variable and functions
     @ sql/log.h
        removed unused m_table_map_version variable and functions
     @ sql/log_event.h
        Removed unused LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F flag
     @ sql/sql_class.cc
        Removed unused LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F flag
     @ sql/sql_load.cc
        Removed unused LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F flag
     @ sql/table.cc
        removed unused table_map_version variable
     @ sql/table.h
        removed unused table_map_version variable
[28 May 2010 6:13] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100524190136-egaq7e8zgkwb9aqi) (version source revid:alik@sun.com-20100512070920-xgpmqeytp0gc183c) (pib:16)
[28 May 2010 6:41] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100524190941-nuudpx60if25wsvx) (version source revid:alik@sun.com-20100514054548-91z72f0mcskr84kj) (merge vers: 6.0.14-alpha) (pib:16)
[28 May 2010 7:09] Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100524185725-c8k5q7v60i5nix3t) (version source revid:alexey.kopytov@sun.com-20100511082357-p6pzx0gdtaoopa7i) (merge vers: 5.5.5-m3) (pib:16)
[2 Jun 2010 8:48] Bugs System
Pushed into 5.1.48 (revid:georgi.kodinov@oracle.com-20100602084411-2yu607bslbmgufl3) (version source revid:zhenxing.he@sun.com-20100508032533-2bklmwxozxcjdq8q) (merge vers: 5.1.47) (pib:16)
[3 Jun 2010 11:43] Jon Stephens
This appears to be an internal/refactoring change only, with no visible changes for end users. Closing without further action.
[14 Oct 2010 8:35] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.51-ndb-7.0.20 (revid:martin.skold@mysql.com-20101014082627-jrmy9xbfbtrebw3c) (version source revid:vasil.dimov@oracle.com-20100513074652-0cvlhgkesgbb2bfh) (merge vers: 5.5.5-m3) (pib:21)
[14 Oct 2010 8:50] Bugs System
Pushed into mysql-5.1-telco-6.3 5.1.51-ndb-6.3.39 (revid:martin.skold@mysql.com-20101014083757-5qo48b86d69zjvzj) (version source revid:vasil.dimov@oracle.com-20100513074652-0cvlhgkesgbb2bfh) (merge vers: 5.5.5-m3) (pib:21)
[14 Oct 2010 9:05] Bugs System
Pushed into mysql-5.1-telco-6.2 5.1.51-ndb-6.2.19 (revid:martin.skold@mysql.com-20101014084420-y54ecj85j5we27oa) (version source revid:vasil.dimov@oracle.com-20100513074652-0cvlhgkesgbb2bfh) (merge vers: 5.5.5-m3) (pib:21)
[14 Oct 2010 12:29] Jon Stephens
No changelog entry required -- see previous comment. Setting back to Closed state.