1. 13 Aug, 2011 1 commit
    • Dmitry Shulga's avatar
      Fixed Bug#12621017 - CRASH IF A SP VARIABLE IS USED IN THE LIMIT CLAUSE OF A · 644db664
      Dmitry Shulga authored
      SET STATEMENT.
      
      Server built with debug asserts, without debug crashes if a user tries
      to run a stored procedure that constains query with subquery that include
      either LIMIT or LIMIT OFFSET clauses.
      
      The problem was that Item::fix_fields() was not called for the items
      representing LIMIT or OFFSET clauses.
      
      The solution is to call Item::fix_fields() right before evaluation in
      st_select_lex_unit::set_limit().
      
      mysql-test/r/sp.result:
        Added testcase result for bug#12621017. Updated testcase result for
        bug 11918.
      mysql-test/t/sp.test:
        Added testcase for bug#12621017. Addressed review comments for Bug 11918
        (added tests for use LIMIT at stored function).
      sql/item.h:
        Addressed review comments for Bug 11918.
      sql/share/errmsg-utf8.txt:
        Addressed review comments for Bug 11918.
      sql/sp_head.cc:
        Addressed review comments for Bug 11918.
      sql/sql_lex.cc:
        Added call fix_fields() for item just before its evaluation.
      sql/sql_yacc.yy:
        Addressed review comments for Bug 11918.
      644db664
  2. 12 Aug, 2011 4 commits
    • Georgi Kodinov's avatar
      merge · 232b112e
      Georgi Kodinov authored
      232b112e
    • Georgi Kodinov's avatar
      Bug #11765565: 58548: 5.5.X NEEDS TO LINK TO THE CORESERVICES FRAMEWORK · 0d6a4b08
      Georgi Kodinov authored
        FOR SOME PLUGINS TO WORK
      
      Some dynamically loadable plugins on the Mac may need functions from the 
      CoreServices framework. Unfortunately the only place where this can be initialized
      is the main executable. Thus to allow plugins to use functions from that framework
      the mysqld binary needs to link to the framework.
      0d6a4b08
    • Georgi Kodinov's avatar
      Bug #12818542: PAM: ADDING PASSWORD FOR AN ACCOUNT DISABLES · 4d0784ee
      Georgi Kodinov authored
      PAM AUTHENTICATION SETTINGS
      
      SET PASSWORD code on a account with plugin authentication was errorneously
      resetting the in-memory plugin pointer for the user back to native password 
      plugin despite the fact that it was sending a warning that the command has 
      no immediate effect.
      Fixed by not updating the user's plugin if it's already set to a non default value.
      Note that the bug affected only the in-memory cache of the user definitions.
      Any restart of the server will fix the problem.
      Also the salt and the password has are still stored into the user tables (just as 
      it's documented now).
      Test case added.
      One old test case result updated  to have the correct value.
      4d0784ee
    • Georgi Kodinov's avatar
      bumped up the version to 5.5.18 · 5a7e0127
      Georgi Kodinov authored
      5a7e0127
  3. 10 Aug, 2011 4 commits
  4. 09 Aug, 2011 3 commits
  5. 08 Aug, 2011 2 commits
  6. 05 Aug, 2011 1 commit
  7. 03 Aug, 2011 1 commit
    • Gleb Shchepa's avatar
      backport from mysql-trunk · 22c2d06d
      Gleb Shchepa authored
      BUG #11754979 - 46675: ON DUPLICATE KEY UPDATE AND UPDATECOUNT() POSSIBLY WRONG 
      
      The mysql_affected_rows() client call returns 3 instead of 2 on
      INSERT ... ON DUPLICATE KEY UPDATE query with a duplicated key value.
      
      The fix for the old bug #29692 was incomplete: unnecessary double
      increment of "touched" rows still happened.
      
      This bugfix removes:
      1) unneeded increment of "touched" rows and
      2) useless double resetting of auto-increment value.
      
      
      sql/sql_insert.cc:
        write_record() function:
        Unneeded increment of "touched" rows and useless double resetting
        of auto-increment value has been removed.
      tests/mysql_client_test.c:
        New test case.
      22c2d06d
  8. 02 Aug, 2011 2 commits
    • Sergey Glukhov's avatar
      5.1 -> 5.5 merge · 53fb954d
      Sergey Glukhov authored
      53fb954d
    • Sergey Glukhov's avatar
      Bug#11766594 59736: SELECT DISTINCT.. INCORRECT RESULT WITH DETERMINISTIC FUNCTION IN WHERE C · 3468b55a
      Sergey Glukhov authored
      There is an optimization of DISTINCT in JOIN::optimize()
      which depends on THD::used_tables value. Each SELECT statement
      inside SP resets used_tables value(see mysql_select()) and it
      leads to wrong result. The fix is to replace THD::used_tables
      with LEX::used_tables.
      
      
      mysql-test/r/sp.result:
        test case
      mysql-test/t/sp.test:
        test case
      sql/sql_base.cc:
        THD::used_tables is replaced with LEX::used_tables
      sql/sql_class.cc:
        THD::used_tables is replaced with LEX::used_tables
      sql/sql_class.h:
        THD::used_tables is replaced with LEX::used_tables
      sql/sql_insert.cc:
        THD::used_tables is replaced with LEX::used_tables
      sql/sql_lex.cc:
        THD::used_tables is replaced with LEX::used_tables
      sql/sql_lex.h:
        THD::used_tables is replaced with LEX::used_tables
      sql/sql_prepare.cc:
        THD::used_tables is replaced with LEX::used_tables
      sql/sql_select.cc:
        THD::used_tables is replaced with LEX::used_tables
      3468b55a
  9. 28 Jul, 2011 1 commit
  10. 27 Jul, 2011 5 commits
  11. 24 Jul, 2011 1 commit
    • Alfranio Correia's avatar
      Post-push fix for BUG#11809016. · 111570df
      Alfranio Correia authored
      In 5.5, REFRESH SLAVE is used as an alias for RESET SLAVE and
      was removed in 5.6. Reseting a slave through REFRESH SLAVE was
      causing errors in the valgrind platform since reset_slave_info
      was undefined.
      
      To fix the problem, we have set reset_slave_info while calling
      REFRESH SLAVE.
      111570df
  12. 22 Jul, 2011 7 commits
    • Georgi Kodinov's avatar
      Bug #12319710: INVALID MEMORY READ AND/OR CRASH IN MY_UCA_CHARCMP · 50af230e
      Georgi Kodinov authored
      WITH UTF32
      
      The 5.5 version of the UTF32 collation was not enforcing the BMP range that 
      it currently supports when comparing with LIKE. 
      Fixed by backporting the checks for the BMP from trunk.
      Added a named constant for the maximum character that can have a weight
      in the weight table.
      50af230e
    • Dmitry Lenev's avatar
      Fix for bug #11754210 - "45777: CHECK TABLE DOESN'T · 0b5b1dd1
      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.
      0b5b1dd1
    • Georgi Kodinov's avatar
      4ba30341
    • Sunanda Menon's avatar
      bcb4a861
    • Alexander Nozdrin's avatar
      Manual merge from mysql-5.1. · 93126975
      Alexander Nozdrin authored
      93126975
    • Alexander Nozdrin's avatar
      Manual merge from mysql-5.0. · 3a786df2
      Alexander Nozdrin authored
      3a786df2
    • Alexander Nozdrin's avatar
      For for Bug#12696072: FIX OUTDATED COPYRIGHT NOTICES IN RUNTIME RELATED CLIENT · cb523995
      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.
      cb523995
  13. 21 Jul, 2011 1 commit
    • Jon Olav Hauglid's avatar
      Bug#12779790 COMPILATION FAILS OS X 10.7 - IMPLICIT DECLARATION OF · aee88a4c
      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.
      aee88a4c
  14. 20 Jul, 2011 3 commits
  15. 19 Jul, 2011 3 commits
  16. 18 Jul, 2011 1 commit
    • Alfranio Correia's avatar
      BUG#11809016 - NO WAY TO DISCOVER AN INSTANCE IS NO LONGER A SLAVE FOLLOWING MYSQL BUG#28796 · e94de17f
      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.
      e94de17f