1. 22 Jul, 2011 5 commits
    • Dmitry Lenev's avatar
      Fix for bug #11754210 - "45777: CHECK TABLE DOESN'T · f3c1f797
      Dmitry Lenev authored
      SHOW ALL PROBLEMS FOR MERGE TABLE COMPLIANCE IN 5.1".
      
      The problem was that CHECK/REPAIR TABLE for a MERGE table which
      had several children missing or in wrong engine reported only
      issue with the first such table in its result-set. While in 5.0
      this statement returned the whole list of problematic tables.
      
      Ability to report problems for all children was lost during
      significant refactorings of MERGE code which were done as part
      of work on 5.1 and 5.5 releases.
      
      This patch restores status quo ante refactorings by changing
      code in such a way that:
      1) Failure to open child table due to its absence during CHECK/
         REPAIR TABLE for a MERGE table is not reported immediately
         when its absence is discovered in open_tables(). Instead
         handling/error reporting in such a situation is postponed
         until the moment when children are attached.
      2) Code performing attaching of children no longer stops when
         it encounters first problem with one of the children during
         CHECK/REPAIR TABLE. Instead it continues iteration through
         the child list until all problems caused by child absence/
         wrong engine are reported.
      
      Note that even after this change problem with mismatch of
      child/parent definition won't be reported if there is also
      another child missing, but this is how it was in 5.0 as well.
      
      mysql-test/r/merge.result:
        Added test case for bug #11754210 - "45777: CHECK TABLE DOESN'T
        SHOW ALL PROBLEMS FOR MERGE TABLE COMPLIANCE IN 5.1".
        Adjusted results of existing tests to the fact that CHECK/REPAIR
        TABLE statements now try to report problems about missing table/
        wrong engine for all underlying tables, and to the fact that
        mismatch of parent/child definitions is always reported as an
        error and not a warning.
      mysql-test/t/merge.test:
        Added test case for bug #11754210 - "45777: CHECK TABLE DOESN'T
        SHOW ALL PROBLEMS FOR MERGE TABLE COMPLIANCE IN 5.1".
      sql/sql_base.cc:
        Changed code responsible for opening tables to ignore the fact
        that underlying tables of a MERGE table are missing, if this
        table is opened for CHECK/REPAIR TABLE.
        The absence of underlying tables in this case is now detected and
        appropriate error is reported at the point when child tables are
        attached. At this point we can produce full list of problematic
        child tables/errors to be returned as part of CHECK/REPAIR TABLE
        result-set.
      storage/myisammrg/ha_myisammrg.cc:
        Changed myisammrg_attach_children_callback() to handle new
        situation, when during CHECK/REPAIR TABLE we do not report 
        error about missing child immediately when this fact is 
        discovered during open_tables() but postpone error-reporting
        till the time when children are attached. 
        Also this callback is now responsible for pushing an error
        mentioning problematic child table to the list of errors to 
        be reported by CHECK/REPAIR TABLE statements.
        Finally, since now myrg_attach_children() no longer relies on
        return value from callback to determine the end of the children
        list, callback no longer needs to set my_errno value and can
        be simplified.
        
        Changed myrg_print_wrong_table() to always report a problem
        with child table as an error and not as a warning. This makes
        reporting for different types of issues with child tables
        more consistent and compatible with 5.0 behavior.
      storage/myisammrg/myrg_open.c:
        Changed code in myrg_attach_children() not to abort on the
        first problem with a child table when attaching children to
        parent MERGE table during CHECK/REPAIR TABLE statement 
        execution. This allows CHECK/REPAIR TABLE to report problems 
        about absence/wrong engine for all underlying tables as
        part of their result-set.
      f3c1f797
    • Sunanda Menon's avatar
      76f7a700
    • Alexander Nozdrin's avatar
      Manual merge from mysql-5.1. · 2d7b3bad
      Alexander Nozdrin authored
      2d7b3bad
    • Alexander Nozdrin's avatar
      Manual merge from mysql-5.0. · 9bb51735
      Alexander Nozdrin authored
      9bb51735
    • Alexander Nozdrin's avatar
      For for Bug#12696072: FIX OUTDATED COPYRIGHT NOTICES IN RUNTIME RELATED CLIENT · 9c1aebb3
      Alexander Nozdrin authored
      TOOLS
      
      Backport a fix for Bug 57094 from 5.5.
      The following revision was backported:
      
      # revision-id: alexander.nozdrin@oracle.com-20101006150613-ls60rb2tq5dpyb5c
      # parent: bar@mysql.com-20101006121559-am1e05ykeicwnx48
      # committer: Alexander Nozdrin <alexander.nozdrin@oracle.com>
      # branch nick: mysql-5.5-bugteam-bug57094
      # timestamp: Wed 2010-10-06 19:06:13 +0400
      # message:
      #   Fix for Bug 57094 (Copyright notice incorrect?).
      #   
      #   The fix is to:
      #     - introduce ORACLE_WELCOME_COPYRIGHT_NOTICE define to have a single place
      #       to specify copyright notice;
      #     - replace custom copyright notices with ORACLE_WELCOME_COPYRIGHT_NOTICE
      #       in programs.
      9c1aebb3
  2. 21 Jul, 2011 1 commit
    • Jon Olav Hauglid's avatar
      Bug#12779790 COMPILATION FAILS OS X 10.7 - IMPLICIT DECLARATION OF · 2c1c172f
      Jon Olav Hauglid authored
                   FUNCTION 'PTHREAD_INIT' 
      
      The problem was that compilation would fail with a warning:
      Implicit declaration of function 'pthread_init' if MySQL was
      compiled on OS X 10.7 (Lion). The reason was that pthread_init()
      is now part of an internal OS X pthread library so it was found
      by CMake.
      
      This patch fixes the problem by removing HAVE_PTHREAD_INIT and
      related code. pthread_init() was specific to MIT-pthreads which
      has not been supported since 4.1 and was therefore no longer
      relevant.
      
      No test case added.
      2c1c172f
  3. 20 Jul, 2011 3 commits
  4. 19 Jul, 2011 3 commits
  5. 18 Jul, 2011 6 commits
    • Alfranio Correia's avatar
      BUG#11809016 - NO WAY TO DISCOVER AN INSTANCE IS NO LONGER A SLAVE FOLLOWING MYSQL BUG#28796 · 4317cc3d
      Alfranio Correia authored
      Before BUG#28796, an empty host was used to identify that an instance was no
      longer a slave. However, BUG#28796 changed this behavior and one cannot set
      an empty host. Besides, a RESET SLAVE only cleans up information on the next
      event to retrieve from the master, disables ssl and resets heartbeat period.
      So a call to SHOW SLAVE STATUS after issuing a RESET SLAVE still returns some
      valid information, such as host, port, user and password.
      
      To fix this problem, we have introduced the command RESET SLAVE ALL that does
      what a regular RESET SLAVE does and also clears host, port, user and password
      information thus allowing users to identify when an instance is no longer a
      slave.
      4317cc3d
    • Bjorn Munch's avatar
      null upmerge · 39e8bb5e
      Bjorn Munch authored
      39e8bb5e
    • Bjorn Munch's avatar
      merge from 5.5-mtr · 799b9f0b
      Bjorn Munch authored
      799b9f0b
    • Tor Didriksen's avatar
      Bug#12711164 - 61676: RESULT OF DIV WITH DECIMAL AND INTEGER DOES NOT MAKE SENSE · ae76b743
      Tor Didriksen authored
      Truncate result of decimal division before converting to integer.
      
      
      mysql-test/r/func_math.result:
        New test case.
      mysql-test/t/func_math.test:
        New test case.
      sql/item_func.cc:
        Item_func_int_div::val_int():
        Truncate result of decimal division before converting to integer.
      ae76b743
    • Bjorn Munch's avatar
      merge from 5.1-mtr · 94d6fc52
      Bjorn Munch authored
      94d6fc52
    • Tor Didriksen's avatar
      Bug#12537160 ASSERTION FAILED: STOP0 <= &TO->BUF[TO->LEN] WITH LARGE NUMBER. · fe57d0d5
      Tor Didriksen authored
      Turns out the DBUG_ASSERT added by fix for Bug#11792200 was overly pessimistic:
      'stop0' is used in the main loop of do_div_mod, but we only dereference 'buf0'
      for div operations, not for mod.
      
      
      mysql-test/r/func_math.result:
        New test case.
      mysql-test/t/func_math.test:
        New test case.
      strings/decimal.c:
        Move DBUG_ASSERT down to where we actually dereference the loop pointer.
      fe57d0d5
  6. 15 Jul, 2011 7 commits
  7. 14 Jul, 2011 3 commits
    • Luis Soares's avatar
      BUG#11753004 · 55fbe4c3
      Luis Soares authored
      Manual merge from mysql-5.1 into mysql-5.5.
      55fbe4c3
    • Luis Soares's avatar
      BUG#11753004: 44360: REPLICATION FAILED · 1b1e1e05
      Luis Soares authored
                        
      The server crashes if it processes table map events that are
      corrupted, especially if they map different tables to the same
      identifier. This could happen, for instance, due to BUG 56226.
                        
      We fix this by checking whether the table map has already been
      mapped before actually applying the event. If it has been mapped
      with different settings an error is raised and the slave SQL
      thread stops. If it has been mapped with same settings the event
      is skipped. If the table is set to be ignored by the filtering
      rules, there is no change in behavior: the event is skipped and
      ids are not checked.
      
      
      mysql-test/suite/rpl/t/rpl_row_corruption.test:
        Added a simple test case that checks both cases:
        - multiple table maps with the same identifier
        - multiple table maps with the same identifier, but only one
          is processed (the others are filtered out)
      1b1e1e05
    • Anitha Gopi's avatar
      Bug#12561297 : Disabled the test · c84fac29
      Anitha Gopi authored
      c84fac29
  8. 13 Jul, 2011 1 commit
  9. 12 Jul, 2011 3 commits
    • Luis Soares's avatar
      BUG#12695969 · d0b76217
      Luis Soares authored
        
      Automerged from mysql-5.1 into mysql-5.5 (empty cset).
      d0b76217
    • Luis Soares's avatar
      BUG#12695969 · 9c4287f4
      Luis Soares authored
      Manually merged from mysql-5.0 into mysql-5.1.
      
      conflicts
      =========
      
      include/Makefile.am
      9c4287f4
    • Luis Soares's avatar
      BUG#12695969 · 34d33506
      Luis Soares authored
      Follow-up patch that adds the newly added header file to
      Makefile.am noinst_HEADERS.
      34d33506
  10. 11 Jul, 2011 3 commits
    • Luis Soares's avatar
      BUG#12695969 · 00c3b2e6
      Luis Soares authored
      Manually merged from mysql-5.1:
      
        - fixed mysqlbinlog copyright year: 2001 --> 2000
        - fixed address in license header
      
      conflicts
      =========
      
       - client/mysqlbinlog.cc
       - include/welcome_copyright_notice.h
      00c3b2e6
    • Luis Soares's avatar
      BUG#12695969 · 39f76b60
      Luis Soares authored
      Manually merged mysql-5.0 into mysql-5.1.
      
      conflicts
      =========
      client/mysqlibinlog.cc
      39f76b60
    • Luis Soares's avatar
      BUG#12695969: FIX OUTDATED COPYRIGHT NOTICES IN REPLACTION · fac2ec36
      Luis Soares authored
      CLIENT TOOLS
            
      The fix is to backport part of revision:
              
        - alexander.nozdrin@oracle.com-20101006150613-ls60rb2tq5dpyb5c
            
      from mysql-5.5. In detail, we add the oracle welcome notice
      header file proposed in the original patch and include/use it
      in client/mysqlbinlog.cc, replacing the existing and obsolete
      notice.
      fac2ec36
  11. 08 Jul, 2011 1 commit
    • unknown's avatar
      Null Merge from mysql-5.1 with second fix for Bug#12637786 · 91418e81
      unknown authored
      Bug#12637786 was fixed with rb:692 by marko.  But that fix has a remaining
      bug.  It added this assert;
          ut_ad(ind_field->prefix_len);
      before a section of code that assumes there is a prefix_len.  
      
      The patch replaced code that explicitly avoided this with a check for
      prefix_len.  It turns out that the purge thread can get to that assert
      without a prefix_len because it does not use a row_ext_t* .
      When UNIV_DEBUG is not defined, the affect of this is that the purge thread
      sets the dfield->len to zero and then cannot find the entry in the index to
      purge.  So secondary index entries remain unpurged.
      
      This patch does not do the assert.  Instead, it uses
          'if (ind_field->prefix_len) {...}'
      around the section of code that assumes a prefix_len.  This is the way the
      patch I provided to Marko did it.
      
      The test case is simply modified to do a sleep(10) in order to give the
      purge thread a chance to run. Without the code change to row0row.c, this
      modified testcase will assert if InnoDB was compiled with UNIV_DEBUG.
      I tried to sleep(5), but it did not always assert.
      91418e81
  12. 07 Jul, 2011 4 commits
    • unknown's avatar
      Bug#12637786 was fixed with rb:692 by marko. But that fix has a remaining · be4b8c6d
      unknown authored
      bug.  It added this assert;
          ut_ad(ind_field->prefix_len);
      before a section of code that assumes there is a prefix_len.  
      
      The patch replaced code that explicitly avoided this with a check for
      prefix_len.  It turns out that the purge thread can get to that assert
      without a prefix_len because it does not use a row_ext_t* .
      When UNIV_DEBUG is not defined, the affect of this is that the purge thread
      sets the dfield->len to zero and then cannot find the entry in the index to
      purge.  So secondary index entries remain unpurged.
      
      This patch does not do the assert.  Instead, it uses
          'if (ind_field->prefix_len) {...}'
      around the section of code that assumes a prefix_len.  This is the way the
      patch I provided to Marko did it.
      
      The test case is simply modified to do a sleep(10) in order to give the
      purge thread a chance to run. Without the code change to row0row.c, this
      modified testcase will assert if InnoDB was compiled with UNIV_DEBUG.
      I tried to sleep(5), but it did not always assert.
      be4b8c6d
    • Joerg Bruehe's avatar
      Upmerge the 45415 fix from 5.1 to 5.5 · cded107a
      Joerg Bruehe authored
      cded107a
    • Joerg Bruehe's avatar
      Fix bug#45415: "rpm upgrade recreates test database" · 622fb276
      Joerg Bruehe authored
      Let the creation of the "test" database happen only during a new
      installation, not in an RPM upgrade.
      622fb276
    • Davi Arnaut's avatar
      Bug#12727287: Maintainer mode compilation fails with gcc 4.6 · db6797ca
      Davi Arnaut authored
      GCC 4.6 has new -Wunused-but-set-variable flag, which is enabled
      by -Wall, that causes GCC to emit a warning whenever a local variable
      is assigned to, but otherwise unused (aside from its declaration).
      
      Since the maintainer mode uses -Wall and -Werror, source code which
      triggers these warnings will be rejected. That is, these warnings
      become hard errors.
      
      The solution is to fix the code which triggers these specific warnings.
      In most of the cases, this is a welcome cleanup as code which triggers
      this warning is probably dead anyway.
      
      dbug/dbug.c:
        Unused but set.
      libmysqld/lib_sql.cc:
        Length is not necessary as the converted error message is always
        null-terminated.
      sql/item_func.cc:
        Make get_var_with_binlog private to this compilation unit.
        If a error was raised, do not attempt to evaluate the user
        variable as the statement execution will be interrupted
        anyway.
      sql/mysqld.cc:
        Use a void expression to silence the warning. Avoids the use of
        macros that would make the code more unreadable than it already is.
      sql/protocol.cc:
        Length is not necessary as the converted error message is always
        null-terminated. Remove unnecessary casts and assignment.
      sql/sql_class.h:
        Function is only used in a single compilation unit.
      sql/sql_load.cc:
        Only use the variable outside of EMBEDDED_LIBRARY.
      storage/innobase/btr/btr0cur.c:
        Do not retrieve field, only the record length is being used.
      storage/perfschema/pfs.cc:
        Use a void expression to silence the warning.
      tests/mysql_client_test.c:
        Unused but set.
      unittest/mysys/lf-t.c:
        Unused but set.
      db6797ca