An error occurred fetching the project authors.
  1. 12 Oct, 2011 1 commit
    • Marko Mäkelä's avatar
      Bug#13006367 62487: innodb takes 3 minutes to clean up the adaptive · 6d590649
      Marko Mäkelä authored
      hash index at shutdown
      
      btr_search_disable(): Just drop the entire adaptive hash index,
      without dropping every record separately.
      
      buf_pool_clear_hash_index(): Renamed and simplified from
      buf_pool_drop_hash_index(). Set block->index = NULL for every block in
      the buffer pool. Do not release the btr_search_latch. The caller will
      have to adjust other data structures.
      
      Remove block->is_hashed. It is redundant, should be always equal to
      block->index != NULL.
      
      Remove btr_search_fully_disabled, btr_search_enabled_mutex, and
      SYNC_SEARCH_SYS_CONF. We drop the AHI in one pass, without releasing
      the btr_search_latch in between.
      
      Replace void* with const rec_t* and add assertions on btr_search_latch
      and btr_search_enabled to ha0ha.h, ha0ha.ic, ha0ha.c.
      
      page_set_max_trx_id(): Ignore the adaptive hash index. I forgot to
      push this in rb:750.
      
      btr0sea.c: Always after acquiring btr_search_latch, check for
      block->index==NULL or !btr_search_enabled. We can now set
      block->index=NULL while only holding btr_search_latch in exclusive
      mode. Always acquire btr_search_latch before reading block->index,
      except in shortcuts when testing for block->index == NULL.
      
      ha_clear(), ha_search(): Unused function, remove.
      
      buf_page_peek_if_search_hashed(): Remove. This function may avoid
      latching a page at the cost of doing a duplicate buf_pool->page_hash
      lookup.
      
      rb:775 approved by Inaam Rana
      6d590649
  2. 29 Aug, 2011 1 commit
    • Marko Mäkelä's avatar
      Bug#12704861 Corruption after a crash during BLOB update · 41f229cd
      Marko Mäkelä authored
      The fix of Bug#12612184 broke crash recovery. When a record that
      contains off-page columns (BLOBs) is updated, we must first write redo
      log about the BLOB page writes, and only after that write the redo log
      about the B-tree changes. The buggy fix would log the B-tree changes
      first, meaning that after recovery, we could end up having a record
      that contains a null BLOB pointer.
      
      Because we will be redo logging the writes off the off-page columns
      before the B-tree changes, we must make sure that the pages chosen for
      the off-page columns are free both before and after the B-tree
      changes. In this way, the worst thing that can happen in crash
      recovery is that the BLOBs are written to free pages, but the B-tree
      changes are not applied. The BLOB pages would correctly remain free in
      this case. To achieve this, we must allocate the BLOB pages in the
      mini-transaction of the B-tree operation. A further quirk is that BLOB
      pages are allocated from the same file segment as leaf pages. Because
      of this, we must temporarily "hide" any leaf pages that were freed
      during the B-tree operation by "fake allocating" them prior to writing
      the BLOBs, and freeing them again before the mtr_commit() of the
      B-tree operation, in btr_mark_freed_leaves().
      
      btr_cur_mtr_commit_and_start(): Remove this faulty function that was
      introduced in the Bug#12612184 fix. The problem that this function was
      trying to address was that when we did mtr_commit() the BLOB writes
      before the mtr_commit() of the update, the new BLOB pages could have
      overwritten clustered index B-tree leaf pages that were freed during
      the update. If recovery applied the redo log of the BLOB writes but
      did not see the log of the record update, the index tree would be
      corrupted. The correct solution is to make the freed clustered index
      pages unavailable to the BLOB allocation. This function is also a
      likely culprit of InnoDB hangs that were observed when testing the
      Bug#12612184 fix.
      
      btr_mark_freed_leaves(): Mark all freed clustered index leaf pages of
      a mini-transaction allocated (nonfree=TRUE) before storing the BLOBs,
      or freed (nonfree=FALSE) before committing the mini-transaction.
      
      btr_freed_leaves_validate(): A debug function for checking that all
      clustered index leaf pages that have been marked free in the
      mini-transaction are consistent (have not been zeroed out).
      
      btr_page_alloc_low(): Refactored from btr_page_alloc(). Return the
      number of the allocated page, or FIL_NULL if out of space. Add the
      parameter "mtr_t* init_mtr" for specifying the mini-transaction where
      the page should be initialized, or if this is a "fake allocation"
      (init_mtr=NULL) by btr_mark_freed_leaves(nonfree=TRUE).
      
      btr_page_alloc(): Add the parameter init_mtr, allowing the page to be
      initialized and X-latched in a different mini-transaction than the one
      that is used for the allocation. Invoke btr_page_alloc_low(). If a
      clustered index leaf page was previously freed in mtr, remove it from
      the memo of previously freed pages.
      
      btr_page_free(): Assert that the page is a B-tree page and it has been
      X-latched by the mini-transaction. If the freed page was a leaf page
      of a clustered index, link it by a MTR_MEMO_FREE_CLUST_LEAF marker to
      the mini-transaction.
      
      btr_store_big_rec_extern_fields_func(): Add the parameter alloc_mtr,
      which is NULL (old behaviour in inserts) and the same as local_mtr in
      updates. If alloc_mtr!=NULL, the BLOB pages will be allocated from it
      instead of the mini-transaction that is used for writing the BLOBs.
      
      fsp_alloc_from_free_frag(): Refactored from
      fsp_alloc_free_page(). Allocate the specified page from a partially
      free extent.
      
      fseg_alloc_free_page_low(), fseg_alloc_free_page_general(): Add the
      parameter "mtr_t* init_mtr" for specifying the mini-transaction where
      the page should be initialized, or NULL if this is a "fake allocation"
      that prevents the reuse of a previously freed B-tree page for BLOB
      storage. If init_mtr==NULL, try harder to reallocate the specified page
      and assert that it succeeded.
      
      fsp_alloc_free_page(): Add the parameter "mtr_t* init_mtr" for
      specifying the mini-transaction where the page should be initialized.
      Do not allow init_mtr == NULL, because this function is never to be
      used for "fake allocations".
      
      mtr_t: Add the operation MTR_MEMO_FREE_CLUST_LEAF and the flag
      mtr->freed_clust_leaf for quickly determining if any
      MTR_MEMO_FREE_CLUST_LEAF operations have been posted.
      
      row_ins_index_entry_low(): When columns are being made off-page in
      insert-by-update, invoke btr_mark_freed_leaves(nonfree=TRUE) and pass
      the mini-transaction as the alloc_mtr to
      btr_store_big_rec_extern_fields(). Finally, invoke
      btr_mark_freed_leaves(nonfree=FALSE) to avoid leaking pages.
      
      row_build(): Correct a comment, and add a debug assertion that a
      record that contains NULL BLOB pointers must be a fresh insert.
      
      row_upd_clust_rec(): When columns are being moved off-page, invoke
      btr_mark_freed_leaves(nonfree=TRUE) and pass the mini-transaction as
      the alloc_mtr to btr_store_big_rec_extern_fields(). Finally, invoke
      btr_mark_freed_leaves(nonfree=FALSE) to avoid leaking pages.
      
      buf_reset_check_index_page_at_flush(): Remove. The function
      fsp_init_file_page_low() already sets
      bpage->check_index_page_at_flush=FALSE.
      
      There is a known issue in tablespace extension. If the request to
      allocate a BLOB page leads to the tablespace being extended, crash
      recovery could see BLOB writes to pages that are off the tablespace
      file bounds. This should trigger an assertion failure in fil_io() at
      crash recovery. The safe thing would be to write redo log about the
      tablespace extension to the mini-transaction of the BLOB write, not to
      the mini-transaction of the record update. However, there is no redo
      log record for file extension in the current redo log format.
      
      rb:693 approved by Sunny Bains
      41f229cd
  3. 19 Jul, 2011 1 commit
  4. 17 Jun, 2011 1 commit
    • Inaam Rana's avatar
      Bug 12635227 - 61188: DROP TABLE EXTREMELY SLOW · e60e6505
      Inaam Rana authored
      approved by: Marko
      rb://681
      
      Coalescing of free buf_page_t descriptors can prove to be one severe
      bottleneck in performance of compression. One such workload where it
      hurts badly is DROP TABLE. This patch removes buf_page_t allocations
      from buf_buddy and uses ut_malloc instead.
      In order to further reduce overhead of colaescing we no longer attempt
      to coalesce a block if the corresponding free_list is less than 16 in
      size.
      e60e6505
  5. 16 Jun, 2011 1 commit
    • Marko Mäkelä's avatar
      Bug #61341 buf_LRU_insert_zip_clean can be O(N) on LRU length · b0fc27dc
      Marko Mäkelä authored
      The buf_pool->zip_clean list is only needed for debugging, or for
      recomputing buf_pool->page_hash when resizing the buffer pool. Buffer
      pool resizing was never fully implemented. Remove the resizing code,
      and define buf_pool->zip_clean only in debug builds.
      
      buf_pool->zip_clean, buf_LRU_insert_zip_clean(): Enclose in
      #if defined UNIV_DEBUG || UNIV_BUF_DEBUG.
      
      buf_chunk_free(), buf_chunk_all_free(), buf_pool_shrink(),
      buf_pool_page_hash_rebuild(), buf_pool_resize(): Remove (unreachable code).
      
      rb:671 approved by Inaam Rana
      b0fc27dc
  6. 28 Feb, 2011 1 commit
    • Marko Mäkelä's avatar
      Bug #58549 Race condition in buf_LRU_drop_page_hash_for_tablespace() · 0f8ae318
      Marko Mäkelä authored
      and compressed tables
      
      buf_LRU_drop_page_hash_for_tablespace(): after releasing and
      reacquiring the buffer pool mutex, do not dereference any block
      descriptor pointer that is not known to be a pointer to an
      uncompressed page frame (type buf_block_t; state ==
      BUF_BLOCK_FILE_PAGE). Also, defer the acquisition of the block_mutex
      until it is needed.
      
      buf_page_get_gen(): Add mode == BUF_GET_IF_IN_POOL_PEEK for
      buffer-fixing a block without making it young in the LRU list.
      
      buf_page_get_gen(), buf_page_init(), buf_LRU_block_remove_hashed_page():
      Set bpage->state = BUF_BLOCK_ZIP_FREE before buf_buddy_free(bpage),
      so that similar race conditions might be detected a little easier.
      
      btr_search_drop_page_hash_when_freed(): Use BUF_GET_IF_IN_POOL_PEEK
      when dropping the hash indexes.
      
      rb://528 approved by Jimmy Yang
      0f8ae318
  7. 25 Feb, 2011 1 commit
    • Vasil Dimov's avatar
      Fix BUG#11798085 - INCORRECT INTEGER TYPES USED IN CALCULATION RESULT · 5a805fe7
      Vasil Dimov authored
      IN OVERFLOW
      
      Do not assign the result of the difference to a signed variable and
      checking whether it is negative afterwards because this limits the max diff
      to 2G on 32 bit systems. E.g. "signed = 3.5G - 1G" would be negative and the
      code would assume that 3.5G < 1G. Instead compare the two variables directly
      and assign to unsigned only if we know that the result of the subtraction
      will be positive.
      
      Discussed with:	Jimmy and Sunny (via IRC)
      5a805fe7
  8. 02 Feb, 2011 1 commit
  9. 25 Jan, 2011 1 commit
    • Marko Mäkelä's avatar
      Bug#59707 Unused compression-related parameters in buffer pool functions · 60a622d1
      Marko Mäkelä authored
      buf_block_alloc(): ulint zip_size is always 0.
      buf_LRU_get_free_block(): ulint zip_size is always 0.
      buf_LRU_free_block(): ibool* buf_pool_mutex_released is always NULL.
      
      Remove these parameters.
      
      buf_LRU_get_free_block(): Simplify the initialization of block->page.zip
      and release buf_pool_mutex() earlier.
      60a622d1
  10. 06 Jan, 2011 1 commit
  11. 19 Oct, 2010 1 commit
    • Marko Mäkelä's avatar
      Bug #56680 wrong InnoDB results from a case-insensitive covering index · c38071ec
      Marko Mäkelä authored
      row_search_for_mysql(): When a secondary index record might not be
      visible in the current transaction's read view and we consult the
      clustered index and optionally some undo log records, return the
      relevant columns of the clustered index record to MySQL instead of the
      secondary index record.
      
      ibuf_insert_to_index_page_low(): New function, refactored from
      ibuf_insert_to_index_page().
      
      ibuf_insert_to_index_page(): When we are inserting a record in place
      of a delete-marked record and some fields of the record differ, update
      that record just like row_ins_sec_index_entry_by_modify() would do.
      
      btr_cur_update_alloc_zip(): Make the function public.
      
      mysql_row_templ_t: Add clust_rec_field_no.
      
      row_sel_store_mysql_rec(), row_sel_push_cache_row_for_mysql(): Add the
      flag rec_clust, for returning data at clust_rec_field_no instead of
      rec_field_no. Resurrect the debug assertion that the record not be
      marked for deletion. (Bug #55626)
      
      [UNIV_DEBUG || UNIV_IBUF_DEBUG] ibuf_debug, buf_page_get_gen(),
      buf_flush_page_try():
      Implement innodb_change_buffering_debug=1 for evicting pages from the
      buffer pool, so that change buffering will be attempted more
      frequently.
      c38071ec
  12. 08 Jun, 2010 1 commit
  13. 19 May, 2010 1 commit
  14. 03 May, 2010 1 commit
  15. 01 Apr, 2010 7 commits
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · 7119e7b7
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6860 | jyang | 2010-03-23 18:20:36 +0200 (Tue, 23 Mar 2010) | 5 lines
      branches/zip: This is patch from Inaam that uses red-black tree
      to speed up insertions into the flush_list and thus the recovery
      process. The patch has been tested by Nokia.
      7119e7b7
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · 923d34a9
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6800 | marko | 2010-03-11 12:02:57 +0200 (Thu, 11 Mar 2010) | 1 line
      branches/zip: Add ut_ad(mtr->state == MTR_ACTIVE) to various places.
      923d34a9
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · 44a0ff6c
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6749 | vasil | 2010-02-20 18:45:41 +0200 (Sat, 20 Feb 2010) | 5 lines
      Non-functional change: update copyright year to 2010 of the files
      that have been modified after 2010-01-01 according to svn.
      
      for f in $(svn log -v -r{2010-01-01}:HEAD |grep "^   M " |cut -b 16- |sort -u) ; do sed -i "" -E 's/(Copyright \(c\) [0-9]{4},) [0-9]{4}, (.*Innobase Oy.+All Rights Reserved)/\1 2010, \2/' $f ; done
      44a0ff6c
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · 286dc23a
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6633 | marko | 2010-02-10 10:40:55 +0200 (Wed, 10 Feb 2010) | 31 lines
      branches/zip: Merge revisions 6538:6613 from branches/5.1:
      
        ------------------------------------------------------------------------
        r6545 | jyang | 2010-02-03 03:57:32 +0200 (Wed, 03 Feb 2010) | 8 lines
        Changed paths:
           M /branches/5.1/lock/lock0lock.c
      
        branches/5.1: Fix bug #49001, "SHOW INNODB STATUS deadlock info
        incorrect when deadlock detection aborts". Print the correct
        lock owner when recursive function lock_deadlock_recursive()
        exceeds its maximum depth LOCK_MAX_DEPTH_IN_DEADLOCK_CHECK.
      
        rb://217, approved by Marko.
        ------------------------------------------------------------------------
        r6613 | inaam | 2010-02-09 20:23:09 +0200 (Tue, 09 Feb 2010) | 11 lines
        Changed paths:
           M /branches/5.1/buf/buf0buf.c
           M /branches/5.1/buf/buf0rea.c
           M /branches/5.1/include/buf0rea.h
      
        branches/5.1: Fix Bug #38901
        InnoDB logs error repeatedly when trying to load page into buffer pool
      
        In buf_page_get_gen() if we are unable to read a page (because of
        corruption or some other reason) we keep on retrying. This fills up
        error log with millions of entries in no time and we'd eventually run
        out of disk space. This patch limits the number of attempts that we
        make (currently set to 100) and after that we abort with a message.
      
        rb://241 Approved by: Heikki
        ------------------------------------------------------------------------
      286dc23a
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · 30ddb931
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6559 | marko | 2010-02-04 13:21:18 +0200 (Thu, 04 Feb 2010) | 14 lines
      branches/zip: Pass the file name and line number of the caller of the
      b-tree cursor functions to the buffer pool requests, in order to make
      the latch diagnostics more accurate.
      
      buf_page_optimistic_get_func(): Renamed to buf_page_optimistic_get().
      
      btr_page_get_father_node_ptr(), btr_insert_on_non_leaf_level(),
      btr_pcur_open(), btr_pcur_open_with_no_init(), btr_pcur_open_on_user_rec(),
      btr_pcur_open_at_rnd_pos(), btr_pcur_restore_position(),
      btr_cur_open_at_index_side(), btr_cur_open_at_rnd_pos():
      Rename the function to _func and add the parameters file, line.
      Define wrapper macros with __FILE__, __LINE__.
      
      btr_cur_search_to_nth_level(): Add the parameters file, line.
      30ddb931
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · 84c85a04
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6498 | marko | 2010-01-21 11:22:52 +0200 (Thu, 21 Jan 2010) | 15 lines
      branches/zip: buf_page_get_gen(): Obey recv_no_ibuf_operations
      and do not call ibuf_merge_or_delete_for_page() in crash recovery,
      before the redo log has been applied.
      This could cure some hard-to-repeat, hard-to-explain bugs
      related to secondary indexes.
      
      A possible recipe to repeat the bug:
      
      1. update a secondary index leaf page on a compressed table
      2. evict the page from the buffer pool while it is still dirty
      3. ibuf_insert() something for the page
      4. crash
      5. crash recovery; ibuf merge would be done too early,
      before applying redo log to the sec index page or the ibuf pages
      84c85a04
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · 0ed51345
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6445 | marko | 2010-01-13 17:15:29 +0200 (Wed, 13 Jan 2010) | 3 lines
      branches/zip: buf_pool_drop_hash_index(): Check block->page.state
      before checking block->is_hashed, because the latter may be uninitialized
      right after server startup.
      0ed51345
  16. 30 Nov, 2009 1 commit
    • Satya B's avatar
      Applying InnoDB Plugin 1.0.6 snapshot,part 1. Fixes BUG#45992 and BUG#46656 · a1092e9b
      Satya B authored
      Detailed revision comments:
      
      r6130 | marko | 2009-11-02 11:42:56 +0200 (Mon, 02 Nov 2009) | 9 lines
      branches/zip: Free all resources at shutdown. Set pointers to NULL, so
      that Valgrind will not complain about freed data structures that are
      reachable via pointers.  This addresses Bug #45992 and Bug #46656.
      
      This patch is mostly based on changes copied from branches/embedded-1.0,
      mainly c5432, c3439, c3134, c2994, c2978, but also some other code was
      copied.  Some added cleanup code is specific to MySQL/InnoDB.
      
      rb://199 approved by Sunny Bains
      a1092e9b
  17. 03 Nov, 2009 1 commit
    • Sergey Vojtovich's avatar
      Applying InnoDB plugin snashot · 640f1009
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6110 | marko | 2009-10-29 12:44:57 +0200 (Thu, 29 Oct 2009) | 2 lines
      branches/zip: Makefile.am (INCLUDES): Merge a change from MySQL:
      Use $(srcdir)/include instead of $(top_srcdir)/storage/innobase/include.
      r6111 | marko | 2009-10-29 13:04:11 +0200 (Thu, 29 Oct 2009) | 33 lines
      branches/zip: Fix corruption of buf_pool->LRU_old and improve debug assertions.
      This was reported as Issue #381.
      
      buf_page_set_old(): Assert that blocks may only be set old if
      buf_pool->LRU_old is initialized and buf_pool->LRU_old_len is nonzero.
      Assert that buf_pool->LRU_old points to the block at the old/new boundary.
      
      buf_LRU_old_adjust_len(): Invoke buf_page_set_old() after adjusting
      buf_pool->LRU_old and buf_pool->LRU_old_len, in order not to violate
      the added assertions.
      
      buf_LRU_old_init(): Replace buf_page_set_old() with a direct
      assignment to bpage->old, because these loops that initialize all the
      blocks would temporarily violate the assertions about
      buf_pool->LRU_old.
      
      buf_LRU_remove_block(): When setting buf_pool->LRU_old = NULL, also
      clear all bpage->old flags and set buf_pool->LRU_old_len = 0.
      
      buf_LRU_add_block_to_end_low(), buf_LRU_add_block_low(): Move the
      buf_page_set_old() call later in order not to violate the debug
      assertions.  If buf_pool->LRU_old is NULL, set old=FALSE.
      
      buf_LRU_free_block(): Replace the UNIV_LRU_DEBUG assertion with a
      dummy buf_page_set_old() call that performs more thorough checks.
      
      buf_LRU_validate(): Do not tolerate garbage in buf_pool->LRU_old_len
      even if buf_pool->LRU_old is NULL.  Check that bpage->old is monotonic.
      
      buf_relocate(): Make the UNIV_LRU_DEBUG checks stricter.
      
      buf0buf.h: Revise the documentation of buf_page_t::old and
      buf_pool_t::LRU_old_len.
      640f1009
  18. 09 Oct, 2009 1 commit
    • Satya B's avatar
      Applying InnoDB Plugin 1.0.5 snapshot ,part 12 · e011c02e
      Satya B authored
      From r5995 to r6043
      
      Detailed revision comments:
      
      r5995 | marko | 2009-09-28 03:52:25 -0500 (Mon, 28 Sep 2009) | 17 lines
      branches/zip: Do not write to PAGE_INDEX_ID after page creation,
      not even when restoring an uncompressed page after a compression failure.
      
      btr_page_reorganize_low(): On compression failure, do not restore
      those page header fields that should not be affected by the
      reorganization.  Instead, compare the fields.
      
      page_zip_decompress(): Add the parameter ibool all, for copying all
      page header fields.  Pass the parameter all=TRUE on block read
      completion, redo log application, and page_zip_validate(); pass
      all=FALSE in all other cases.
      
      page_zip_reorganize(): Do not restore the uncompressed page on
      failure.  It will be restored (to pre-modification state) by the
      caller anyway.
      
      rb://167, Issue #346
      r5996 | marko | 2009-09-28 07:46:02 -0500 (Mon, 28 Sep 2009) | 4 lines
      branches/zip: Address Issue #350 in comments.
      
      lock_rec_queue_validate(), lock_rec_queue_validate(): Note that
      this debug code may violate the latching order and cause deadlocks.
      r5997 | marko | 2009-09-28 08:03:58 -0500 (Mon, 28 Sep 2009) | 12 lines
      branches/zip: Remove an assertion failure when the InnoDB data dictionary
      is inconsistent with the MySQL .frm file.
      
      ha_innobase::index_read(): When the index cannot be found,
      return an error.
      
      ha_innobase::change_active_index(): When prebuilt->index == NULL,
      set also prebuilt->index_usable = FALSE.  This is not needed for
      correctness, because prebuilt->index_usable is only checked by
      row_search_for_mysql(), which requires prebuilt->index != NULL.
      
      This addresses Issue #349.  Approved by Heikki Tuuri over IM.
      r6005 | vasil | 2009-09-29 03:09:52 -0500 (Tue, 29 Sep 2009) | 4 lines
      branches/zip:
      
      ChangeLog: wrap around 78th column, not earlier.
      
      r6006 | vasil | 2009-09-29 05:15:25 -0500 (Tue, 29 Sep 2009) | 4 lines
      branches/zip:
      
      Add ChangeLog entry for the release of 1.0.4.
      
      r6007 | vasil | 2009-09-29 08:19:59 -0500 (Tue, 29 Sep 2009) | 6 lines
      branches/zip:
      
      Fix the year, should be 2009.
      
      Pointed by:	Calvin
      
      r6026 | marko | 2009-09-30 02:18:24 -0500 (Wed, 30 Sep 2009) | 1 line
      branches/zip: Add some debug assertions for checking FSEG_MAGIC_N.
      r6028 | marko | 2009-09-30 08:55:23 -0500 (Wed, 30 Sep 2009) | 3 lines
      branches/zip: recv_no_log_write: New debug flag for tracking down
      Mantis Issue #347.  No modifications should be made to the database
      while recv_apply_hashed_log_recs() is about to complete.
      r6029 | calvin | 2009-09-30 15:32:02 -0500 (Wed, 30 Sep 2009) | 4 lines
      branches/zip: non-functional changes
      
      Fix typo.
      
      r6031 | marko | 2009-10-01 06:24:33 -0500 (Thu, 01 Oct 2009) | 49 lines
      branches/zip: Clean up after a crash during DROP INDEX.
      When InnoDB crashes while dropping an index, ensure that
      the index will be completely dropped during crash recovery.
      
      row_merge_drop_index(): Before dropping an index, rename the index to
      start with TEMP_INDEX_PREFIX_STR and commit the change, so that
      row_merge_drop_temp_indexes() will drop the index after crash
      recovery if the server crashes while dropping the index.
      
      fseg_inode_try_get(): New function, forked from fseg_inode_get().
      Return NULL if the file segment index node is free.
      
      fseg_inode_get(): Assert that the file segment index node is not free.
      
      fseg_free_step(): If the file segment index node is already free,
      print a diagnostic message and return TRUE.
      
      fsp_free_seg_inode(): Write a nonzero number to FSEG_MAGIC_N, so that
      allocated-and-freed file segment index nodes can be better
      distinguished from uninitialized ones.
      
      This is rb://174, addressing Issue #348.
      
      Tested by restarting mysqld upon the completion of the added
      log_write_up_to() invocation below, during DROP INDEX.  The index was
      dropped after crash recovery, and re-issuing the DROP INDEX did not
      crash the server.
      
      Index: btr/btr0btr.c
      ===================================================================
      --- btr/btr0btr.c	(revision 6026)
      +++ btr/btr0btr.c	(working copy)
      @@ -42,6 +42,7 @@ Created 6/2/1994 Heikki Tuuri
       #include "ibuf0ibuf.h"
       #include "trx0trx.h"
      +#include "log0log.h"
       
       /*
       Latching strategy of the InnoDB B-tree
       --------------------------------------
      @@ -873,6 +874,8 @@ leaf_loop:
       
       		goto leaf_loop;
       	}
      +
      +	log_write_up_to(mtr.end_lsn, LOG_WAIT_ALL_GROUPS, TRUE);
       top_loop:
       	mtr_start(&mtr);
       
      r6033 | calvin | 2009-10-01 15:19:46 -0500 (Thu, 01 Oct 2009) | 4 lines
      branches/zip: fix a typo in error message
      
      Reported as bug#47763.
      
      r6043 | inaam | 2009-10-05 09:45:35 -0500 (Mon, 05 Oct 2009) | 12 lines
      branches/zip  rb://176
      
      Do not invalidate buffer pool while an LRU batch is active. Added
      code to buf_pool_invalidate() to wait for the running batches to finish.
      
      This patch also resets the state of buf_pool struct at invalidation. This
      addresses the concern where buf_pool->freed_page_clock becomes non-zero
      because we read in a system tablespace page for file format info at
      startup.
      
      Approved by: Marko
      
      e011c02e
  19. 08 Oct, 2009 2 commits
    • Satya B's avatar
      Applying InnoDB Plugin 1.0.5 snapshot, part 7 · 7532ad19
      Satya B authored
      From revisions r5792 to r5864
      
      Detailed revision comments:
      
      r5792 | vasil | 2009-09-09 08:35:58 -0500 (Wed, 09 Sep 2009) | 32 lines
      branches/zip:
      
      Fix a bug in manipulating the variable innodb_old_blocks_pct:
      
      for any value assigned it got that value -1, except for 75. When
      assigned 75, it got 75.
      
        mysql> set global innodb_old_blocks_pct=15;
        Query OK, 0 rows affected (0.00 sec)
        
        mysql> show variables like 'innodb_old_blocks_pct';
        +-----------------------+-------+
        | Variable_name         | Value |
        +-----------------------+-------+
        | innodb_old_blocks_pct | 14    | 
        +-----------------------+-------+
        1 row in set (0.00 sec)
        
        mysql> set global innodb_old_blocks_pct=75;
        Query OK, 0 rows affected (0.00 sec)
        
        mysql> show variables like 'innodb_old_blocks_pct';
        +-----------------------+-------+
        | Variable_name         | Value |
        +-----------------------+-------+
        | innodb_old_blocks_pct | 75    | 
        +-----------------------+-------+
      
      After the fix it gets exactly what was assigned.
      
      Approved by:	Marko (via IM)
      
      r5798 | calvin | 2009-09-09 10:28:10 -0500 (Wed, 09 Sep 2009) | 5 lines
      branches/zip:
      
      HA_ERR_TOO_MANY_CONCURRENT_TRXS is added in 5.1.38.
      But the plugin should still work with previous versions
      of MySQL.
      r5804 | marko | 2009-09-10 00:29:31 -0500 (Thu, 10 Sep 2009) | 1 line
      branches/zip: trx_cleanup_at_db_startup(): Fix a typo in comment.
      r5822 | marko | 2009-09-10 05:10:20 -0500 (Thu, 10 Sep 2009) | 1 line
      branches/zip: buf_page_release(): De-stutter the function comment.
      r5825 | marko | 2009-09-10 05:47:09 -0500 (Thu, 10 Sep 2009) | 20 lines
      branches/zip: Reduce mutex contention that was introduced when
      addressing Bug #45015 (Issue #316), in r5703.
      
      buf_page_set_accessed_make_young(): New auxiliary function, called by
      buf_page_get_zip(), buf_page_get_gen(),
      buf_page_optimistic_get_func(). Call ut_time_ms() outside of
      buf_pool_mutex. Use cached access_time.
      
      buf_page_set_accessed(): Add the parameter time_ms, so that
      ut_time_ms() need not be called while holding buf_pool_mutex.
      
      buf_page_optimistic_get_func(), buf_page_get_known_nowait(): Read
      buf_page_t::access_time without holding buf_pool_mutex. This should be
      OK, because the field is only used for heuristic purposes.
      
      buf_page_peek_if_too_old(): If buf_pool->freed_page_clock == 0, return
      FALSE, so that we will not waste time moving blocks in the LRU list in
      the warm-up phase or when the workload fits in the buffer pool.
      
      rb://156 approved by Sunny Bains
      r5826 | marko | 2009-09-10 06:29:46 -0500 (Thu, 10 Sep 2009) | 12 lines
      branches/zip: Roll back recovered dictionary transactions before
      dropping incomplete indexes (Issue #337).
      
      trx_rollback_or_clean_recovered(ibool all): New function, split from
      trx_rollback_or_clean_all_recovered().  all==FALSE will only roll back
      dictionary transactions.
      
      recv_recovery_from_checkpoint_finish(): Call
      trx_rollback_or_clean_recovered(FALSE) before
      row_merge_drop_temp_indexes().
      
      rb://158 approved by Sunny Bains
      r5858 | vasil | 2009-09-11 12:46:47 -0500 (Fri, 11 Sep 2009) | 4 lines
      branches/zip:
      
      Fix the indentation of the closing bracket.
      
      r5863 | vasil | 2009-09-12 02:07:08 -0500 (Sat, 12 Sep 2009) | 10 lines
      branches/zip:
      
      Check that pthread_t can indeed be passed to Solaris atomic functions, instead
      of assuming that it can be passed if 0 can be assigned to it. It could be that:
      * 0 can be assigned, but pthread_t cannot be passed and
      * 0 cannot be assigned but pthread_t can be passed
      
      Better to check what we are interested in, not something else and make
      assumptions.
      
      r5864 | vasil | 2009-09-12 02:22:55 -0500 (Sat, 12 Sep 2009) | 4 lines
      branches/zip:
      
      Include string.h which is needed for memset().
      
      7532ad19
    • Satya B's avatar
      Applying InnoDB Plugin 1.0.5 snapshot, part 4 · abfdf76b
      Satya B authored
      From revision r5703 to r5716
      
      Detailed revision comments:
      
      r5703 | marko | 2009-08-27 02:25:00 -0500 (Thu, 27 Aug 2009) | 41 lines
      branches/zip: Replace the constant 3/8 ratio that controls the LRU_old
      size with the settable global variable innodb_old_blocks_pct. The
      minimum and maximum values are 5 and 95 per cent, respectively. The
      default is 100*3/8, in line with the old behavior.
      
      ut_time_ms(): New utility function, to return the current time in
      milliseconds. TODO: Is there a more efficient timestamp function, such
      as rdtsc divided by a power of two?
      
      buf_LRU_old_threshold_ms: New variable, corresponding to
      innodb_old_blocks_time. The value 0 is the default behaviour: no
      timeout before making blocks 'new'.
      
      bpage->accessed, bpage->LRU_position, buf_pool->ulint_clock: Remove.
      
      bpage->access_time: New field, replacing bpage->accessed. Protected by
      buf_pool_mutex instead of bpage->mutex. Updated when a page is created
      or accessed the first time in the buffer pool.
      
      buf_LRU_old_ratio, innobase_old_blocks_pct: New variables,
      corresponding to innodb_old_blocks_pct
      
      buf_LRU_old_ratio_update(), innobase_old_blocks_pct_update(): Update
      functions for buf_LRU_old_ratio, innobase_old_blocks_pct.
      
      buf_page_peek_if_too_old(): Compare ut_time_ms() to bpage->access_time
      if buf_LRU_old_threshold_ms && bpage->old.  Else observe
      buf_LRU_old_ratio and bpage->freed_page_clock.
      
      buf_pool_t: Add n_pages_made_young, n_pages_not_made_young,
      n_pages_made_young_old, n_pages_not_made_young, for statistics.
      
      buf_print(): Display buf_pool->n_pages_made_young,
      buf_pool->n_pages_not_made_young.  This function is only for crash
      diagnostics.
      
      buf_print_io(): Display buf_pool->LRU_old_len and quantities derived
      from buf_pool->n_pages_made_young, buf_pool->n_pages_not_made_young.
      This function is invoked by SHOW ENGINE INNODB STATUS.
      
      rb://129 approved by Heikki Tuuri.  This addresses Bug #45015.
      r5704 | marko | 2009-08-27 03:31:17 -0500 (Thu, 27 Aug 2009) | 32 lines
      branches/zip: Fix a critical bug in fast index creation that could
      corrupt the created indexes.
      
      row_merge(): Make "half" an in/out parameter. Determine the offset of
      half the output file. Copy the last blocks record-by-record instead of
      block-by-block, so that the records can be counted. Check that the
      input and output have matching n_rec.
      
      row_merge_sort(): Do not assume that two blocks of size N are merged
      into a block of size 2*N. The output block can be shorter than the
      input if the last page of each input block is almost empty. Use an
      accurate termination condition, based on the "half" computed by
      row_merge().
      
      row_merge_read(), row_merge_write(), row_merge_blocks(): Add debug output.
      
      merge_file_t, row_merge_file_create(): Add n_rec, the number of records
      in the merge file.
      
      row_merge_read_clustered_index(): Update n_rec.
      
      row_merge_blocks(): Update and check n_rec.
      
      row_merge_blocks_copy(): New function, for copying the last blocks in
      row_merge().  Update and check n_rec.
      
      This bug was discovered with a user-supplied test case that creates an
      index where the initial temporary file is 249 one-megabyte blocks and
      the merged files become smaller. In the test, possible merge record
      sizes are 10, 18, and 26 bytes.
      
      rb://150 approved by Sunny Bains.  This addresses Issue #320.
      r5705 | marko | 2009-08-27 06:56:24 -0500 (Thu, 27 Aug 2009) | 11 lines
      branches/zip: dict_index_find_cols(): On column name lookup failure,
      return DB_CORRUPTION (HA_ERR_CRASHED) instead of abnormally
      terminating the server.  Also, disable the previously added diagnostic
      output to the error log, because mysql-test-run does not like extra
      output in the error log.  (Bug #44571)
      
      dict_index_add_to_cache(): Handle errors from dict_index_find_cols().
      
      mysql-test/innodb_bug44571.test: A test case for triggering the bug.
      
      rb://135 approved by Sunny Bains.
      r5706 | inaam | 2009-08-27 11:00:27 -0500 (Thu, 27 Aug 2009) | 20 lines
      branches/zip rb://147
      
      Done away with following two status variables:
      
      innodb_buffer_pool_read_ahead_rnd
      innodb_buffer_pool_read_ahead_seq
      
      Introduced two new status variables:
      innodb_buffer_pool_read_ahead = number of pages read as part of
      readahead since server startup
      innodb_buffer_pool_read_ahead_evicted = number of pages that are read
      in as readahead but were evicted before ever being accessed since
      server startup i.e.: a measure of how badly our readahead is
      performing
      
      SHOW INNODB STATUS will show two extra numbers in buffer pool section:
      pages read ahead/sec and pages evicted without access/sec
      
      Approved by: Marko
      
      r5707 | inaam | 2009-08-27 11:20:35 -0500 (Thu, 27 Aug 2009) | 6 lines
      branches/zip
      
      Remove unused macros as we erased the random readahead code in r5703.
      Also fixed some comments.
      
      
      r5708 | inaam | 2009-08-27 17:43:32 -0500 (Thu, 27 Aug 2009) | 4 lines
      branches/zip
      
      Remove redundant TRUE : FALSE from the return statement
      
      r5709 | inaam | 2009-08-28 01:22:46 -0500 (Fri, 28 Aug 2009) | 5 lines
      branches/zip rb://152
      
      Disable display of deprecated parameter innodb_file_io_threads in
      'show variables'.
      
      r5714 | marko | 2009-08-31 01:10:10 -0500 (Mon, 31 Aug 2009) | 5 lines
      branches/zip: buf_chunk_not_freed(): Do not acquire block->mutex unless
      block->page.state == BUF_BLOCK_FILE_PAGE.  Check that block->page.state
      makes sense.
      
      Approved by Sunny Bains over the IM.
      r5716 | vasil | 2009-08-31 02:47:49 -0500 (Mon, 31 Aug 2009) | 9 lines
      branches/zip:
      
      Fix Bug#46718 InnoDB plugin incompatible with gcc 4.1 (at least: on PPC): "Undefined symbol"
      
      by implementing our own check in plug.in instead of using the result from
      the check from MySQL because it is insufficient.
      
      Approved by:	Marko (rb://154)
      
      abfdf76b
  20. 30 Jul, 2009 1 commit
  21. 27 May, 2009 1 commit