1. 22 Feb, 2011 3 commits
    • Sunny Bains's avatar
      Remove ut0bh.ic from 5.5 and then re-add so that the file ids are the same · 2cc16434
      Sunny Bains authored
      in 5.5 and trunk. First we remove the file in the commit.
      2cc16434
    • Sunny Bains's avatar
      83659a7f
    • Sunny Bains's avatar
      Bug #11766227: InnoDB purge lag much worse for 5.5.8 versus 5.1 · 9d6d1902
      Sunny Bains authored
      Bug #11766501: Multiple RBS break the get rseg with mininum trx_t::no code during purge
            
      Bug# 59291 changes:
            
      Main problem is that truncating the UNDO log at the completion of every
      trx_purge() call is expensive as the number of rollback segments is increased.
      We truncate after a configurable amount of pages. The innodb_purge_batch_size
      parameter is used to control when InnoDB does the actual truncate. The truncate
      is done once after 128 (or TRX_SYS_N_RSEGS iterations). In other words we
      truncate after purge 128 * innodb_purge_batch_size. The smaller the batch
      size the quicker we truncate.
            
      Introduce a new parameter that allows how many rollback segments to use for
      storing REDO information. This is really step 1 in allowing complete control
      to the user over rollback space management.
            
      New parameters:
          i) innodb_rollback_segments = number of rollback_segments to use
             (default is now 128) dynamic parameter, can be changed anytime.
             Currently there is little benefit in changing it from the default.
            
      Optimisations in the patch.
            
          i. Change the O(n) behaviour of trx_rseg_get_on_id() to O(log n)
             Backported from 5.6. Refactor some of the binary heap code.
             Create a new include/ut0bh.ic file.
            
          ii. Avoid truncating the rollback segments after every purge.
            
      Related changes that were moved to a separate patch:
            
          i. Purge should not do any flushing, only wait for space to be free so that
             it only does purging of records unless it is held up by a long running
             transaction that is preventing it from progressing.
            
         ii. Give the purge thread preference over transactions when acquiring the
             rseg->mutex during commit. This to avoid purge blocking unnecessarily
             when getting the next rollback segment to purge.
            
      Bug #11766501 changes:
            
      Add the rseg to the min binary heap under the cover of the kernel mutex and
      the binary heap mutex. This ensures the ordering of the min binary heap.
            
      The two changes have to be committed together because they share the same
      that fixes both issues.
            
      rb://567 Approved by: Inaam Rana.
      9d6d1902
  2. 17 Feb, 2011 6 commits
  3. 16 Feb, 2011 2 commits
  4. 15 Feb, 2011 4 commits
  5. 14 Feb, 2011 2 commits
  6. 10 Feb, 2011 8 commits
    • Vasil Dimov's avatar
      Merge mysql-5.1-innodb -> mysql-5.5-innodb · 4c5c1c5d
      Vasil Dimov authored
      4c5c1c5d
    • Vasil Dimov's avatar
      Fix Bug#59307 Valgrind: uninitialized value in rw_lock_set_writer_id_and_recursion_flag() · 07116bbf
      Vasil Dimov authored
      by silencing a bogus Valgrind warning:
      
      ==4392== Conditional jump or move depends on uninitialised value(s)
      ==4392==    at 0x5A18416: rw_lock_set_writer_id_and_recursion_flag (sync0rw.ic:283)
      ==4392==    by 0x5A1865C: rw_lock_x_lock_low (sync0rw.c:558)
      ==4392==    by 0x5A18481: rw_lock_x_lock_func (sync0rw.c:617)
      ==4392==    by 0x597EEE6: mtr_x_lock_func (mtr0mtr.ic:271)
      ==4392==    by 0x597EBBD: fsp_header_init (fsp0fsp.c:970)
      ==4392==    by 0x5A15E78: innobase_start_or_create_for_mysql (srv0start.c:1508)
      ==4392==    by 0x598B789: innobase_init(void*) (ha_innodb.cc:2282)
      
      os_compare_and_swap_thread_id() is defined as
      __sync_bool_compare_and_swap(). From the GCC doc:
      
      `bool __sync_bool_compare_and_swap (TYPE *ptr, TYPE oldval TYPE newval, ...)'
        ...
        The "bool" version returns true if the comparison is successful and
        NEWVAL was written.
      
      So it is not possible that the return value is uninitialized, no matter what
      the arguments to os_compare_and_swap_thread_id() are. Probably Valgrind gets
      confused by the implementation of the GCC internal function
      __sync_bool_compare_and_swap().
      07116bbf
    • Marko Mäkelä's avatar
    • Vasil Dimov's avatar
      acf2e9a6
    • Vasil Dimov's avatar
      Extend the valgrind suppression to cover one more code path: · 2095b63b
      Vasil Dimov authored
      ==3307== Invalid read of size 1
      ==3307==    at 0xA8389A: mach_read_from_4 (mach0data.ic:182)
      ==3307==    by 0xA833E3: buf_buddy_relocate (buf0buddy.c:450)
      ==3307==    by 0xA8451E: buf_buddy_free_low (buf0buddy.c:619)
      ==3307==    by 0x999326: buf_buddy_free (buf0buddy.ic:131)
      ==3307==    by 0x998B66: buf_page_get_gen (buf0buf.c:2968)
      ==3307==    by 0x9765D4: btr_cur_open_at_rnd_pos_func (btr0cur.c:985)
      ==3307==    by 0x97F5EB: btr_estimate_number_of_different_key_vals (btr0cur.c:3621)
      ==3307==    by 0x9C8694: dict_update_statistics (dict0dict.c:4312)
      ==3307==    by 0x8FCF85: row_update_statistics_if_needed (row0mysql.c:933)
      ==3307==    by 0x8FCEF8: row_insert_for_mysql (row0mysql.c:1240)
      ==3307==    by 0x8E8134: ha_innobase::write_row(unsigned char*) (ha_innodb.cc:4988)
      ==3307==    by 0x73CE6D: handler::ha_write_row(unsigned char*) (handler.cc:4776)
      ==3307==    by 0x6512DC: copy_data_between_tables(TABLE*, TABLE*, List<Create_field>&, bool, unsigned int, st_order*, unsigned long long*, unsigned long long*, enum_enable_or_disable, bool) (sql_table.cc:7017)
      ==3307==    by 0x65E1E1: mysql_alter_table(THD*, char*, char*, st_ha_create_information*, TABLE_LIST*, Alter_info*, unsigned int, st_order*, bool) (sql_table.cc:6416)
      ==3307==    by 0x893920: Alter_table_statement::execute(THD*) (sql_alter.cc:106)
      ==3307==    by 0x5DDB3B: mysql_execute_command(THD*) (sql_parse.cc:4321)
      2095b63b
    • Vasil Dimov's avatar
      Increment InnoDB version from 1.1.5 to 1.1.6 · 8a20a73a
      Vasil Dimov authored
      InnoDB 1.1.5 was released with MySQL 5.5.9
      8a20a73a
    • Vasil Dimov's avatar
      Increment InnoDB Plugin version from 1.0.15 to 1.0.16. · 2ae1cdf0
      Vasil Dimov authored
      InnoDB Plugin 1.0.15 has been released with MySQL 5.1.55.
      2ae1cdf0
    • Jimmy Yang's avatar
      Merge a fix for Bug #53756 ALTER TABLE ADD PRIMARY KEY affects crash recovery · 801d0184
      Jimmy Yang authored
      This was already pushed to mysql-5.1-innodb some time ago
      (revision id jimmy.yang@oracle.com-20100907054137-tpuior7hez4f5ghl)
      but it was not merged to the 5.5 trees.
      801d0184
  7. 09 Feb, 2011 1 commit
  8. 08 Feb, 2011 3 commits
    • Marko Mäkelä's avatar
      5dfcf7c7
    • Marko Mäkelä's avatar
      Implement UNIV_BLOB_DEBUG. An early version of this caught Bug #55284. · 154fc1e3
      Marko Mäkelä authored
      This option is known to be broken when tablespaces contain off-page
      columns after crash recovery. It has only been tested when creating
      the data files from the scratch.
      
      btr_blob_dbg_t: A map from page_no:heap_no:field_no to first_blob_page_no.
      This map is instantiated for every clustered index in index->blobs.
      It is protected by index->blobs_mutex.
      
      btr_blob_dbg_msg_issue(): Issue a diagnostic message.
      Invoked when btr_blob_dbg_msg is set.
      
      btr_blob_dbg_rbt_insert(): Insert a btr_blob_dbg_t into index->blobs.
      
      btr_blob_dbg_rbt_delete(): Remove a btr_blob_dbg_t from index->blobs.
      
      btr_blob_dbg_cmp(): Comparator for btr_blob_dbg_t.
      
      btr_blob_dbg_add_blob(): Add a BLOB reference to the map.
      
      btr_blob_dbg_add_rec(): Add all BLOB references from a record to the map.
      
      btr_blob_dbg_print(): Display the map of BLOB references in an index.
      
      btr_blob_dbg_remove_rec(): Remove all BLOB references of a record from
      the map.
      
      btr_blob_dbg_is_empty(): Check that no BLOB references exist to or
      from a page. Disowned references from delete-marked records are
      tolerated.
      
      btr_blob_dbg_op(): Perform an operation on all BLOB references on a
      B-tree page.
      
      btr_blob_dbg_add(): Add all BLOB references from a B-tree page to the
      map.
      
      btr_blob_dbg_remove(): Remove all BLOB references from a B-tree page
      from the map.
      
      btr_blob_dbg_restore(): Restore the BLOB references after a failed
      page reorganize.
      
      btr_blob_dbg_set_deleted_flag(): Modify the 'deleted' flag in the BLOB
      references of a record.
      
      btr_blob_dbg_owner(): Own or disown a BLOB reference.
      
      btr_page_create(), btr_page_free_low(): Assert that no BLOB references exist.
      
      btr_create(): Create index->blobs for clustered indexes.
      
      btr_page_reorganize_low(): Invoke btr_blob_dbg_remove() before copying
      the records. Invoke btr_blob_dbg_restore() if the operation fails.
      
      btr_page_empty(), btr_lift_page_up(), btr_compress(), btr_discard_page():
      Invoke btr_blob_dbg_remove().
      
      btr_cur_del_mark_set_clust_rec(): Invoke btr_blob_dbg_set_deleted_flag().
      
      Other cases of modifying the delete mark are either in the secondary
      index or during crash recovery, which we do not promise to support.
      
      btr_cur_set_ownership_of_extern_field(): Invoke btr_blob_dbg_owner().
      
      btr_store_big_rec_extern_fields(): Invoke btr_blob_dbg_add_blob().
      
      btr_free_externally_stored_field(): Invoke btr_blob_dbg_assert_empty()
      on the first BLOB page.
      
      page_cur_insert_rec_low(), page_cur_insert_rec_zip(),
      page_copy_rec_list_end_to_created_page(): Invoke btr_blob_dbg_add_rec().
      
      page_cur_insert_rec_zip_reorg(), page_copy_rec_list_end(),
      page_copy_rec_list_start(): After failure, invoke
      btr_blob_dbg_remove() and btr_blob_dbg_add().
      
      page_cur_delete_rec(): Invoke btr_blob_dbg_remove_rec().
      
      page_delete_rec_list_end(): Invoke btr_blob_dbg_op(btr_blob_dbg_remove_rec).
      
      page_zip_reorganize(): Invoke btr_blob_dbg_remove() before copying the records.
      
      page_zip_copy_recs(): Invoke btr_blob_dbg_add().
      
      row_upd_rec_in_place(): Invoke btr_blob_dbg_rbt_delete() and
      btr_blob_dbg_rbt_insert().
      
      innobase_start_or_create_for_mysql(): Warn when UNIV_BLOB_DEBUG is enabled.
      
      rb://550 approved by Jimmy Yang
      154fc1e3
    • Vasil Dimov's avatar
      6eb014a6
  9. 07 Feb, 2011 6 commits
  10. 04 Feb, 2011 4 commits
  11. 02 Feb, 2011 1 commit