1. 12 Aug, 2011 3 commits
  2. 11 Aug, 2011 7 commits
    • Dmitry Lenev's avatar
      Fix for bug #12828477 - "MDL SUBSYSTEM CREATES BIG OVERHEAD · ea4de078
      Dmitry Lenev authored
      FOR CERTAIN QUERIES TO INFORMATION_SCHEMA".
      
      The problem was that metadata locking subsystem introduced
      too much overhead for queries to I_S which were processed by
      opening only .FRM or .TRG files and had to scanned a lot of
      tables (e.g. SELECT COUNT(*) FROM I_S.TRIGGERS was affected). 
      The same effect was not observed for similar queries which 
      performed full-blown table open in order to fill I_S table.
      
      The problem stemmed from the fact that in case when I_S 
      implementation opened only .FRM or .TRG file for each table 
      processed it didn't release metadata lock it has acquired on 
      the table after finishing its processing. As result, list
      of acquired metadata locks were growing until the end of 
      statement. Since acquisition of each new lock required 
      search in the list of already acquired locks performance
      degraded.
      
      The same effect is not observed when I_S implementation
      performs full-blown table open for each table being
      processed, as in the latter cases metadata lock on the
      table is released right after table processing.
      
      This fix addressed the problem by ensuring that I_S 
      implementation releases metadata lock after processing
      the table in both cases of full-blown table open and in 
      case when only .FRM or .TRG file is read.
      
      mysql-test/r/information_schema.result:
        Added coverage for bug #12828477 - "MDL SUBSYSTEM CREATES BIG
        OVERHEAD FOR CERTAIN QUERIES TO INFORMATION_SCHEMA".
      mysql-test/t/information_schema.test:
        Added coverage for bug #12828477 - "MDL SUBSYSTEM CREATES BIG
        OVERHEAD FOR CERTAIN QUERIES TO INFORMATION_SCHEMA".
      sql/sql_show.cc:
        Changed fill_schema_table_from_frm() to release metadata lock
        it has acquired after processing the .FRM or .TRG file for
        table. 
        Without this step metadata locks acquired for each table 
        processed will be accumulated. In situation when a lot of 
        tables are processed by I_S query this will result in
        transaction with too many metadata locks. As result
        performance of acquisition of new lock will degrade.
      ea4de078
    • Tatjana Azundris Nuernberg's avatar
      auto-merge · 9d7da6bd
      Tatjana Azundris Nuernberg authored
      9d7da6bd
    • Tatjana Azundris Nuernberg's avatar
      auto-merge · 7d979a4f
      Tatjana Azundris Nuernberg authored
      7d979a4f
    • Tatjana Azundris Nuernberg's avatar
      auto-merge · 60ee66d3
      Tatjana Azundris Nuernberg authored
      60ee66d3
    • Tatjana Azundris Nuernberg's avatar
      auto-merge · a7da1a1a
      Tatjana Azundris Nuernberg authored
      a7da1a1a
    • Tatjana Azundris Nuernberg's avatar
      auto-merge · c3b67560
      Tatjana Azundris Nuernberg authored
      c3b67560
    • Tatjana Azundris Nuernberg's avatar
      maintain behavior introduced in fix for MySQL bug 35765 · 00dad1c0
      Tatjana Azundris Nuernberg authored
      (avert regression)
      00dad1c0
  3. 10 Aug, 2011 5 commits
    • Chuck Bell's avatar
      WL#5710 : enable and disable plugins · e0812608
      Chuck Bell authored
      Merge with main prior to pushing to mysql-5.5.
      e0812608
    • Marko Mäkelä's avatar
      Merge from mysql-5.5 to local tree. · 4baa66ae
      Marko Mäkelä authored
      4baa66ae
    • Vinay Fisrekar's avatar
      Committing Change On behalf Of Sneha Modi · e1273b83
      Vinay Fisrekar authored
      Bug#12664445 - SYS_VARS.ALL_VARS: WRONG RESULTS RECORDED IN RESULT FILE - TEST CASES MISSING! 
            
      The bug had missing test cases for three system variables. 
      Test cases have been added for these variables:
      'INNODB_FILE_FORMAT_MAX' 
      'INNODB_ROLLBACK_SEGMENTS'
      'INNODB_STATS_METHOD'
            
      The 'sys_vars.all_vars' result file now looks like this:
            
      select variable_name as `There should be *no* variables listed below:` from t2
      left join t1 on variable_name=test_name where test_name is null;
      There should be *no* variables listed below:
            
      INNODB_LARGE_PREFIX
      INNODB_LARGE_PREFIX
            
      The variable 'INNODB_LARGE_PREFIX' is a newly added variable for MySQL 5.6.3 and the test will be added later by the developer.
      e1273b83
    • Marko Mäkelä's avatar
      Merge mysql-5.1 to mysql-5.5. · 79aa9c17
      Marko Mäkelä authored
      79aa9c17
    • Marko Mäkelä's avatar
      Bug#12835650 VARCHAR maximum length performance impact · 7645c5ee
      Marko Mäkelä authored
      row_sel_field_store_in_mysql_format(): Do not pad the unused part of
      the buffer reserved for a True VARCHAR column (introduced in 5.0.3).
      Add Valgrind instrumentation ensuring that the unused part will be
      flagged uninitialized.
      
      row_sel_copy_cached_field_for_mysql(): New function: Copy a field
      that is in the MySQL row format, not copying the unused tail of
      VARCHAR columns.
      
      row_sel_pop_cached_row_for_mysql(): Invoke
      row_sel_copy_cached_field_for_mysql() for copying fields.
      When the row is long, copy it field-by-field.
      
      rb:715 approved by Inaam Rana
      7645c5ee
  4. 09 Aug, 2011 2 commits
    • Chuck Bell's avatar
      WL#5710 : enable and disable plugins · 1b730666
      Chuck Bell authored
      This patch corrects an error in the test to ensure the proper path
      is used for the --mysqld option.
      1b730666
    • Chuck Bell's avatar
      WL#5710 : enable and disable plugins · 99f2e85b
      Chuck Bell authored
      This patch corrects a problem found in PB. Some platforms have very
      different locations for the mysql installation. The client was not
      able to find either my_print_defaults or mysqld predictably.
      
      The patch adds two new command options --mysqld and --my-print-defaults
      which can be used to provide the location of mysqld and
      my_print_defaults by providing the paths.
      
      The patch also changes the concatenation of the soname extension to
      fix a problem found on some Ubuntu systems.
      
      The patch contains changes to the test to ensure it will run on all
      platforms. A trap is set in the test to skip testing if the location
      of mysqld, my_print_defaults, or the daemon_example.ini files cannot
      be determined.
      99f2e85b
  5. 08 Aug, 2011 6 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. 25 Jul, 2011 1 commit
    • Chuck Bell's avatar
      WL#5710: enable and disable plugins · 6c4da66d
      Chuck Bell authored
      This patch corrects a problem found in pushbuild with the stat()
      method on some platforms. The code was changed to use my_stat()
      instead.
      
      Also adds mysql_plugin to the mysql.spec.sh file for packaging.
      6c4da66d
  12. 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
  13. 22 Jul, 2011 5 commits
    • 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
    • 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