• unknown's avatar
    When we delete the slave's temp tables from memory, we reset · 5ec3a671
    unknown authored
    rli->save_temporary_tables and slave_open_temp_tables
    (in old 4.0 you could make "SHOW STATUS LIKE 'slave_open_temp_tables'" grow
    indefinitely by doing RESET SLAVE and replicating always the same CREATE
    TEMPORARY TABLE).
    It's critical to reset save_temporary_tables to 0 (otherwise you may later
    read memory which has been freed) so this changeset should go into 4.1.
    
    
    mysql-test/r/rpl_reset_slave.result:
      result update
    mysql-test/t/rpl_reset_slave.test:
      test for RESET SLAVE and creating twice the same temp table in the slave.
    sql/slave.cc:
      when we delete the slave's temp tables (when slave server shuts down and when
      RESET SLAVE), we reset 2 variables: rli->save_temporary_tables & slave_open_temp_tables.
    5ec3a671
rpl_reset_slave.test 1.14 KB