1. 18 Oct, 2010 3 commits
  2. 16 Oct, 2010 1 commit
    • unknown's avatar
      Bug#56118 STOP SLAVE does not wait till trx with CREATE TMP TABLE ends, · 211552cc
      unknown authored
                replication aborts
      
      When recieving a 'SLAVE STOP' command, slave SQL thread will roll back the
      transaction and stop immidiately if there is only transactional table updated,
      even through 'CREATE|DROP TEMPOARY TABLE' statement are in it. But These
      statements can never be rolled back. Because the temporary tables to the user
      session mapping remain until 'RESET SLAVE', Therefore it will abort SQL thread
      with an error that the table already exists or doesn't exist, when it restarts
      and executes the whole transaction again.
      
      After this patch, SQL thread always waits till the transaction ends and then stops,
      if 'CREATE|DROP TEMPOARY TABLE' statement are in it.
      
      mysql-test/extra/rpl_tests/rpl_stop_slave.test:
        Auxiliary file which is used to test this bug.
      mysql-test/suite/rpl/t/rpl_stop_slave.test:
        Test case for this bug.
      sql/slave.cc:
        Checking if OPTION_KEEP_LOG is set. If it is set, SQL thread should wait
        until the transaction ends.
      sql/sql_parse.cc:
        Add a debug point for testing this bug.
      211552cc
  3. 13 Oct, 2010 3 commits
  4. 11 Oct, 2010 1 commit
    • unknown's avatar
      Bug#56226 Table map set to 0 after altering MyISAM table · 42f8d2f2
      unknown authored
      After ALTER TABLE which changed only table's metadata, row-based
      binlog sometimes got corrupted since the tablemap was unexpectedly
      set to 0 for subsequent updates to the same table.
      
      ALTER TABLE which changed only table's metadata always reset
      table_map_id for the table share to 0. Despite the fact that
      0 is a valid value for table_map_id, this step caused problems
      as it could have created situation in which we had more than
      one table share with table_map_id equal 0. If more than one
      table with table_map_id are 0 were updated in the same statement,
      updates to these different tables were written into the same
      rows event. This caused slave server to crash.
      
      This bug happens only on 5.1. It doesn't affect 5.5+.
      
      This patch solves this problem by ensuring that ALTER TABLE
      statements which change metadata only never reset table_map_id
      to 0. To do this it changes reopen_table() to correctly use
      refreshed table_map_id value instead of using the old one/
      resetting it.
      
      
      mysql-test/suite/rpl/r/rpl_alter.result:
        Add test for BUG#56226
      mysql-test/suite/rpl/t/rpl_alter.test:
        Add test for BUG#56226
      42f8d2f2
  5. 10 Oct, 2010 1 commit
  6. 09 Oct, 2010 1 commit
    • unknown's avatar
      Bug#55375 Transaction bigger than max_binlog_cache_size crashes slave · 10812c07
      unknown authored
      When slave executes a transaction bigger than slave's max_binlog_cache_size,
      slave will crash. It is caused by the assert that server should only roll back
      the statement but not the whole transaction if the error ER_TRANS_CACHE_FULL 
      happens. But slave sql thread always rollbacks the whole transaction when
      an error happens.
                  
      Ather this patch, we always clear any error set in sql thread(it is different
      from the error in 'SHOW SLAVE STATUS') and it is cleared before rolling back
      the transaction.
      
      
      mysql-test/suite/rpl/r/rpl_binlog_max_cache_size.result:
        SET binlog_cache_size and max_binlog_cache_size for all test cases.
        Add test case for bug#55375.
      mysql-test/suite/rpl/t/rpl_binlog_max_cache_size-master.opt:
        binlog_cache_size and max_binlog_cache_size can be set in the client connection.
        so remove this option file.
      mysql-test/suite/rpl/t/rpl_binlog_max_cache_size.test:
        SET binlog_cache_size and max_binlog_cache_size for all test cases.
        Add test case for bug#55375.
      sql/log_event.cc:
        Some functions don't return the error code, so it is a wrong error code.
        The error should always be set into thd->main_da. So we use 
        slave_rows_error_report to report the right error.
      sql/slave.cc:
        exec_relay_log_event() need call cleanup_context() to clear context. 
        clearup_context() will call end_trans().
                
        Clear thd's error before cleanup_context. It avoid to trigger the assert
        which cause this bug.
      10812c07
  7. 07 Oct, 2010 1 commit
    • Martin Hansson's avatar
      Bug#56423: Different count with SELECT and CREATE SELECT queries · 30f57b33
      Martin Hansson authored
      This is a regression from the fix for bug no 38999. A storage engine capable
      of reading only a subset of a table's columns updates corresponding bits in
      the read buffer to signal that it has read NULL values for the corresponding
      columns. It cannot, and should not, update any other bits. Bug no 38999
      occurred because the implementation of UPDATE statements compare the NULL bits
      using memcmp, inadvertently comparing bits that were never requested from the
      storage engine. The regression was caused by the storage engine trying to
      alleviate the situation by writing to all NULL bits, even those that it had no
      knowledge of. This has devastating effects for the index merge algorithm,
      which relies on all NULL bits, except those explicitly requested, being left
      unchanged.
      
      The fix reverts the fix for bug no 38999 in both InnoDB and InnoDB plugin and
      changes the server's method of comparing records. For engines that always read
      entire rows, we proceed as usual. For engines capable of reading only select
      columns, the record buffers are now compared on a column by column basis. An
      assertion was also added so that non comparable buffers are never read. Some
      relevant copy-pasted code was also consolidated in a new function.
      30f57b33
  8. 06 Oct, 2010 2 commits
    • Luis Soares's avatar
      BUG#38718: slave sql thread crashes when reading relay log · c93eecdf
      Luis Soares authored
            
      Suprisingly, a Slave_log_event would show up in the binary
      log. This event is never used and should not appear in the
      logs. As such, when the slave (or the mysqlbinlog tool) reads the
      event, it will hit an invalid pointer (reference to the
      descriptor event when deserializing the Slave_log_event was
      purposodely set to NULL).
            
      The presence of the Slave_log_event denotes a corrupted log, but
      we cannot tell how the log got corrupted in the first
      place. However, we can make the server cope with such events when
      it reads them - in case of log corruption - and fail gracefully.
           
      This patch makes the server/mysqlbinlog to report that it has
      found an invalid log event when Slave_log_event is read.
      c93eecdf
    • Alfranio Correia's avatar
      BUG#57098 RBR breaks on changing user password on 5.1 master -> 5.5 slave · 9665bee5
      Alfranio Correia authored
      Backported the patch for BUG#55452.
      9665bee5
  9. 05 Oct, 2010 8 commits
  10. 04 Oct, 2010 4 commits
  11. 03 Oct, 2010 2 commits
  12. 01 Oct, 2010 7 commits
  13. 30 Sep, 2010 5 commits
    • Mattias Jonsson's avatar
      Bug#55458: Partitioned MyISAM table gets crashed by multi-table update · c4858549
      Mattias Jonsson authored
      Bug#57113: ha_partition::extra(ha_extra_function):
                  Assertion `m_extra_cache' failed
      
      Fix for bug#55458 included DBUG_ASSERTS causing
      debug builds of the server to crash on
      another multi-table update.
      
      Removed the asserts since they where wrong.
      (updated after testing the patch in 5.5).
      
      mysql-test/r/partition.result:
        updated result
      mysql-test/t/partition.test:
        Added test for bug#57113
      sql/ha_partition.cc:
        Removed the assert for m_extra_cache when
        ::extra(HA_PREPARE_FOR_UPDATE) was called.
      c4858549
    • Vasil Dimov's avatar
      Fix Bug#56340 innodb updates index stats too frequently after non-index updates · eaaea8eb
      Vasil Dimov authored
      This is a simple optimization issue. All stats are related to only indexed
      columns, index size or number of rows in the whole table. UPDATEs that touch
      only non-indexed columns cannot affect stats and we can avoid calling the
      function row_update_statistics_if_needed() which may result in unnecessary I/O.
      
      Approved by:	Marko (rb://466)
      eaaea8eb
    • Bjorn Munch's avatar
      Bug #52828 Tests that use perl fail when perl is not in path · be7b3c00
      Bjorn Munch authored
      Trying to run perl fails, just like it does when perl is started but fails
      Trap the case that perl was not found/could not be started, and skip test
      Also force a restart of servers since test may already have done something
      mtr now also appends path of current perl to PATH to aid mysqltest
      be7b3c00
    • Vasil Dimov's avatar
      Fix a potential bug when using __sync_lock_test_and_set() · 51cdf595
      Vasil Dimov authored
      TYPE __sync_lock_test_and_set (TYPE *ptr, TYPE value, ...)
      
      it is not documented what happens if the two arguments are of different
      type like it was before: the first one was lock_word_t (byte) and the
      second one was 1 or 0 (int).
      
      Approved by:	Marko (via IRC)
      51cdf595
    • Bjorn Munch's avatar
      Small test fix after 56753 · 9ec47248
      Bjorn Munch authored
      9ec47248
  14. 29 Sep, 2010 1 commit