• unknown's avatar
    Fix for BUG#2921 "Replication problem on mutex lock in mySQL-4.0.18": · 92fe7556
    unknown authored
    re-using unused LOCK_active_mi to serialize all administrative
    commands related to replication:
    START SLAVE, STOP SLAVE, RESET SLAVE, CHANGE MASTER, init_slave()
    (replication autostart at server startup), end_slave() (replication
    autostop at server shutdown), LOAD DATA FROM MASTER.
    This protects us against a handful of deadlocks (like BUG#2921
    when two START SLAVE, but when two STOP SLAVE too).
    Removing unused variables.
    
    
    sql/item_func.cc:
      We don't need LOCK_active_mi just to MASTER_POS_WAIT().
    sql/repl_failsafe.cc:
      no need for macro
    sql/set_var.cc:
      no need for macro
    sql/slave.cc:
      Re-using unused LOCK_active_mi to serialize all administrative
      commands related to replication:
      START SLAVE, STOP SLAVE, RESET SLAVE, CHANGE MASTER, init_slave()
      (replication autostart at server startup), end_slave() (replication
      autostop at server shutdown), LOAD DATA FROM MASTER.
      This protects us against a handful of deadlocks.
      Removing unused variables.
    sql/slave.h:
      Re-using LOCK_active_mi to serialize administrative replication commands.
      Macros unneeded. Removing unneeded variables.
    sql/sql_parse.cc:
      found unused variable.
      Replacing macros.
    sql/sql_show.cc:
      replacing macros
    92fe7556
sql_parse.cc 109 KB