Skip to content
  • Daogang Qu's avatar
    4b70b54b
    Bug #27082922 --LOG-BIN BY DEFAULT CAUSES LOTS OF SPAM IN ERROR LOG BY DEFAULT · 4b70b54b
    Daogang Qu authored
    Problem
    =======
    The warning "No argument was provided to --log-bin, and
    --log-bin-index was not used; so replication may break
    when this MySQL server acts as a master and has his
    hostname changed!! Please use '--log-bin=atum30-bin'
    to avoid this problem." is reported when starting
    server if --log-bin option is not used or --log-bin
    option is used without argument.
    
    Analysis
    ========
    The problem appears in the following four cases. Let's see if we can
    fix them without causing upgrade issue. See below.
    
     1. If --log-bin option is not supplied, make the name prefix of
        binary log files default to "binlog". This is safe because
        in 5.7 this configuration did not have a binary log. With
        this configuration during upgrade, there will not be any
        pre-existing binary log files using hostname as name
        prefix of binary log files.
    
     2. If --log-bin option is not supplied, make the name prefix
        of relay log files default to "relaylog". This would break
        upgrades because in 5.7 this configuration generates relay
        logs with hostname as the name prefix.
    
     3. If --log-bin option is supplied without argument, make the name
        prefix of binary log files default to "binlog". This would break
        upgrades because in 5.7 this configuration generates binary
        logs with hostname as the name prefix.
    
     4. If --log-bin option is supplied without argument, make the name
        prefix of relay log files default to "relaylog". This would
        break upgrades because in 5.7 this configuration generates
        relay logs with hostname as the name prefix.
    
    So we just can fix 1 without causing upgrade issue in the bug.
    
    Fix
    ===
    To avoid breaking upgrades and reporting the warning, we fix 1,
    and change the Warning to a Note if --log-bin option is supplied
    without argument, since it is a corner case.
    
    Problem 2
    =========
    The warning "You have not provided a mandatory server-id. Servers
    in a replication topology must have unique server-ids. Please
    refer to the proper server start-up parameters documentation."
    is reported when starting server with default install.
    
    Analysis 2
    ==========
    The server ID is a dynamic global variable, defaults to 1, used in
    replication to give each master and slave a unique identity. If a
    mandatory server-id is not provided for slave server and
    replicate_same_server_id is not in use, the slave I/O thread stops
    with the following error:
    "The slave I/O thread stops because master and slave have equal
    MySQL server ids; these ids must be different for replication to
    work (or the --replicate-same-server-id option must be used on
    slave but this does not always make sense; please check the manual
    before using it)."
    So when starting server even if a mandatory server-id is not
    provided, it is not necessary to report the following warning:
    "You have not provided a mandatory server-id. Servers
    in a replication topology must have unique server-ids. Please
    refer to the proper server start-up parameters documentation."
    
    Fix 2
    =====
    Change the Warning to s Note when starting server if a mandatory
    server-id is not provided.
    4b70b54b
    Bug #27082922 --LOG-BIN BY DEFAULT CAUSES LOTS OF SPAM IN ERROR LOG BY DEFAULT
    Daogang Qu authored
    Problem
    =======
    The warning "No argument was provided to --log-bin, and
    --log-bin-index was not used; so replication may break
    when this MySQL server acts as a master and has his
    hostname changed!! Please use '--log-bin=atum30-bin'
    to avoid this problem." is reported when starting
    server if --log-bin option is not used or --log-bin
    option is used without argument.
    
    Analysis
    ========
    The problem appears in the following four cases. Let's see if we can
    fix them without causing upgrade issue. See below.
    
     1. If --log-bin option is not supplied, make the name prefix of
        binary log files default to "binlog". This is safe because
        in 5.7 this configuration did not have a binary log. With
        this configuration during upgrade, there will not be any
        pre-existing binary log files using hostname as name
        prefix of binary log files.
    
     2. If --log-bin option is not supplied, make the name prefix
        of relay log files default to "relaylog". This would break
        upgrades because in 5.7 this configuration generates relay
        logs with hostname as the name prefix.
    
     3. If --log-bin option is supplied without argument, make the name
        prefix of binary log files default to "binlog". This would break
        upgrades because in 5.7 this configuration generates binary
        logs with hostname as the name prefix.
    
     4. If --log-bin option is supplied without argument, make the name
        prefix of relay log files default to "relaylog". This would
        break upgrades because in 5.7 this configuration generates
        relay logs with hostname as the name prefix.
    
    So we just can fix 1 without causing upgrade issue in the bug.
    
    Fix
    ===
    To avoid breaking upgrades and reporting the warning, we fix 1,
    and change the Warning to a Note if --log-bin option is supplied
    without argument, since it is a corner case.
    
    Problem 2
    =========
    The warning "You have not provided a mandatory server-id. Servers
    in a replication topology must have unique server-ids. Please
    refer to the proper server start-up parameters documentation."
    is reported when starting server with default install.
    
    Analysis 2
    ==========
    The server ID is a dynamic global variable, defaults to 1, used in
    replication to give each master and slave a unique identity. If a
    mandatory server-id is not provided for slave server and
    replicate_same_server_id is not in use, the slave I/O thread stops
    with the following error:
    "The slave I/O thread stops because master and slave have equal
    MySQL server ids; these ids must be different for replication to
    work (or the --replicate-same-server-id option must be used on
    slave but this does not always make sense; please check the manual
    before using it)."
    So when starting server even if a mandatory server-id is not
    provided, it is not necessary to report the following warning:
    "You have not provided a mandatory server-id. Servers
    in a replication topology must have unique server-ids. Please
    refer to the proper server start-up parameters documentation."
    
    Fix 2
    =====
    Change the Warning to s Note when starting server if a mandatory
    server-id is not provided.
Loading