• Luis Soares's avatar
    BUG#41725: slave crashes when inserting into temporary table after · 8e589d1d
    Luis Soares authored
    stop/start slave
          
    When stopping and restarting the slave while it is replicating
    temporary tables, the server would crash or raise an assertion
    failure. This was due to the fact that although temporary tables are
    saved between slave threads restart, the reference to the thread in
    use (table->in_use) was not being properly updated when the restart
    happened (it would still reference the old/invalid thread instead of
    the new one).
          
    This patch addresses this issue by resetting the reference to the new
    slave thread on slave thread restart.
    
    mysql-test/r/rpl_temporary.result:
      Result file.
    mysql-test/t/rpl_temporary.test:
      Test case that checks that both failures go away.
    sql/slave.cc:
      Changed slave.cc to reset sql_thd reference in temporary tables.
    8e589d1d
rpl_temporary.test 7.8 KB