1. 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
  2. 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
  3. 05 Oct, 2010 8 commits
  4. 04 Oct, 2010 4 commits
  5. 03 Oct, 2010 2 commits
  6. 01 Oct, 2010 7 commits
  7. 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
  8. 29 Sep, 2010 1 commit
  9. 28 Sep, 2010 5 commits
  10. 24 Sep, 2010 3 commits
  11. 22 Sep, 2010 3 commits
    • Alexey Kopytov's avatar
      Bug #56709: Memory leaks at running the 5.1 test suite · faf54ff9
      Alexey Kopytov authored
      Fixed a number of memory leaks discovered by valgrind.
      
      dbug/dbug.c:
        This is actually an addendum to the fix for bug #52629:
        
        - there is no point in limiting the fix to just global
        variables, session ones are also affected.
        - zero all fields when allocating a new 'state' structure so
        that FreeState() does not deal with unitialized data later.
        - add a check for a NULL pointer in DBUGCloseFile()
      mysql-test/r/partition_error.result:
        Added a test case for bug #56709.
      mysql-test/r/variables_debug.result:
        Added a test case for bug #56709.
      mysql-test/t/partition_error.test:
        Added a test case for bug #56709.
      mysql-test/t/variables_debug.test:
        Added a test case for bug #56709.
      sql/item_timefunc.cc:
        There is no point in declaring 'value' as a member of
        Item_extract and dynamically allocating memory for it in
        Item_extract::fix_length_and_dec(), since this string is only
        used as a temporary storage in Item_extract::val_int().
      sql/item_timefunc.h:
        Removed 'value' from the Item_extract class definition.
      sql/sql_load.cc:
        - we may need to deallocate 'buffer' even when 'error' is
          non-zero in some cases, since 'error' is public, and there is
          external code modifying it.
        - assign NULL to buffer when deallocating it so that we don't
          do it twice in the destructor
        - there is no point in changing 'error' in the destructor.
      faf54ff9
    • Dmitry Shulga's avatar
      Fixed bug#56821 - failure to start the MySQL Service. · 9516e824
      Dmitry Shulga authored
      sql/log.cc:
        reopen_fstreams modified: fixed error in processing of
        stdout/stderr when run mysqld as Windows service.
      9516e824
    • Bjorn Munch's avatar
      Bug #56921 It should be possible to log connection statements in mysqltest · 7b216d76
      Bjorn Munch authored
      Added --enable-connect-log, somewhet similar to --enable-query-log
      If query log is disabled, disable connect log too
      Also some related cleanup in mysqltest.test: removing duplicate test loop
      7b216d76