• Andrei Elkin's avatar
    Bug #50296 Slave reconnects earlier than the prescribed slave_net_timeout value · 1faafbb0
    Andrei Elkin authored
    There was auto-reconnecting by slave earlier than a prescribed by slave_net_timeout value.
    The issue happened on 64bit solaris that spotted rather incorrect casting of 
    the ulong slave_net_timeout into the uint of mysql.options.read_timeout.
    
    Notice, that there is no reason for slave_net_timeout to be of type of ulong.
    Since it's primarily passed as arg to mysql_options the type can be made
    as uint to avoid all conversion hassles.
    That's what the fixes are made.
    A "side" effect of the patch is a new value for the max of slave_net_timeout
    to be the max of the unsigned int type (therefore to vary across platforms).
    
    Note, a regression test can't be made to run reliably without making it to last over some 
    20 secs. That's why it is placed in suite/large_tests.
    
    mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result:
      the new test results.
    mysql-test/suite/large_tests/t/rpl_slave_net_timeout-slave.opt:
      Initialization of the option that yields slave_net_timeout's default.
    sql/mysql_priv.h:
      changing type for slave_net_timeout from ulong to uint
    sql/mysqld.cc:
      changing type for slave_net_timeout from ulong to uint
    sql/sys_vars.cc:
      Refining the max value for slave_net_timeout to be as the max for uint type.
    1faafbb0
rpl_slave_net_timeout.result 1.17 KB