1. 29 Aug, 2011 2 commits
  2. 26 Aug, 2011 1 commit
    • Rohit Kalhans's avatar
      BUG#11878104: FIXES OF BUG 11752963 - 44312 TO BACKPORT TO MYSQL-5.1 · 452b320d
      Rohit Kalhans authored
      Background: Backporting fix for BUG 11752963 to Mysql5.1 branch.
      Problem: Fix of bug 11752963 was only available for trunk and 5.5 branch.
      Partial fix has been pushed to 5.1 branch as well. 
      Fix: backporting the fixes of bug 11752963 to 5.1 branch. 
      1. Made all major changes to make 5.1 branch in line with 5.5 and the trunk.
      2. skipped the partial patch that was already applied to the 5.1 branch. 
      
      sql/rpl_rli.h:
        Made inited Volatile (find inline comments)
      sql/slave.cc:
        backported all changes from the fix of BUG#11752963.
      452b320d
  3. 24 Aug, 2011 2 commits
  4. 22 Aug, 2011 2 commits
  5. 19 Aug, 2011 3 commits
  6. 18 Aug, 2011 1 commit
    • Sergey Vojtovich's avatar
      BUG#11763712 - 56458: KILLING A FLUSH TABLE FOR A MERGE/CHILD · ef84b24d
      Sergey Vojtovich authored
                            CRASHES SERVER
      
      Flushing of MERGE table or one of its child tables, which was
      locked by flushing thread using LOCK TABLES, might have caused
      crashes or assertion failures if the thread failed to reopen
      child or parent table.
      Particularly, this might have happened when another connection
      killed this FLUSH TABLE statement/connection.
      Also this problem might have occurred when we failed to reopen
      MERGE table or one of its children when executing DDL statement
      under LOCK TABLES.
      
      The problem was caused by the fact that reopen_tables() might
      have failed to reopen child table but still tried to reopen,
      reattach children for and re-lock its parent. Vice versa it
      might have failed to reopen parent but kept references from
      children to parent around. Since reopen_tables() closes table
      it has failed to reopen and therefore frees all associated
      memory such dangling references led to crashes when followed.
      
      This patch solves this problem by ensuring that we always close
      parent table and all its children if we fail to reopen this
      table or one of its children. Same happens if we fail to reattach
      children to parent.
      
      Affects 5.1 only.
      
      mysql-test/r/merge.result:
        A test case for BUG#11763712.
      mysql-test/t/merge.test:
        A test case for BUG#11763712.
      sql/sql_base.cc:
        When flushing tables under LOCK TABLES, all locked
        and flushed tables are released and then reopened.
        It may happen that we failed to reopen some tables,
        in this case we reopen as much tables as possible.
        
        If it was not possible to reopen MERGE child, MERGE
        parent is unusable and must be removed from thread
        open tables list.
        
        If it was not possible to reopen MERGE parent, all
        MERGE child table objects are unusable as well, at
        least because their locks are handled by MERGE parent.
        They must also be removed from thread open tables
        list.
        
        In other words if it was impossible to reopen any
        object of a MERGE table or reattach child tables,
        all objects of this MERGE table must be considered
        unusable and closed.
      ef84b24d
  7. 17 Aug, 2011 3 commits
  8. 16 Aug, 2011 3 commits
  9. 15 Aug, 2011 5 commits
    • Joerg Bruehe's avatar
      Null-merge, · 1c2dc010
      Joerg Bruehe authored
      conflict on "configure.in" which is gone from 5.5.
      No change.
      1c2dc010
    • Joerg Bruehe's avatar
      Null merge for pushing. · 2370064d
      Joerg Bruehe authored
      2370064d
    • Joerg Bruehe's avatar
      Merge bug#47337 for pushing into 5.1 · c818f98f
      Joerg Bruehe authored
      c818f98f
    • Marko Mäkelä's avatar
      d301563f
    • Marko Mäkelä's avatar
      Bug #11766591 59733: Possible deadlock when buffered changes are to be · fdcfa89d
      Marko Mäkelä authored
      discarded in buf_page_create()
      
      This bug turned out to be a false alarm, a bug in the UNIV_SYNC_DEBUG
      diagnostic code. Because of this, the patch was not backported to the
      built-in InnoDB in MySQL 5.1. Furthermore, there is no test case for
      InnoDB Plugin in MySQL 5.1, because the delete buffering in MySQL 5.5
      makes triggering the failure much easier.
      
      When a freed page for which there exist orphaned buffered changes is
      allocated and reused for something else, buf_page_create() will discard
      the buffered changes by invoking ibuf_merge_or_delete_for_page().
      This would violate the InnoDB latching order.
      
      Tweak the latching order as follows. Move SYNC_IBUF_MUTEX below
      SYNC_FSP_PAGE, where it logically belongs, and assign new latching
      levels for the ibuf->index->lock and the insert buffer B-tree pages:
      
      #define SYNC_IBUF_MUTEX		370	/* ibuf_mutex */
      #define SYNC_IBUF_INDEX_TREE	360
      #define SYNC_IBUF_TREE_NODE_NEW	359
      #define SYNC_IBUF_TREE_NODE	358
      
      btr_block_get(), btr_page_get(): In UNIV_SYNC_DEBUG, add the parameter
      "index" for determining the appropriate latching order
      (SYNC_IBUF_TREE_NODE or SYNC_TREE_NODE).
      
      btr_page_alloc_for_ibuf(), btr_create(): Use SYNC_IBUF_TREE_NODE_NEW
      instead of SYNC_TREE_NODE_NEW for insert buffer pages.
      
      btr_cur_search_to_nth_level(), btr_pcur_restore_position_func(): Use
      SYNC_IBUF_TREE_NODE instead of SYNC_TREE_NODE for insert buffer pages.
      
      btr_search_guess_on_hash(): Assert that the index is not an insert buffer tree.
      
      dict_index_add_to_cache(): Use SYNC_IBUF_INDEX_TREE for the insert
      buffer tree (ibuf->index->lock).
      
      ibuf0ibuf.c: Use SYNC_IBUF_TREE_NODE or SYNC_IBUF_TREE_NODE_NEW for
      all B-tree pages.
      
      ibuf_merge_or_delete_for_page(): Assert that the user page is
      BUF_IO_READ fixed. Only in this way it is OK to latch it as
      SYNC_IBUF_TREE_NODE instead of the proper SYNC_TREE_NODE (which would
      violate the changed latching order).
      
      sync_thread_add_level(): Remove the special tweak for
      SYNC_IBUF_MUTEX. Add rules for the added latching levels.
      
      rb:591 approved by Jimmy Yang
      fdcfa89d
  10. 12 Aug, 2011 4 commits
  11. 11 Aug, 2011 7 commits
    • Dmitry Lenev's avatar
      Fix for bug #12828477 - "MDL SUBSYSTEM CREATES BIG OVERHEAD · 46294e22
      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.
      46294e22
    • Tatjana Azundris Nuernberg's avatar
      auto-merge · 26f25936
      Tatjana Azundris Nuernberg authored
      26f25936
    • Tatjana Azundris Nuernberg's avatar
      auto-merge · d70f2158
      Tatjana Azundris Nuernberg authored
      d70f2158
    • Tatjana Azundris Nuernberg's avatar
      auto-merge · 8281dba2
      Tatjana Azundris Nuernberg authored
      8281dba2
    • Tatjana Azundris Nuernberg's avatar
      auto-merge · aef74d44
      Tatjana Azundris Nuernberg authored
      aef74d44
    • Tatjana Azundris Nuernberg's avatar
      auto-merge · 404ad3c1
      Tatjana Azundris Nuernberg authored
      404ad3c1
    • Tatjana Azundris Nuernberg's avatar
      maintain behavior introduced in fix for MySQL bug 35765 · b327b29e
      Tatjana Azundris Nuernberg authored
      (avert regression)
      b327b29e
  12. 10 Aug, 2011 5 commits
    • Chuck Bell's avatar
      WL#5710 : enable and disable plugins · 74acdf68
      Chuck Bell authored
      Merge with main prior to pushing to mysql-5.5.
      74acdf68
    • Marko Mäkelä's avatar
      Merge from mysql-5.5 to local tree. · d01c2b82
      Marko Mäkelä authored
      d01c2b82
    • Vinay Fisrekar's avatar
      Committing Change On behalf Of Sneha Modi · a4f97e24
      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.
      a4f97e24
    • Marko Mäkelä's avatar
      Merge mysql-5.1 to mysql-5.5. · 6c036b7f
      Marko Mäkelä authored
      6c036b7f
    • Marko Mäkelä's avatar
      Bug#12835650 VARCHAR maximum length performance impact · 19a06b48
      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
      19a06b48
  13. 09 Aug, 2011 2 commits
    • Chuck Bell's avatar
      WL#5710 : enable and disable plugins · 3d8bd06b
      Chuck Bell authored
      This patch corrects an error in the test to ensure the proper path
      is used for the --mysqld option.
      3d8bd06b
    • Chuck Bell's avatar
      WL#5710 : enable and disable plugins · 9709dd87
      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.
      9709dd87