Skip to content
  • Alfranio Correia's avatar
    53bfd3ed
    Backported the following bundles from mysql-trunk: · 53bfd3ed
    Alfranio Correia authored
      . revno: 4167.1.6
        revision-id: alfranio.correia@oracle.com-20120804165626-s6lvgo59aa469o1h
    
      . revno: 4167.1.3
        revision-id: alfranio.correia@oracle.com-20120803190050-lhyxo6wmgkipq6dv
    
      . revno: 4138.1.1
        revision-id: alfranio.correia@oracle.com-20120731141810-b2405od5xnk017rl
    
    Backported BUG 13804728 from trunk to 5.6.
    ------------------------------------------
    
    This patch is based on the patch for BUG 12334346 which was not
    pushed.
    
    The type of the worker's repository is dictated by the coordinator, i.e.
    the relay log info's repository. So when the latter is changed the
    former is supposed to be automatically changed too.
    
    However, due to a bug this was not happening making replication fail.
    It turns out though that the worker's repository cannot be changed
    if there are gaps because this requires to read information from one
    repository and write it to another and this may cause problems for
    the bitmap allocated to keep track of gaps.
    
    In a nutshell, the bitmap's size is defined by an user option and
    there is no guarantee that the recorded size will match the new
    size and this may lead to crashes.
    
    To fix this bug, we could always allocate the bitmap's maximum size
    and prevent any problem. However, we prefer to print a warning message
    and not to change the repository's type if there may be workers with
    gaps.
    
    
    Backported BUG 12334346 from trunk to 5.6.
    ------------------------------------------
                     
    The replication tables had the Master_Id column as the primary key. 
    Despite the suggestive name, it was not supposed to store a server_id
    which is  used to uniquely identify a server, including the master.
    The column was just an internal identifier. 
                           
    Unfortunately, a bug made the slave's server_id be stored instead of a 
    const number such as "zero" thus causing confusion and leading to this
    bug report. 
                           
    To fix the problem, we have done what follows: 
      . Made master_host and master_port slave_master_info's primary key. 
      . Renamed slave_relay_log_info's Master_Id to Id. 
                           
    We also had taken the chance to improve the code as follows: 
      . Removed duplicated code from Rpl_info_factory. 
      . Refactored Rpl_info_handler's interface to avoid passing the 
        primary key as parameter in all the functions. 
      . Refactored the code to allow one to redefine the primary keys 
        without changing the code.
    53bfd3ed
    Backported the following bundles from mysql-trunk:
    Alfranio Correia authored
      . revno: 4167.1.6
        revision-id: alfranio.correia@oracle.com-20120804165626-s6lvgo59aa469o1h
    
      . revno: 4167.1.3
        revision-id: alfranio.correia@oracle.com-20120803190050-lhyxo6wmgkipq6dv
    
      . revno: 4138.1.1
        revision-id: alfranio.correia@oracle.com-20120731141810-b2405od5xnk017rl
    
    Backported BUG 13804728 from trunk to 5.6.
    ------------------------------------------
    
    This patch is based on the patch for BUG 12334346 which was not
    pushed.
    
    The type of the worker's repository is dictated by the coordinator, i.e.
    the relay log info's repository. So when the latter is changed the
    former is supposed to be automatically changed too.
    
    However, due to a bug this was not happening making replication fail.
    It turns out though that the worker's repository cannot be changed
    if there are gaps because this requires to read information from one
    repository and write it to another and this may cause problems for
    the bitmap allocated to keep track of gaps.
    
    In a nutshell, the bitmap's size is defined by an user option and
    there is no guarantee that the recorded size will match the new
    size and this may lead to crashes.
    
    To fix this bug, we could always allocate the bitmap's maximum size
    and prevent any problem. However, we prefer to print a warning message
    and not to change the repository's type if there may be workers with
    gaps.
    
    
    Backported BUG 12334346 from trunk to 5.6.
    ------------------------------------------
                     
    The replication tables had the Master_Id column as the primary key. 
    Despite the suggestive name, it was not supposed to store a server_id
    which is  used to uniquely identify a server, including the master.
    The column was just an internal identifier. 
                           
    Unfortunately, a bug made the slave's server_id be stored instead of a 
    const number such as "zero" thus causing confusion and leading to this
    bug report. 
                           
    To fix the problem, we have done what follows: 
      . Made master_host and master_port slave_master_info's primary key. 
      . Renamed slave_relay_log_info's Master_Id to Id. 
                           
    We also had taken the chance to improve the code as follows: 
      . Removed duplicated code from Rpl_info_factory. 
      . Refactored Rpl_info_handler's interface to avoid passing the 
        primary key as parameter in all the functions. 
      . Refactored the code to allow one to redefine the primary keys 
        without changing the code.
Loading